Contributions
Re: How to execute same test step again until the condition is satisfied
Hi Karel, thanks for your reply. I tried using groovy script and I am getting this error-groovy.lang.MissingPropertyException: No such property: java for class: Script4 error at line: 7 Scrpit: import groovy.json.JsonSlurper //def loopProperties = testRunner.runTestStepByName("REST Request") //def count =Integer.parseInt (testRunner.testCase.testSuite.getPropertyValue( "availableEvStationCount" )) def availableEvStationCount= testRunner.testCase.getPropertyValue( java.lang.string("availableEvStationCount") ) testRunner.testCase.setPropertyValue("availableEvStationCount", "availableEvStationCount" ) //Integer count = scount as Integer if (availableEvStationCount<2) { Thread.sleep(5000) } else { testRunner.runTestStepByName("REST Request") } Could you please help.2 years agoPlace ReadyAPI QuestionsReadyAPI Questions628Views0likes1CommentHow to execute same test step again until the condition is satisfied
I have a situation where I need to check a field in the API response. It changes after every 5 minutes, so need to trigger the API, check the response , if it has not reached the expected value, again check it after 5 minutes. Is there a way to do it? I tried it through data source loop, with property wait, but it stops the execution on the first failure and does not trigger the api again. Any help would be highly appreciated.719Views0likes3Comments