How to test error codes with swagger and dredd?
问题 Any Idea how the rest api error codes can be tested with Dredd in combination with swagger .yaml file? Is there a best practice how to test all the different errors for the paths? Example: Path /task/{id} can have 3 type of responses: 200 -> OK 404 -> Task not found 403 -> Forbidden(not your task) Is it possible to test all 3 "workflows" for this path with swagger / dredd? 回答1: It is possible with hooks. See the Choosing HTTP Transactions and Multiple Requests and Responses sections in Dredd