Forum Discussion
Can you also show how you are doing it for test case currently (script + test case screen shot with steps) would help better.
- saprao8 years agoOccasional Contributor
Hi Rao,
My use case is validate whether service is up and running or not in run time then continue to execute the remain test cases in test suite level.
Ex: My test suite contains 3 or more test cases(Operations) and execute all the operations in test suite level.
if first operation soap response is valid then execute all the operation otherwise stop the execution.
Above scenario i did on test case level then it was stopped one operation but it wouldn't stop the remaining operations.
Below script i have written in one of the test case then it was stopped one operation successfully but it is continue to execution to other test cases
if(assertion.assertable.getAssertionByName("SOAP Response").assertionStatus.toString() == "FAILED") {
for( e in assertion.errors ) {
def Val_Prop_Message=e.message.toString();
//log.info "Message" + Val_Prop_Message;
tc.setPropertyValue("Validation1",Val_Prop_Message);
tc.setPropertyValue("Description1","**Services is down **"); } }
else if(assertion.assertable.getAssertionByName("SOAP Response").assertionStatus.toString() == "VALID" ) { tc.setPropertyValue("Validation1","**Services is down **");
tc.setPropertyValue("Description1"," ");
testRunner.cancel(); /* test case level*/ }
Now, I need to stop the entire execution if soap response failed.
Thanks