Forum Discussion
This sounds a bit odd, I tried a simple rest request test step, with a GET request, and then added a Groovy test step after it with the following code:
testRunner.getResults().each() { result -> assert result.hasResponse() log.info(result.getResponse().getTimeTaken()) }
Now here's the odd thing when my REST request test step has no assertions, all was OK, but once I added an assertion (a simple "Valid HTTP Status Code" one) I then see the behaviour you describe, albeit via hasResponse() returning false (even having disabled assertions seemed to cause the issue).
This doesn't sound right I think I would raise a support call with Smartbear, at this link:
https://support.smartbear.com/product-list/
Please post back with any details Smartbear provide. Note: I am using Ready API 1.7 I had a quick look at the release notes to see if a later version had a fix, but couldn't see anything similar.
As a side note, when I added a Script assertion to the REST request with:
assert messageExchange.hasResponse() log.info(messageExchange.getResponse().getTimeTaken())
It seamed to work correctly.
- AdamDavisNant8 years agoOccasional Contributor
Redford.....Nice catch!! I removed (deleted, disabling doesn't work) the assertion on the REST call and my script worked.
I'll send this over to support and come back when I hear back from them.
- AdamDavisNant8 years agoOccasional Contributor
Just wanted to follow up since it's been about a week. I opened Case #0023601. Someone replied back that they would reproduce and get back to me, but I'm still waiting to hear back.
- AdamDavisNant8 years agoOccasional Contributor
I heard back from support. the issues is no longer seen in 1.9.0 maintenance builds. If you see this error you can download that. I asked when the 1.9.0 build will be available to the public but have not heard back yet. Hope this helps everyone.
Related Content
- 9 months agoswagcoder
- 2 years agomikefrank1
- 2 years agoDavid91