Showing results for 
Search instead for 
Did you mean: 

The capability to abort entire test execution through groovy

The capability to abort entire test execution through groovy

It would be beneficial to be able to abort an entire test execution gracefully through groovy.


In my case I have an async operation that I kick off, delay a small period, check the status then iterate around that for a defined number of retries before deeming it a pass/fail.


In certain cases it does not make sense for me to continue the test suite/entire test run in certain circumstances and I'd like to be able to issue an abort through groovy in this situation.


Hopefully feature request gains traction with community.

Thanks in advance.


Community Hero

I can definitely see the use in this, that if a certain condition is met to be able to automatically stop the tests. This could be a really useful feature available to trigger via groovy. 

Super Contributor

If its groovy does it need to be a feature request or can we just come up with a solution.


Community Hero

There is no solution currently available even with groovy, @sanj. There's no way to tap into the API of ReadyAPI itself to stop executions. In the original thread, this was confirmed with ReadyAPI engineers. Smiley Happy 

Super Contributor

@msiadak Thanks for the confirmation Smiley Happy

Since that is indeed the case then agreed




Have you tried the following code:

testRunner.cancel( "I'm getting tired" )

if you want to fail it use "It didn't work" )


Hi @GillerM I'm afraid that only cancels or fails the current test case in operation and resumes with the next testcase. My desire is to abort the entire execution of ALL testcases which this does not work.