JMeter: What is the purpose of tearDown Thread Group JMeter: What is the purpose of tearDown Thread Group multithreading multithreading

JMeter: What is the purpose of tearDown Thread Group


As per help given by JMeter Tear Down Threadgroup,

A special type of ThreadGroup that can be utilized to perform Post-Test Actions. The behavior of these threads is exactly like a normal Thread Group element. The difference is that these type of threads execute after the test has finished executing its regular Thread Groups.

In simple words, This thread group is used to perform actions which are done/necessary after performing tests. i.e post testing actions. This thread group will execute after normal thread group has finished execution.

This thread group can be used in scenarios which needs to perform some actions after test execution. Simple examples could be, sending reset requests to server, some warm down requests to severs or some config changes or client side execution.

Ex. After execution of my test If I want to delete a user which I have created only for test. Thus I can send request of deleteuser in teardown threadgroup. Another example could be, If after the test I want to some reporting stuff on response data, then you can add sample java code (beanshell processor) in tear down threadgroup and perform the operation.

Keep in mind that operation can be anything, a server request or a DB request or a sample java code etc. Condition is, it should be done after your test execution.