Forum Discussion
- SmartBear_SuppoSmartBear Alumni (Retired)Hello,
Can you provide us how did you set assertions and what is raw request/response ?
robert
/SmartBear - latham187Occasional ContributorThe raw response is:
HTTP/1.1 204 No Content
Connection: close
Date: Wed, 21 Sep 2011 21:06:27 GMT
Content-Length: 0
X-Powered-By: Servlet/2.5 JSP/2.1
I tried both invalid and valid http status code assertion types and both fail when this response is returned. I am expecting this to pass one way or the other. - RJanecekRegular Contributoryou can add script assertion to assert header. Here I expecting 405:
def header = context.currentStep.getHttpRequest().getResponse().properties["responseHeaders"]
assert header["#status#"].toString().contains("405 Method Not Allowed") - latham187Occasional ContributorWorks like a charm!
Thanks RJanecek! - RJanecekRegular Contributorthis isnt charm, this is groovy
you are welcome - SmartBear_SuppoSmartBear Alumni (Retired)
RJanecek wrote: this isnt charm, this is groovy
you are welcome
Haha
/Henrik
Related Content
- 3 years ago
- 2 years ago
Recent Discussions
- 8 days ago