Dredd
ActiveOverview
Dredd is a language-agnostic command-line tool that validates API description documents against backend implementations. It reads API specifications in formats like OpenAPI and API Blueprint, automatically generates HTTP requests based on the documentation, and verifies that the actual API responses match the documented behavior. Dredd is designed for teams practicing documentation-driven development, ensuring that API documentation remains accurate and synchronized with implementation throughout the development lifecycle.
Key Features
- API Description Validation - Validates API implementations against OpenAPI, Swagger, and API Blueprint specifications
- Automated Request Generation - Automatically generates HTTP requests from API documentation to test endpoints
- Response Verification - Checks that API responses match documented status codes, headers, and body formats
- CI/CD Integration - Integrates into continuous integration workflows to detect documentation-implementation mismatches early
- Hook Support - Supports customizable hooks for test setup, teardown, and advanced testing scenarios
- Multi-language Support - Language-agnostic tool that works with any backend implementation regardless of programming language
- Interactive Configuration - Provides interactive setup via dredd init command to generate configuration files
- Transaction Inspection - Allows viewing and naming all transactions (requests) to be executed against the API
Pricing
| Plan | Price | Includes |
|---|---|---|
| Open Source | Free | Full Dredd functionality, command-line tool, hook support, CI/CD integration |
Platforms & Requirements
Dredd is a Node.js-based command-line tool that runs on macOS, Windows, and Linux systems with Node.js and npm installed. It operates as a CLI application and can be installed globally via npm. The tool integrates with various CI/CD platforms and can be configured to work with any HTTP API backend regardless of the server's platform or language.
Integrations & Ecosystem
- API Blueprint specification format
- OpenAPI 2.0 (Swagger) specification format
- OpenAPI 3.0 specification format
- npm package manager
- CircleCI continuous integration
- Apiary platform
- Git version control
- Custom hooks for Ruby, Python, and Node.js
Alternatives
| App | Difference |
|---|---|
| Postman | Postman is a GUI-based API testing tool with broader testing capabilities beyond documentation validation, including manual testing and collection-based workflows |
| Swagger UI / SwaggerHub | Swagger UI focuses on API documentation visualization and exploration rather than automated testing against implementations |
| Karate Framework | Karate is a more comprehensive API testing framework with advanced scripting capabilities, better suited for complex test scenarios beyond documentation validation |
| REST Assured | REST Assured is a Java-based library for API testing with more granular control and assertion capabilities for unit and integration testing |
Reputation
Dredd is recognized as a specialized tool for documentation-driven development with a focused purpose: ensuring API documentation stays synchronized with implementation. It is valued for its simplicity, language-agnostic approach, and seamless CI/CD integration. However, it is not intended as a replacement for comprehensive testing frameworks like PHPUnit or Cucumber, and its effectiveness depends on maintaining high-quality API documentation. The tool has a stable, active community and is particularly useful for teams prioritizing documentation accuracy and contract-based API development.
Sources (8)
- https://github.com/apiaryio/dredd
- https://dredd.org
- https://www.commencis.com/thoughts/automated-api-testing-with-dredd-ensuring-accurate-api-documentation/
- https://philsturgeon.com/dredd-api-testing-documentation/
- https://blog.rebased.pl/2018/06/29/testable-api-docs.html
- https://help.apiary.io/tools/automated-testing/testing-local/
- https://matthewdaly.co.uk/blog/2016/08/08/testing-your-api-documentation-with-dredd/
- https://dredd.org/en/latest/how-to-guides.html