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.
$ dredd blueprint.md http://api.myservice.tld
See dredd-example repo for real-life example.
$ npm install -g dredd
$ dredd -h
Usage:
dredd <path to blueprint> <api_endpoint> [OPTIONS]
Example:
dredd ./apiary.md http://localhost:3000 --dry-run
Options:
-d, --dry-run Run without performing tests.
-s, --silent Suppress all command line output
-r, --reporter STRING Output additional report format. Options: junit
-o, --output FILE Specifies output file when using additional
reporter
-k, --no-color Omit color from output
--debug Show debug information
-v, --version Display the current version
-h, --help Display help and usage details
Dredd can test only API resources specified by well defined transaction. Any Non specific resources in the Blueprint e. g. with URI template or query parameters without default or example values are considered as ambiguous transaction thus they are resulting in a warning during the test run and are skipped.
Any contribution is more then welcome! Let's start with creating your own virtual development environment, then fork, write tests, write clean, readable code which communicate, use scripts/bdd
, keep the test coverage and create a pull request. :)
Make sure to follow Dredd issues page.