We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We have a test where we would like to check that a message is correctly set.
The assertion is the following:
assertions:
The assertion fails with:
Single quotes or Double quotes produce the same result. Escaping the ':' as well.
The text was updated successfully, but these errors were encountered:
The problem is that yaml processing is analyzing 'Missing parameter: name' as a mapping! I had the same issue the solution is to use:
'Missing parameter: name'
'result.bodyjson.message ShouldContain "Missing parameter: name"'
instead of:
result.bodyjson.message ShouldContain 'Missing parameter: name'
Sorry, something went wrong.
I had the same issue. Here is a highlighted version of the explanation.
Doesn't work:
- type: http method: POST url: "my/url" assertions: - result.statuscode ShouldEqual 400 - result.bodyjson.message ShouldEqual "Missing parameter: name"
Works:
- type: http method: POST url: "my/url" assertions: - result.statuscode ShouldEqual 400 - 'result.bodyjson.message ShouldEqual "Missing parameter: name"'
Just wrap the whole assertion with quotes and it's good 👍
cf. @matcornic response.
No branches or pull requests
We have a test where we would like to check that a message is correctly set.
The assertion is the following:
assertions:
The assertion fails with:
--
Single quotes or Double quotes produce the same result. Escaping the ':' as well.
The text was updated successfully, but these errors were encountered: