user3669148
user3669148

Reputation: 73

How to use Locust for UI performance testing?

I would like to use Locust for UI performance testing. How to use Locust for UI performance testing? How can I get the loading time of the HTML elements(img, lists, etc..)?

Thanks

Upvotes: 0

Views: 1876

Answers (2)

Marcin Zajkowski
Marcin Zajkowski

Reputation: 1728

Locust is not made for that (as said). There are some other fancy tools which will allow to do it for you e.g:

  • k6.io (https://k6.io/ - previously known as LoadImpact) - allows you to perform performance checks outside of your environment and report it back to the pipeline with results. Easy to configure and integrate, great when it comes to more "clever" testing scenarios such as stress tests, load tests etc.
  • sitespeed.io (https://www.sitespeed.io/) - my 2nd favorite, very fun to use and easy to configure tool to track FE performance and tests (e.g. done with Selenium)
  • Lighthouse Reports - might be also performed as a "pointer" to the most common issues and included as a PR comments e.g. or notifications during the process (there are many Github Actions or DevOps packages doing it)

I've also gathered some of my findings in my recent talk (slides below) and is converted into the series of blogs around these topics and first of them is already published:

  1. Slide deck from my talk on "Modern Web Performance Testing": https://slides.com/zajkowskimarcin/modern-web-performance-testing/
  2. First blog from the series on the same topic: https://wearecogworks.com/blog/the-importance-of-modern-web-performance-testing-part-1

Upvotes: 0

Cyberwiz
Cyberwiz

Reputation: 11426

Locust isn't a browser and doesn't parse HTML. It just does plain HTTP requests and it will not load things like images based on the response.

If you need something like that, you would need to parse the HTML in the response and do the "dependent" requests in your test script.

Upvotes: 0

Related Questions