在集成因 Dredd 而中断之前,从 API 描述中针对实时端点运行合同测试
Lets an agent execute OpenAPI or API Blueprint contract checks against a running service so spec drift is caught before release.
Prerequisites
Node.js, Dredd CLI, OpenAPI or API Blueprint spec, running API endpoint
Installation
Use the upstream install or setup path that matches your environment:
- $ npm install -g dredd
Requirements and caveats from upstream:
- Node.js (JavaScript)
- Python
Basic usage or getting-started notes:
- Create an [API Blueprint][] file called api-description.apib.
- Follow [tutorial at API Blueprint website][api blueprint tutorial]
- or just take one of the [ready-made examples][api blueprint examples].
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/apiaryio/dredd/HEAD/README.md
Documentation
- https://dredd.org/