You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be quite useful to have possibility to do regular expression on whole response body returning for server side. Here is my case:
io.codearte.accurest.dsl.GroovyDsl.make {
request {
method('POST')
url(PATH)
headers {
header("Content-Type": FORM_CONTENT_TYPE)
}
body(
"""field=${value(client("something"), server("else"))}"""
)
}
response {
status 400
body (value(client("Processing failed with 400 status."), server(regex(".*400.*"))))
}
}
I want to return 400 in a body of the client stub. And that's ok actually. On the other hand for server tests I'm able to generate such status by sending malformed request. In this case body will contain some standard HTML with 400 added somewhere in between. Regex in such case will free me from pasting whole HTML in stub definition.
The text was updated successfully, but these errors were encountered:
mchmielarz
changed the title
No support for reqexp on whole response body
No support for reqex on whole response body
Feb 24, 2016
mchmielarz
changed the title
No support for reqex on whole response body
No support for reqex on whole server's response body
Feb 24, 2016
It would be quite useful to have possibility to do regular expression on whole response body returning for server side. Here is my case:
I want to return
400
in a body of the client stub. And that's ok actually. On the other hand for server tests I'm able to generate such status by sending malformed request. In this case body will contain some standard HTML with400
added somewhere in between. Regex in such case will free me from pasting whole HTML in stub definition.The text was updated successfully, but these errors were encountered: