Specification-driven REST API testing tool that validates HTTP responses against Swagger/OpenAPI specifications. Version 0.8.0 is the latest stable release (as of 2016+), with no active maintenance. It offers both CLI and programmatic usage, supports explicit x-amples extension and automatic inference of test cases. Unlike broader API testing frameworks (e.g., Postman, Dredd), swagger-test focuses purely on Swagger spec conformance with no built-in HTTP client.
npm install swagger-testNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to parse a Swagger spec, infer test cases, and run them against a live server using preq and mocha.
Consider migrating to Dredd or another active API testing tool.
Set the x-amples.base-url property in your Swagger spec or configure via environment.
Add explicit x-amples to generate meaningful test cases.
npm install swagger-test
const xamples = swaggerTest.parse(spec);
Fix your server's response or update the specification.