Forum Discussion

thedivxboy's avatar
thedivxboy
Occasional Contributor
16 years ago

Restarting a test case

Hi,

I'm using soapUI 2.5 beta1 (2008/09/26).

I have a test case with several steps that processes files from a folder.
I have created a groovy script step that loops to the begin of the test case for each file in the specified folder.

But if any step fail, the test case stop and the whole folder is not processed.
So I have written this in the TearDown script window of the test case:

if (new String(""+testRunner.getStatus())=="FINISHED") {
com.eviware.soapui.support.UISupport.showInfoMessage("List of tests performed successfully (applReqID's)\n" + context.getProperty("results"));
} else {
testRunner.testCase.getTestStepByName("Init").run(testRunner, context);
}


This works correctly but only the step "Init" is performed and not next steps ..
So I want to use
testRunner.gotoStepByName("Init");
but it doesn't works for tear down script ...

What's the solution ?


Thanks in advance,
Arnaud.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    hmm.. it looks ok to me.. does your jar get initialized by soapUI before it tries to initialize the listener? Maybe you can show the soapUI log after startup so I can see?

    regards!

    /Ole
    eviware.com
  • thedivxboy's avatar
    thedivxboy
    Occasional Contributor
    In fact my jar file was corrupt, now it's okay.
    But the listener doesn't works as expected ...

    if (result.getStatus()==TestStepStatus.FAILED) {
        UISupport.showInfoMessage("Go to step \"Loop to next properties file\"");
        testRunner.gotoStepByName("Loop to next properties file");
    }


    In case of a failed step the info message is correclty shown but the gotoStep instruction is not performed and the test case directly ends ...

    I don't understand why ...


    Thanks,

    Arnaud.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Arnaud,

    Have you unchecked the "Abort on Error" option in the TestCase Options dialog?

    regards,

    /Ole
    eviware.com
  • thedivxboy's avatar
    thedivxboy
    Occasional Contributor
    A big thanks to you
    I've just completed some weeks of searching and the result was to change a simple option ..

    Good continuation
    Arnaud.
  • Hi,

    Since i am also having the same issue and the scenario is exactly same as yours can u plz help me out what are the changes you have done so that i can do it accordingly

    Regards,
    Aparajita