Ability to run test_start on workers.
See original GitHub issueIs your feature request related to a problem? Please describe.
I have a load test where some setup is needed, but I really only need to do it once to set some global variables, that all spawned users to use.
Previously this was done with the HttpLocust.setup
method. Unfortunately, now there is the test_start
functionality which only runs on the master.
Describe the solution you’d like
Allow the test_start
functionality to run on workers.
Describe alternatives you’ve considered
I can use the HttpUser.on_start
method, but it results in ever single user that is spawned making a request (part of the work that I have to do in the setup), and it’s not ideal.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
mimic test_start test_stop events in distributed mode worker
when running in distributed mode, these events occur on the master, not the worker. I am assembling a list of detailed stats for...
Read more >Javascript Web Workers Test (Source Code) - pmav.eu
startTime : null , // Current test start time. ... 154. this .run(test.workers, test.data.base, test.data.power, test.data.mod);. 155. this .benchmark.
Read more >Run-Workers does not work for Gherkin / Cucumber BDD ...
Running Gherkin Features in Parallel does not work with run-workers . It repeats the Same Scenarios in each worker more than once.
Read more >Validation of Physical Ability Tests for High Pressure Cleaning ...
Employees work in crews or teams which allows the workers to alternate performing the cleaning tasks. The Company wished to develop fair and...
Read more >Modern React testing, part 4: Cypress and ... - Artem Sapegin
The best experience of writing and debugging tests. Ability to inspect the page at any moment during the test run using the browser...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Also, if what you want it just to do some general one-off initialization (not in the context of a User), you can do it using the init event, which IS triggered on all locust processes:
In short, no, not from the test_start/stop events. But there is nothing stopping you from making an HTTP request ”manually”, using
requests
directly. It just wont be logged.