Contributions
Re: Mismatch between response from a CURL request and ReadyAPI response
In ReadyAPI, you show a screenshot of the request, after you have clicked 'Send' and got the response, have a look at the Raw tab next to the Request tab. The contents of the raw tab show exactly what ReadyAPI passed to the service, but it is only populated after Send is clicked. You might be able to spot what is different by comparing Raw request to your Curl request. In ReadyAPI, it looks like you're passing {id}, could that be the difference?5Views0likes0CommentsRe: readyapi groovy script library
In your script, wherever you see project.getContext().report.getTestSuiteResultList() try log.info(project.getContext().report); or log.info(project.getContext().report.getClass()); SOmething like that may give you the full class name so you can look in the guide2 months agoPlace ReadyAPI QuestionsReadyAPI Questions30Views1like0CommentsRe: readyapi groovy script library
The ReadyAPI/SoapUI Classes are actually Java, not Groovy. Pedantic comment out of the way, try here... https://www.soapui.org/apidocs/5.5.0/index.html?com/eviware/soapui/support/components/package-summary.html2 months agoPlace ReadyAPI QuestionsReadyAPI Questions80Views0likes1CommentRe: Boolean check
Hi, The use case is from a previous question... https://community.smartbear.com/discussions/readyapi-questions/assertions/262648/Assertions | SmartBear Community In ArmyGrads Groovy snippet, the assertion isn't required for the use case. But I can see why Rao added it for his demo to show that the value can be found. For ArmyGrads example to work, you need use Get Data to pull in the required value from the datasource step and assign it the var datasourceBook1 prior to the IF statement. Something like... def datasourceBook1 = context.expand( '${CustomerDataSource#Book1}' ); Then you should both the response value and datasource values.3 months agoPlace ReadyAPI QuestionsReadyAPI Questions10Views0likes0CommentsRe: Boolean check
Hi, The result in quotes was part of a solution from another Q last week. The Groovy check returns a String, which in turn is persisted in a Datasink step. This part of the solution was not to assert as fail stops the test. Instead, this part was to report all passes and fails.3 months agoPlace ReadyAPI QuestionsReadyAPI Questions28Views0likes0CommentsRe: Assertions
You're almost there.... Branch in brackets is undeclared, that's one issue. The other issue is that you're not pulling in the value from the test request response. You want to ensure that some value/node in your test request response matches some datasource value. You have the datasource value in the variable datasourceDiary. You need the one from the response. Use 'Get Data' to get the value of interest from the test request response. If you call it 'valueFromResponse', then the IF would look like... if (datasourceDiaryRequest.contains(valueFromResponse) ) { The contains thing is a method that checks one string contains another. E.g. "my source string".contains("source") //returns true "my source string".contains("cat") // returns false3 months agoPlace ReadyAPI QuestionsReadyAPI Questions15Views0likes0CommentsRe: Assertions
Hi, Yes, it would be something like that. But, do use 'Get Data' to do the thinking for you. No trial and error, just select the nugget of interest and away you go. I've said it elsewhere, but Data Driven tests and Get Data are two of the most useful features in ReadyAPI.3 months agoPlace ReadyAPI QuestionsReadyAPI Questions15Views0likes0Comments