Forum Discussion
Would you mind showing the code snippet and where you think in the code could be a problem?
Hi nmrao,
I added a snippet of my class LoadTest.
So, the issue is that when I create a loadTest with my class and then make it run, I have to make it run 3 times so that the REST endpoint uses unique ID's. As you can see I add a Groovy script as a TestStep to the TestCase, which is supposed to run before the REST endpoint so that the ID's are all unique. I managed to go around this and make it work, but I have to make the loadTest run two more times than it should.
You can see in this if, I basically say if the limitType is Runs per Threads (which is what I need) add 2 to the testLimit. So, if i want to make it run one time, I have to actually run it 3 times to make the ID's unique.
if (limitType == 3){
testLimit = testLimit + 2;
}
Thank you, and let me know if need any more information or to clear things up more!
-Andres
Related Content
Recent Discussions
- 15 years ago