Search code examples
jmeterjmeter-plugins

Can we re-call another Thread Group if the existing thread Group throw error in jmeter


Due to the limitation of Test Users Ids, we were only running the test with 3 Test Ids, these Test Ids can have max 1 session, if we login manually on another browser or machine it will kill the existing session.

Based on this limitation, I used Setup Thread Group to login, Teardown Thread Group for Logout and Thread group where I searched a few Items. On this Thread Group, I was successfully able to execute 20 users Load test where users were searching items and I was able to achieve the throughput target, even though the users' login session was 3, but problems occurred after 20 min of test when a session of Test user ids expire and Thread Group starting giving error.

My requirement is to run a load test for 1 hr with 20 user load on Thread Group, is it possible to recall setup Thread group so that I can achieve my requirement or if you have any other approach please suggest.


Solution

  • Theoretically it's possible to use Inter-Thread Communication Plugin to conditionally call something in another Thread Group, but I don't think setUp Thread Group is a good candidate because it's executed before the main Thread Group.

    It worth switching to "normal" Thread Group and the easiest solution would be just letting it run continuously and re-login each 19 minutes so the session would be "refreshed", the delay can be introduced using Constant Timer of Flow Control Action sampler.

    In the main Thread Group you can either introduce some "Startup delay" in order to let the first Thread Group to login:

    enter image description here

    or use the aforementioned Inter-Thread Communication Plugin if you need to start main threads right after logging in without any extra delay