Contributions
Need to generate new output xls file with time stamp for each run
Hi , Use case: Output results should not override into output xls sheet for every run and should create new output xls sheet with time stamp for every run. Can anyone have Groovy script for this use case. Please help it. Thanks.8 years agoPlace ReadyAPI QuestionsReadyAPI Questions550Views0likes1CommentRe: How to stop testSuite with many TestCases even if one test step in any testCase fails?
Hi, I have same query...please anyone help me. Same like above scenario my test suite contains with many test cases ... and validating one test step soap response assertion. if assertion is fails then stop then entire test suite. it is working fine for test case level but it' won't stop other test cases. Thanks3.9KViews0likes0CommentsRe: cancel test suite from groovy script
Hi , Can anyone help me,how to stop the test suite execution through Groovy when any assertion is fail in run time. I have seen above blog in the internet but it wouldn't worked out. context.getProperty( "#TestSuiteRunner#" ) In above statement, what value i need to pass. Thanks8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.9KViews0likes0CommentsRe: cancel test suite from groovy script
Hi , I have same query , i have to stop the entire testsuite through groovy when soap response assertion is fail. I am able to stop the execution in test case level by using testrunner.cancel(). I have seen this blog in smart bear for this query import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus def tsr = context.getProperty( "#TestSuiteRunner#" ) if( tsr != null ){ if( tsr.currentTestCase.getTestStepByName("My Request").assertionStatus==AssertionStatus.FAILED ){ tsr.cancel( "The assertion failed" ) } } can i know that what value need to pass to "#TestSuiteRunner# property.. . Thanks8 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes1CommentRe: what is method for stop testsuite execution in runtime through Groovy scripting
Kambil, Thanks for immediate reply. I have tried both the things it wouldn't stop the testsuite execution in runtime. testrunner.fail(); break; Note : Tried with testrunner.cancel().. it was stopped at test case level but it wouldn't stopped entire testsuite execution. Thanks8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.2KViews0likes2CommentsRe: what is method for stop testsuite execution in runtime through Groovy scripting
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 casethen 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","**Servicesis down**"); tc.setPropertyValue("Description1"," "); testRunner.cancel(); /* test case level*/ } Now, I need to stop the entire execution if soap response failed. Thanks8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.2KViews0likes5CommentsRe: what is method for stop testsuite execution in runtime through Groovy scripting
Basically, I need to validate whether services are up and running or not through Groovy. Ex : Assume my Test Suite contains 3 or more test cases(Operations) and executing all the operations in test suite level. If one service soap response is getting +ve then execute all the operations. Otherwise stop the execution entirely in test suite level Through below code it is stopping execution in test case level but continuing to next test case. 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","**Service Up and running**"); tc.setPropertyValue("Description1"," "); testRunner.cancel(); /* test case level*/ } Thanks8 years agoPlace ReadyAPI QuestionsReadyAPI Questions3.2KViews0likes6Comments