Forum Discussion
Hi,
Am trying to run groovy script step that internally executes REST test step based on the provided input data (reads from excel), here am trying to fail the test case in the groovy step based on the returned assertion status using testRunner.fail() this works properly while executing only the groovy test step but if I run through the whole test case it's not iterating and struck in the second iteration Any idea to solve this ?
Have you checked the test case basic options for your test case that contains the test step in question? In particular the "Fail Test Case on Error" option.
- solai8 years agoNew Contributor
Yes that one is unchecked
- smadji8 years agoContributor
I have a similar case and this is what I do:
The groovy starts by calling the rest call (in my case its 3 steps on their own test suite at the end of my suite). They run and validate whatever they validate - for example that the company is in the DB. the last step returns a global property (at the project level) with value 1 or 0
Now back to the groovy, after it executes the rest calls suite it has a delay to let them run (they go to 3rd party)
Following that - I have an assertion that the value in the global property is '1'. If its 0 - I output that the company doesn't exists. If its 1 I get success and move on to the following step
Related Content
- 2 years ago
- 2 years ago