Book
Testing Web APIs
Mark Winteringham
Summary
Mark Winteringham treats testing a web API as several distinct activities rather than one task, and gives each its own chapter. The opening chapters establish where to start and how to reason about quality and risk, so that the tests a team writes follow from what it is actually worried about. From there the book moves through testing an API's design before it is built, exploratory testing of a running API, and automation, with a strategy chapter on deciding what to automate and a later one on the harder automation problems. Contract testing gets its own treatment for the case where a change on one side of an API breaks a consumer on the other. The closing chapters cover performance testing, security testing, and testing in production.
Target Readers
- Developers and testers who already write API tests but cannot say which risks those tests cover
- Teams where a change on one side of an API keeps breaking a consumer on the other, looking for contract testing as the remedy
- Engineers deciding what in an API test suite is worth automating and what is better explored by hand
Tags
Colophon
- Publisher
- Shoeisha
- ISBN
- 978-4798172453
- Published
- Feb 2023
- List price
- ¥2,178incl. taxMay differ from the actual selling price on Amazon
Get this book
* The link above is an advertisement via Amazon Associates.Related Books
Prerequisites
- Recommended
Unit Testing Principles, Practices, and Patterns
Vladimir Khorikov
Reason: Having mastered unit testing principles, you broaden your view to a testing strategy for APIs that cross service boundaries. Testing Web APIs shows how to balance the upper layers of the test pyramid—integration, contract, end-to-end—securing the API reliability that unit tests alone can't protect.
- Related
The Design of Web APIs
Arnaud Lauret
Reason: Once you can design an API, you need a way to verify that the design keeps working as promised. Testing Web APIs introduces contract testing, letting you catch mismatches between provider and consumer in CI.
- Related
Microservices Patterns
With examples in Java
Chris Richardson
Reason: Splitting into services creates the risk that integrations break whenever an inter-service interface changes. Testing Web APIs provides a contract-testing strategy including consumer-driven contracts (CDC), weaving a verification net that keeps independent deployment safe.