jmeterperformance-testing

If tear down thread group always runs then why the option is present as a checkbox under Test Plan in Jmeter


I see this option Run tear down thread groups after shut down of main threads. But if i add a tear down thread group under my test plan and configure a simple http request then i see that is always runs irrespective of whether the checkbox is checked or not under the test plan. So what is purpose of this checkbox under the Test Plan. Also can somebody put more light whether the tear down thread group will always run if present in the test plan or not. I am getting contradictory answers from various blogs.


Solution

  • As per tearDown Thread Group 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.

    If you stop your test run in the middle manually:

    In case you need to better understand what JMeter is doing enable JMeter debug logging and take a look at jmeter.log file, you should see what's going on under the hood.