Groovy to run a specific test step and then abort the test case
In one of my re-usable test case I have 5 steps(requests) and I want to write a groovy step (in the same test case) which should read the property and based on its value should run one of the available 5 steps and ignore rest of them.
Basically dynamically pick and run a test step and then abort the test case.
Thanks in advance for help.
Solved! Go to Solution.
testRunner.cancel("just stop the testCase")
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.
Thanks for the response but I just realized (after using your solution) that I forgot to mention that I am using a session start step before this groovy step and to run any specific test case through groovy I also have to pass on the session.
And the problem is I am not able to pass on the session using groovy.
Here is the test case structure:
Step #1 Session Start
Step#2 Groovy to run a specific test step among next 5 steps (Test1...Test5)