
Swagger
API Testing
Freemium
<What you get/>
API tests written against the documented contract rather than current behaviour
Schema validation catching type, field and enum changes before consumers do
A documented gap analysis between the specification and the deployed service
A recommendation on generating a definition where none exists
What it is
Swagger is the tooling built around the OpenAPI specification — interactive documentation, client and server generation, and spec validation. For testing, the specification is the useful part: it defines the contract, so coverage can be measured against it and drift between documentation and implementation becomes visible rather than assumed.
How PerfectQA uses Swagger
We treat a Swagger definition as the contract to test against rather than as documentation. Where a client maintains one, we write API tests to the specification instead of to the current behaviour of the service, which is the difference between catching a breaking change and quietly codifying it. Schema validation against the definition catches an entire class of defect cheaply — a field that changed type, a response that lost a property, an enum that gained a value nobody told consumers about. We also use it to find the gap between what is documented and what is deployed, which on most engagements is wider than the client expects and is worth knowing before an integration partner discovers it. Where no definition exists but consumers depend on the API, we will often recommend generating one as a first step, because untested and undocumented is a costly combination.
Category
API Testing
In our stack
5 years
Projects
18 delivered
Frequent questions
Is Swagger a testing tool?
Our docs are out of date. Is it still useful?
Can it generate tests automatically?
We don't have a definition. Should we write one?
Every stack is different
Tell us yours, and we’ll show you where this fits



