I have a teardown element in JMeter which cleans up some test data. It currently runs after the actual test. However, if I notice some failures and stop the suite, then the clean up is not performed and I need to do it manually. Is there any way to configure JMeter to do tearDown before getting stopped?
Asked
Active
Viewed 910 times
1
-
2just put cleanup to be done at the beginning of the test. – timbre timbre Jun 02 '16 at 21:23
-
I cannot, because it would delete the data needed by the test. – user998692 Jun 03 '16 at 21:32
1 Answers
2
There is an emphasized paragraph in the jMeter tearDown documentation:
Note that by default it won't run if Test is gracefully shutdown, if you want to make it run in this case, ensure you check option "Run tearDown Thread Groups after shutdown of main threads" on Test Plan element. If Test Plan is stopped, tearDown will not run even if option is checked.
So I suppose you can't run the tearDown ThreadGroup automatically, if you stop the test (see also here).