locust
locust copied to clipboard
Charts are not available in the HTML report when running in headless mode
Hi everyone,
thanks for all the efforts in this amazing tool. I am trying to run a headless load test with locust (2.8.6) that should produce a HTML report showing exactly the same stuff as with the UI execution. The command looks like this:
locust -f mytest.py --headless --users 5 --spawn-rate 1 -i 100 -t 1 --html report.html --print-stats -L INFO --logfile report.log
(Please note that I am using the locust plugin to stop after 100 requests) The test is running fine and the HTML will also be created. However the report only contains the two tables Request Statistics + Response Time Statistics But below "Final ratio" there's nothing displayed. I've tried multiple browsers but the result is the same. I can also see in the console an error "Uncaught TypeError: Cannot read properties of undefined (reading 'getAttribute')"
Is this a locust bug (it could be eventually the older JQuery version in the HTML file) ? Or is there anything wrong with my command?
Thanks in advance!
Huh. Would be nice to fix but I dont think I have time to investigate. Maybe try —autostart instead of —headless and see if that works better?
Thanks @cyberw for your reply. Unfortunately --autostart doesn't improve things for me...even worse is that the process doesn't stop after the given number of request passed via -i parameter (but that's a different topic I guess). So I hope you'll find the time to investigate that case, a big thanks for that in advance.
The same behavior is observed when running locust as library and spawning the web ui as separate process to get the stats on locust web endpoint.
I also have the issue, my html file is around 200mb and only the table is displayed. Would it be possible to use the CSV files to generate such charts? Maybe someone already have a formula to generate those?
feel free to have a look at the code. maybe it is something that can be solved without much effort.
I am having the same problem. No solution yet?
I also have the issue,
This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!
Any solution on this issue?