Teltstra_Corpor
14 years agoOccasional Contributor
Continue Assertions in Groovy Step when one assertion fails
We are using SoapUI Pro with Test Cases where we write assertions inside Groovy Steps.
Test Step: Groovy Script Step
//Assertion 1
def ProductOfferingCode = context.expand(...something...)
assert ProductOfferingCode == 'something'
//Assertion 2
def productOfferingSource = context.expand(...something...)
assert productOfferingSource == 'something'
//Assertion 3
def isSubscription = context.expand(...something...)
assert isSubscription == 'something'
When Assertion 1 fails, SoapUI Pro will "Exit" the Groovy Step, and go to next step in Test Case.
How can I force SoapUI to continue with Assertion 2 and Assertion 3, even when Assertion 1 fails.
Also, I already know about the "Abort on Error" option, which continues to the next step when one step fails. But what I need is to continue with other assertions in the same Groovy step.
Regards,
Jatin Kumar
Test Step: Groovy Script Step
//Assertion 1
def ProductOfferingCode = context.expand(...something...)
assert ProductOfferingCode == 'something'
//Assertion 2
def productOfferingSource = context.expand(...something...)
assert productOfferingSource == 'something'
//Assertion 3
def isSubscription = context.expand(...something...)
assert isSubscription == 'something'
When Assertion 1 fails, SoapUI Pro will "Exit" the Groovy Step, and go to next step in Test Case.
How can I force SoapUI to continue with Assertion 2 and Assertion 3, even when Assertion 1 fails.
Also, I already know about the "Abort on Error" option, which continues to the next step when one step fails. But what I need is to continue with other assertions in the same Groovy step.
Regards,
Jatin Kumar