1

I installed dredd - API Blueprint Testing Tool and trying to test our APIary API against the implementation.

In the blueprint I have just one resource which is correctly implemented on somehost... but test fails :(

test command: dredd apiary.apib http://somehost.de:8443/imp-endpoint

output: Info: Beginning Dredd testing... undefined

I tried also with more options to get more information what is undefined.. like -l verbose and some other options. But I did not get more information about the failure :(

Does anyone have experience with it? Thank you!!! :)

Zdenek
  • 3,653
  • 27
  • 34

1 Answers1

4

Answered on Github but I'll reproduce the main points here for reference:

I wasn't able to to reproduce your "undefined" problem, but there are a few issues that, when corrected, make everything work.

  1. At the moment, the base url can't have a path in it (see #43). This is solved in #45 but hasn't yet been merged. So your command should be 'dredd apiary.apib http://somehost.de:8443/' and then '/imp-endpoint' should be a prefix on the urls.

  2. The URI template is incorrect in your apib file. Instead of /api/V0/Resources/CarSharing/Cars?{lat}&{lng}&{radius}, it should be /imp-endpoint/api/V0/Resources/CarSharing/Cars{?lat,lng,radius}. See RFC6750 for reference.

  3. The line-endings should be Unix style, not Windows (\n, not \n\r). When I first ran the apib you provided, I got the error: the use of carriage return(s) '\r' in source data isn't currently supported, please contact makers (this is actually enforced by the blueprint parser, see snowcrash)

Hope that helps! I get a 401 when running the test, so you'll need to provide HTTP Basic authentication information (this can be done in the header section of the blueprint or with the -u flag on dredd, as in -u username:password)

Community
  • 1
  • 1
Evan Cordell
  • 4,108
  • 2
  • 31
  • 47