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.

60 questions
10
votes
2 answers

What is a 2-dimensional key-value format that Api Blueprint can understand?

I'm developing api documentation for a RESTful search API using Api Blueprint. I would like to be able to pass filters to the API so I can assemble: filter[filtername1]=filtervalue1 filter[filtername2]=filtervalue2 Per this question, I'm using…
danieltalsky
  • 7,002
  • 5
  • 36
  • 57
6
votes
3 answers

How to reuse objects in schema of API BluePrint?

I have created an API that delivers a resource named "Thumbnail" (/thumbnails) { "name": "toto", "uri": "http://xxx" } In other hand I have multiple resources that includes that Thumbnail resource in them (like /articles, /videos ...): { …
6
votes
2 answers

How to depict sessions in api blueprint format?

I am currently trying to depict a existing API with apiary.io. The system implements authentication via a login request that returns a http-cookie containing a session-id. As far as I know it is standard that a browser sends all http-cookies he…
Florian Loch
  • 789
  • 5
  • 12
3
votes
2 answers

How can I set environment variables for dredd testing in a dredd.yml file?

I'm trying to run a number of api calls using dredd and api blueprint to test a site. I would like to run the tests on circleCI, as there are Selenium tests running in the same place. Each transaction needs to be accompanied by two tokens, which are…
Brydenr
  • 791
  • 1
  • 18
  • 27
3
votes
2 answers

Dredd testing of APIary calls returning an image / PNG

Dredd tests of APIary calls returning an image / PNG fail. Is it possible to check not the content of the returned image but just that there is an image not null as response? Here is the output of my test: [31mfail [39m: GET…
2
votes
1 answer

Can't make DREDD to use the schema.example as POST body

I'm trying to use Dredd to test my OpenAPI specified API but I can't get Dredd to recognize the JSON body of my POST requests, it keeps sending my POST requests with an empty body. According to Dredd's documentation it uses the schema.example for…
2
votes
0 answers

sqlite3.sqlite3.OperationalError: database table is locked on django LiveServerTestCase

I am updating project's django version from 1.11 to django 2.0.8. Bet when I run a test which inherits from LiveServerTestCase and getting this error, which says: sqlite3.OperationalError: database table is locked The same error acquires on…
2
votes
1 answer

How to do file upload with dredd using swagger

This is what I'm passing in my api.description.yml parameters: - name: "file" in: "formData" required: true type: file description: fileupload consumes: - multipart/form-data; Not sure where/how can I send file…
2
votes
1 answer

Api blueprint failing with dredd on a realtime api?

I am in the middle of upgrading dredd from 1.08 to the latest version, while at it, I am trying to validate our api documentation, written in blueprint with the realtime test api and it is failing. Since the tests are running against a real time…
Nauman Bashir
  • 1,672
  • 3
  • 17
  • 25
2
votes
2 answers

Dredd / apiary / MSON array of any size

we're struggling describing an array of any size in our API. Using API Blueprint and MSON format for Dredd testing. Endpoint /spots should return an array of "Spots" (those are objects). We don't know how many though. Currently we have only been…
vicdup
  • 149
  • 4
2
votes
1 answer

Reuse of schema / model apiblueprint for repeated requests with other parameters

What I'm trying to do with an API-blueprint (with dredd as testrunner) is calling a backend twice in a row with almost the same (complex) request. What I would like to do is define an input for a certain endpoint and have some placeholders in there,…
1
vote
2 answers

Stop main.go when SIGTERM triggered

I'm having trouble quitting my main.go app when the SIGTERM event is triggered. The SIGTERM case in the switch statement doesn't get called and the "triggered" is not printed out. Here is my code func main() { port := os.Getenv("PORT") …
Kaigo
  • 563
  • 8
  • 22
1
vote
1 answer

Int32 Error whilst contract testing with Dredd

I have an application which uses Swagger2. This has an endpoint which has the following swagger documentation: { "MyEndpoint": { "type": "object", "properties": { "resultCount": { "type": "integer", "format": "int32" …
Haych
  • 744
  • 9
  • 31
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":…
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,182
  • 1
  • 12
  • 33
1
2 3 4