Contributions
Naming conventions of the text reports generated by testrunner command line.
Hi, I have a functional test suite which is scheduled to run at different times of a day with the help of windows scheduler and testrunner command line execution. The problem is the old reports are overwritten by the new reports. I need to have all the generated reports. Is there any way to control the testrunner not to overwrite the existing reports? Below is my execution testrunner.bat -a -r "D:\Webservices\ApiRegressionTesting-soapui-project.xml" -f"D:\APIreports\Reports"Solved1.5KViews0likes3CommentsRe: REST - Script Assertion fails due to square brackets in Json response.
Thanks Sanj. Its an array and using [0] works. I modified the coded as below. import groovy.json.JsonSlurper def response = messageExchange.response.responseContent def textresponse = new JsonSlurper().parseText(response) Actual = textresponse.BankAccount.FirstHolder[0] assert "Myname" == Actual"2.4KViews0likes0CommentsREST - Script Assertion fails due to square brackets in Json response.
I'm trying to do a script assertion for my project, I need to check the FirstHolder name matches with the expected name. I'm using the below code. import groovy.json.JsonSlurper def response = messageExchange.response.responseContent def textresponse = new JsonSlurper().parseText(response) Actual = textresponse.BankAccount.FirstHolder assert "Myname" == Actual" The problem I'm facing here is both the names Myname and the name store inside Actual are same, but the assertion is getting failed. First,I found is the content stored inside the Actual is coming as [MyName] while doing log.info but my expected is MyName. Second, I tried like this assert "[MyName]" == Actual, but its also failed. Third,I tried saving Myname in the testcase custom properties and assesing it using context but again failed. I'm stuck here, needed help asap. I think the response coming with brackets is the problem, but how to extract it without brackets?Solved2.4KViews0likes2Comments