Questions tagged [dredd]

Dredd is a command-line tool for testing API documentation written in API Blueprint format against its backend implementation.

From the github page of dredd:

Dredd is a command-line tool for testing API documentation written in API Blueprint format against its backend implementation. With Dredd you can easily plug your API documentation into the Continous Integration system like Travis CI or Jenkins and have API documentation up-to-date, all the time. Dredd uses the Gavel for judging if a particular API response is valid or if is not. If you are curious about how decisions are made, please refer to Gavel's behavior specification.

62 questions
1
vote
1 answer

Openapi3 and CSV response (for Dredd)

I test my Api with DREDD against it's specification (written in Openapi3 considering, painfull limitations of Support by Dredd considered). No I have one endpoint, which produces CSV-data if the Accept-header is set so. '/my-endpoint': …
Paflow
  • 2,030
  • 3
  • 30
  • 50
1
vote
1 answer

replace ID in path dredd hooks

I have this dredd.yml config file: paths: "/network": get: produces: - application/json;charset=utf-8 responses: '200': description: Ok schema: "$ref":…
DevOps man
  • 15
  • 6
1
vote
1 answer

Dredd - How to modify test result based on http status code?

I am developing an API, using apiary.io and Swagger. I want to test the API using dredd, and for normal API responses (HTTP status code 200) this is fine. However, when the API returns different status code based on parameters (e.g. 403), dredd…
pkExec
  • 1,752
  • 1
  • 20
  • 39
1
vote
0 answers

Dredd - Getting error when parsing swagger file 'API description parser warning in'

I've recently upgraded Dredd from version 4.8 to 8+, and started getting the dozens of theses errors when Dredd attempts to parse the Swagger and generate the transaction request body. Each error is about a different row in the swagger file. warn:…
David Faizulaev
  • 4,651
  • 21
  • 74
  • 124
1
vote
1 answer

How to provide separate examples for each HTTP status code?

I run into problem while trying to instruct Dredd to issue a different requests to trigger two distinct scenarios: success with code 201 and failure with code 400. I tried to setup a separate example per HTTP status code but couldn't manage to do…
lessless
  • 23
  • 1
  • 5
1
vote
2 answers

How to make local library available as a installed module on Node.js

Have a look at Dredd, for example, it makes the library Hooks available when you are running a script with the dreddcommand. Command line $ dredd [...] --hookfiles=./hooks.js hooks.js const hooks = require('hooks'); ... How does it work?
Victor Ferreira
  • 6,151
  • 13
  • 64
  • 120
1
vote
1 answer

Validate OpenAPI response with dredd

I have an OpenAPI v3 specification file with the following (showing just fragments): paths: /global/name: get: description: Some description tags: - Global settings operationId: getGlobalSettingsName responses: #…
y.luis.rojo
  • 1,794
  • 4
  • 22
  • 41
1
vote
1 answer

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 ->…
Waldemar
  • 105
  • 1
  • 11
1
vote
1 answer

dredd is expecting example of parameter in swagger json

I made my first swagger api spec and dredd gave error: error: Compilation error in file '../../docs/swagger.json': Required URI parameter 'id_person' has no example or default value. (person > /person/{id_person} > Updates a already existing person…
thevikas
  • 1,618
  • 1
  • 14
  • 31
1
vote
1 answer

How to pass URI parameters in Dredd

I'm new to Dredd and wanted to run the uber.yaml found here. However, I keep running into the following error(s): info: Configuration './dredd.yml' found, ignoring other arguments. error: Compilation error in file 'uber.yaml': Required URI parameter…
Mosinel
  • 155
  • 1
  • 9
1
vote
1 answer

API Blueprint and Dredd - Required field missing from response, but tests still pass

I am using a combination of API Blueprint and Dredd to test an API my application is dependent on. I am using attributes in API blueprint to define the structure of the response's body. Apparently I'm missing something though because the tests…
Alex Seifert
  • 113
  • 3
  • 14
1
vote
1 answer

How to specify Content-Type of all responses once in API Blueprint?

In order to satisfy Dredd, I have to write this for every response in my API Blueprint document: + Response 201 (application/json; charset=utf-8) Is there a way to specify the media type ((application/json; charset=utf-8)) once, globally, for every…
Ilya Vassilevsky
  • 981
  • 6
  • 14
1
vote
1 answer

Unexcepted failed Gavel/Dredd test

Can anyone help me figure out why this Dredd test fails? It looks fine to me: fail: GET /device/2/battery duration: 260ms fail: body: Real and expected data does not match. request: body: headers: User-Agent: Dredd/0.6.0 (Darwin 14.3.0;…
chrislondon
  • 12,487
  • 5
  • 26
  • 65
1
vote
2 answers

How to install Apiaryio Drafter on Windows 8?

I wanted to install apiaryio/drafter on windows. I installed python 2.7 and visuall studio 12 "Full version". It needed to add some folders to system path because of not finding some files like "mspdb110.dll". But the latest problem related to…
MJBZA
  • 4,796
  • 8
  • 48
  • 97
1
vote
1 answer

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

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
user1834464