dredd

How to test error codes with swagger and dredd?

最后都变了- 提交于 2020-01-25 03:55:42
问题 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

npm - Questions about the arguments of the command lines of installed node modules

自作多情 提交于 2019-12-08 06:11:32
问题 This question might not be related to npm specifically, but more about command lines in general. I have installed Dredd (https://github.com/apiaryio/dredd) and I am trying to execute a command that needs to look like this: dredd <path to blueprint> <api_endpoint> [OPTIONS] Do the first two arguments need to be strings (wrapped with quotes)? If I want to pass an output option with -o (or --output), Dredd specifies it needs to be an array. How do I pass an array in command line? I have tried