Forum Discussion

Logica_Norway's avatar
Occasional Contributor
15 years ago

divide thread count among 3 test steps configred for load test


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

  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    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);