cancel
Showing results for 
Search instead for 
Did you mean: 

divide thread count among 3 test steps configred for load test

Highlighted
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
Highlighted

Re: divide thread count among 3 test steps configred for load test

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


Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Occasional Contributor

Re: divide thread count among 3 test steps configred for load test

Hi

Thank you for the code

I got it

Thanks & Regards
Karthik M
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Compete with community members in the TechCorner Challenge and get into the Leaderboard!

Rank Participant Points Earned
1 msiadak 12
2 nmrao 8
3 HimanshuTayal 3
Top Kudoed Authors