Ask a Question

divide thread count among 3 test steps configred for load test

Logica_Norway
Occasional Contributor

divide thread count among 3 test steps configred for load test

Hi

I am executiong a load test with  2 test steps i have total thread count of 3.
I want to make the thread 1,thread 3 only run the test step1 and
thread 0,thread 2  only run the test step2

can u help me in doing this

Thanks & Regards
Karthik M
2 REPLIES 2
SmartBear_Suppo
SmartBear Alumni (Retired)

Hi,

You can do that by disabling/enabling TestSteps based on the ThreadIndex in a groovy script...
Add a groovy TestStep before the two other TestSteps in the TestCase and do something like

if(context.ThreadIndex == 0 ) {
  testRunner.testCase.getTestStepByName("Step 1").setDisabled(true);
  testRunner.testCase.getTestStepByName("Step 2").setDisabled(false);
} else {
  testRunner.testCase.getTestStepByName("Step 1").setDisabled(false);
  testRunner.testCase.getTestStepByName("Step 2").setDisabled(true);
}


Regards,

/Dragica
eviware.com

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Logica_Norway
Occasional Contributor

Hi

Thank you for the code

I got it

Thanks & Regards
Karthik M
cancel
Showing results for 
Search instead for 
Did you mean: