Dredd skips non-2xx responses for OpenAPI 2:
A similar behavior should be implemented for OpenAPI 3 as well. Currently the code only deals with OpenAPI 2.
Do I get it correctly that it's about extending this conditional skipping in TransactionRunner?
Can we assert that the API description document is OpenAPI 3 by checking:
openapi: "3.0.0"
We'd need to see what toTransactions returns:
I'd say the steps are:
transaction.apiDescription.mediaType should give you relevant media type for the OpenAPI 3 (a different one, not containing swagger, that's why it probably doesn't work correctly now). See the OAS3 adapter code.The underlying problem this tries to solve is that OpenAPI 2 generates transactions in big amounts (especially through produces and consumes) and a lot of them might be for 4xx status codes. People usually don't want to test those, or in other words, they usually cannot be tested out of the box, without hooks. That's why Dredd skips non-2xx transactions by default and lets users to unskip them in hooks. That's as close to the behavior most of the people would expect out of the box as possible.
Dredd seems to be working fairly well for OAS3 for me, except for this issue (so far). I've started a PR which gets things working for OAS3: https://github.com/apiaryio/dredd/pull/1885