Forum Discussion
nmrao
6 years agoChampion Level 3
Can't it possible to request the service provider to make it change?
- richie6 years agoCommunity HeroHey Rao,
Nah...it's an external 3rd party's webservice. :(
Cheers,
Rich- nmrao6 years agoChampion Level 33rd Party services? So what, if there is defect or issue arises, it must be addressed. Not sure what is obstructing not to make a request.
- JustinM896 years agoContributor
If you don't mind doing assertions through code, you could use JsonSlurper to take the response string and make it into an object like:
import groovy.json.JsonSlurper String responseStr = "" // wherever you get the response from def response = new JsonSlurper().parseText(responseStr)
// Perform assertions here (just making this stuff up)
assert response.employees[0].id == 12345
response.employees.each {
assert it.salary > 0
}Provided you're not trying to assert on some crazy complex stuff, this could work.
Related Content
Recent Discussions
- 19 days ago