Skip to content

Commit

Permalink
Clarify when setup/teardown and on_start/on_stop methods are run
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Jan 29, 2020
1 parent 798156e commit 046eeb2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/writing-a-locustfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,13 @@ Order of events

Since many setup and cleanup operations are dependent on each other, here is the order which they are run:

1. Locust setup
2. TaskSet setup
3. TaskSet on_start
1. Locust setup (once)
2. TaskSet setup (once)
3. TaskSet on_start (once per locust)
4. TaskSet tasks...
5. TaskSet on_stop
6. TaskSet teardown
7. Locust teardown
5. TaskSet on_stop (once per locust)
6. TaskSet teardown (once)
7. Locust teardown (once)

In general, the setup and teardown methods should be complementary.

Expand Down

0 comments on commit 046eeb2

Please sign in to comment.