Stopping test case if it's successful

I would like to create a condition to stop my test case with success.

For example :
if (a = 2) {
Stop here the test case with success

I know it’s possible to stop the test case with an error using KeywordUtil.markPassed(). But the opposite ?
The aim is to avoid to integrate all my actions in a only condition and lose the view of actions in the manual interface.

Thank you for your help :slight_smile:


to terminate whole test script, you can use return keyword.

int a = 2

if(a == 2) {

println "This is unreachable code."
1 Like

Perfect ! It’s exactly that. Thank you !