1
votes

I am using Jmeter 5.1 and Windows 10. In my test plan I have main thread and tear down thread and I am running this across two Jmeter slaves, In my test plan I have selected execute the teardown threads only after shutdown of main thread group, it works but it only works to that slave, it doesn't look for other slaves was it still running the main threads or not?. Could you please tell me a way, I need to execute the tear down thread group only after shutting down of all the main thread groups in all the slaves.

Please help.

Thanks, Rafiq

2

2 Answers

2
votes

This happens as slaves are confined to the JVM where it runs. A copy of test plan is shared with the salves (servers) and they are executed independently and send test result to the client.

You may create a token MAIN_TEST_COMPLETED in a share file accessible by the slaves and check the status of the token before executing the TearDown Thread Group. While controller can be used to wait till the main threads are completed.

Hope this is useful for your requirement.

0
votes

I used another way, I created one more script and added the first script and second script execution through command prompt so that when the first script is done than the second command will be executed and it executes the test script which is the tear down part. For Example, I created a bat script like the one specified below and that solves the problem

jmeter -n -t mainscript.jmx -l result.jtl -r
jmeter -n -t teardownplan.jmx -l teardownresult.jtl -r