Load Testing · Junior · Question 73 of 75
What does teardown() in k6 do?
- 1Removes the results file after the summary is printed
- 2Runs once after all VUs finish, e.g. to clean up test data
- 3Stops a single VU when it encounters an error
Show the answer
Correct answer: Runs once after all VUs finish, e.g. to clean up test data
Explanation
teardown() receives the data from setup(). It is the place to delete users or orders the test created.