Forum Discussion

liche's avatar
liche
Occasional Contributor
12 years ago

Scripting : goto End of the step/next step intantly

Hi all,
I'm trying to find a way to go to the end of the groovy scripting step or to next step.

For example:
some scripting
if (var1 = "KO") {
//....
//Exit the current step and go to next step immediatly
}


I used :
testRunner.gotoStepByName( "nameofNextStep" ) => but this starts nextstep at the end the execution of the current step
testRunner.runTestStepByName( "nameofNextStep" ) => but this starts nextstep in parallel to the current step

If you have any idea, thank you in advance for you help.

PS:the aim is to manage exception (catch it, log and end the step to go to the next one)

5 Replies

  • liche's avatar
    liche
    Occasional Contributor
    Hi siking,
    I have several step.
    - GroovyStep1
    - Step2

    I need to end the treatment in GroovyStep1 if there is an error without ending the Testsuite (go directly to the next one)
    I did not find a way to do that.
  • SiKing's avatar
    SiKing
    Community Expert
    Go to the test case options and uncheck "Abort on Error". Unfortunately there is no way to do this for all testcases, and you will need to do it one at a time ... or edit the soapui project file in some editor.
  • liche's avatar
    liche
    Occasional Contributor
    Ok thanks for your answer, because I was looking for that for a long time !
    I also unckeck "fail testCase if it has failed TestSteps"
  • SiKing's avatar
    SiKing
    Community Expert
    liche wrote:
    I also unckeck "fail testCase if it has failed TestSteps"

    That does something else! That means: the testcase will _always_ pass == the testcase will never fail.