Forum Discussion

ply's avatar
ply
Occasional Contributor
16 years ago

"on error GOTO x (logout)"

Hello,

With the testcase's options, I can say to Soapui for a testcase (so for all the steps in this testcase) : on error stop, or on error continue.

I would like to say : On error goto step x (where x will be a logout request, in order to to be "nice" with the server).

What is the simplest way to do that ?

PHL.

1 Reply

  • Hello,

    Sounds to me like you should be using a teardown script for this, as it will get executed even if the TestCase fails. For instance, if you have a logout TestStep already, I would disable it (right click > Disable TestStep) and then use the following teardown script (provided that the logout TestStep is named "Logout", othersize change that part of the script):


    testCase.testSteps['Logout'].run(testRunner, context)


    This script will run the Logut TestStep, which is why we disable the TestStep first, otherwise it would be run twice when the TestCase succeeds. You should also have the TestCase set to abort on error.

    Regards,
    Dain
    eviware.com