-
Notifications
You must be signed in to change notification settings - Fork 280
Dredd does not output the title for a request in failure message #1326
Comments
I may be wrong, but it seems that named transaction should be stored in dredd/lib/compileTransactionName.js Lines 6 to 14 in fdb5e69
Unfortunately, it never comes with a value, even if using an API blueprint from above. Here's a trace for that data:
If @kylef could you please check if that nested property contains expected |
I don't know where {
"element": "httpRequest",
"meta": {
"title": {
"element": "string",
"content": "Transform API Blueprint with a warning into JSON API Elements without version"
}
},
"attributes": {
"method": {
"element": "string",
"content": "GET"
},
"headers": {
"element": "httpHeaders",
"content": [
{
"element": "member",
"content": {
"key": {
"element": "string",
"content": "Content-Type"
},
"value": {
"element": "string",
"content": "application/json"
}
}
}
]
}
}, # GET /
+ Request Transform API Blueprint with a warning into JSON API Elements without version (application/json)
{}
+ Response 200 (application/hal+json)
{} |
Yes, this is #294 from another side, boiling down to #227. Current transaction names do not contain request names from API Blueprint. The example is added in case of multiple request-response pairs: + Request
+ Response
+ Request
+ Response These would be |
Describe the bug
When looking at Dredd failures, it does not show the "title" of a request (transaction) so looking at a failure for an API Description where you have a lot of transactions which clear names, you cannot easily distinquish between them.
To Reproduce
Write an API Blueprint with named request/response pair, for example:
Run dredd against API where the expectation does not match (see below):
In my API Blueprint I have 20+ example request/response pairs for each transition and it is near imposible to tell which one caused the failure, especially without any source maps.
Expected behavior
When a response does not match the expectation, I am shown the transaction (request title).
What is in your
dredd.yml
?Not relevant.
What's your
dredd --version
output?$ dredd --version dredd v9.0.0 (Darwin 18.2.0; x64)
Does
dredd --loglevel=debug
uncover something?Not relevant
The text was updated successfully, but these errors were encountered: