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

Jenkins & dredd. "npm ERR! Failed at the protagonist@0.8.0 install script"

I'm trying to integrate dredd apiary tests into Jenkins. I followed these steps to install NodeJS, npm and dredd on Jenkins (on Linux): https://wiki.jenkins-ci.org/display/JENKINS/NodeJS+Plugin While running the test I got this ERR message: npm…
1
vote
1 answer

How to validate response with dredd?

I'm trying to check my api implementation with my documentation written in blueprint. I've expected that dredd will fail when json returned from server will be different than specified in documentation. To check this I've copied dredd-example. First…
piotrze
  • 479
  • 5
  • 14
0
votes
1 answer

Dredd verification response body and headers

I have similar openapi.yml spec file: openapi: 3.0.1 info: title: some title version: "4" paths: /users/{userId}/data: get: summary: some summary description: some description operationId:…
IvanMikhalka
  • 184
  • 10
0
votes
1 answer

How write the BOM-Character in an OpenAPI3-YAML Specification

In the OpenApi3-spec of my API I have an endpoint returning CSV-data. No my Dredd-Test fails although example and returned are exactly the same. I assume the problem that my API returns CSV with a BOM character. Now I have no idea How I can encode…
Paflow
  • 2,030
  • 3
  • 30
  • 50
0
votes
1 answer

Grape Swagger does not show up Example param

I'm using grape-swagger gem to produce swagger documentation for dredd. I have such params: params do requires :id, type: Integer, documentation: { x: { example: 1 } } end Grape swagger ignores example param. Instead of this: { "in": "path", …
slim1979
  • 28
  • 4
0
votes
1 answer

dredd fails to run with errors 'Data does not match any schemas from 'anyOf' and such more

Trying to run dredd on swagger documentation. Dredd fails with next errors: - error: API description parser error in /albums.json:266 (from line 266 column 10 to column 21): Data does not match any schemas from 'anyOf' - error: API description…
slim1979
  • 28
  • 4
0
votes
1 answer

Validating openapi 3.0 API description against backend implementation of the API in Loopback 4

I tried Dredd but it's not working with openapi spec 3.0 that is generated by Loopback 4 framework. I wanted to know what are the options available for this type of testing where I want to validate the openapi 3.0 API description against backend…
VISHAL DAGA
  • 4,132
  • 10
  • 47
  • 53
0
votes
1 answer

What is best practice to test error responses with Dredd?

I want to describe my existing API with openapi 3 and prove my description with dredd. I know openapi 3 implementation is experimental, but I don't use any of the elements which are not supported yet. This is part of my spec.yaml paths: /login: …
Paflow
  • 2,030
  • 3
  • 30
  • 50
0
votes
1 answer

Raise Warning in Hook?

Is it possible to raise a Warning message within a hook function? I can log a message with hook.log() but would like it to be properly handled as loglevel 'warning'. hooks.log("WARNING: Something unusual has happened")
TrickiDicki
  • 143
  • 2
  • 13
0
votes
1 answer

Dredd: Ruby-hooks: execute same hook for multiple requests

The problem I'm facing is: I have a request and need to check 3 types of responses for this request. Each time I need to slightly modify my request body before sending it. dredd --names: info: Users > User Operations > Update User > Example 1 skip:…
Dimu4
  • 213
  • 1
  • 4
  • 18
0
votes
1 answer

How to exclude a test from appearing in the documentation

I'm working with Dredd the HTTP API Testing Framework to test my backend apis. Well the idea is that each time you create a test case a documentation will be generated automatically which is a good practice to ensure that documentation is always up…
larnouch
  • 189
  • 1
  • 15
0
votes
1 answer

Dredd Apiary contract driven test - Is there any way to access private apiary documentation blueprint format from local dredd config?

I'm running contract driven development tests using dredd. I know how to configure dredd tests to run either against a local or remote server, given a blueprint apib file. Typically, the relevant fields in my dredd config file will read…
0
votes
1 answer

Swagger-Dredd: specifying more than one type for a parameter

I am trying to implement API testing in my project and i am using Dredd. Now some of my response parameters return 'null' value and that is okay according to logic. In my yml file, how do i specify that null can be a valid value apart from the…
nirav vyas
  • 11
  • 5
0
votes
2 answers

Dredd Api Blueprint for text format

There is an api blueprint dredd test problem which bothers me for a while. I can dredd test json format successed, but for text format, it always be failed. The fail message -> fail: body: Real and expected data does not match. But I check the…
Rong.lin
  • 1
  • 2
0
votes
1 answer

can we connect to public api endpoint instead of local host using dredd tool?

I tried to use a public end point(eg:api.openweathermap.org/data/2.5/weather?lat=35&lon=139) instead of the local host while configuring dredd and ran the command to run the tool.But I am not able to connect to the end point through dredd. It is…
sachu
  • 1
  • 1