abhishek813
14 years agoFrequent Contributor
If-Else for load test
I have to execute a load test in Soapui where the number of threads keep increasing at a predefined time interval, say +1 every 10 seconds then after a certain time interval they remain constant for an hour and then there is a ramp down i.e. -1 every 10 secs
I am trying to use a simple IF condition for ramp up and ramp down time to return thread count, but it never goes to the 3rd condition.
When i execute the script, it executes for 1st and 2nd condition but never goes to 3rd condition.
If i remove 2nd IF, it does reach the 3rd condition. Please suggest.
I tried removing ELSE
def a = loadTestRunner.getRunningThreadCount()
if (timePassed < 5000){
return (a+1)
}
else if (timePassed >= 5000 || timePassed <= 9000){
return a
}
else if (timePassed > 9000){
return (a-1)
}
I am trying to use a simple IF condition for ramp up and ramp down time to return thread count, but it never goes to the 3rd condition.
When i execute the script, it executes for 1st and 2nd condition but never goes to 3rd condition.
If i remove 2nd IF, it does reach the 3rd condition. Please suggest.
I tried removing ELSE
def a = loadTestRunner.getRunningThreadCount()
if (timePassed < 5000){
return (a+1)
}
else if (timePassed >= 5000 || timePassed <= 9000){
return a
}
else if (timePassed > 9000){
return (a-1)
}