|
Title: Groovy script executed up to the end after a testRunner.gotoStepByName(someStep) Post by: mermet on December 20, 2007, 03:52:46 pm Hi, I'm observing that a Groovy script is executed up to the end even after a testRunner.gotoStepByName(someStep);
If there an efficient way to return from a Groovy script after a testRunner.gotoStepByName() call ? return ? Or the only way is if() else ? Thanks and merry Christmas ! if ( requestId.equals(contextRequestId) == false ) { log.info ("ERROR: received RequestId value '" + requestId + "' does NOT match RequestId value in Context '" + contextRequestId + "'"); // Protect the Test Case against out dated or unrelated Notifications //testRunner.fail("Blabla"); log.info ("Ignoring Notification for RequestId '" + requestId + "'. Returning to step Notification Request..."); // Transfers execution of this TestRunner to the TestStep with the specified name in the TestCase testRunner.gotoStepByName("Notification Request"); } This code is always executed: log.info ("Received RequestId value '" + requestId + "' matching RequestId value in Context '" + contextRequestId + "'"); Title: Re: Groovy script executed up to the end after a testRunner.gotoStepByName(someS Post by: omatzura on December 20, 2007, 09:02:57 pm Hi!
you should be able to just do a return to exit the script. Hope this helps... regards, /Ole eviware.com |