This chapter teaches you how to test and validate API implementations. Thus far, we’ve learned to design and build APIs to drive integrations between microservices. Along the way, we did some manual tests to ensure our implementations exhibited the correct behavior. However, those tests were minimal, and most importantly, they were purely manual and therefore not repeatable in an automated fashion.
In this chapter, we learn how to run an exhaustive test suite against our API implementations using tools such as Dredd and Schemathesis, tools for API testing that are part of every API developer’s tool kit. Both Dredd and Schemathesis work by looking at the API specification and automatically generating tests against our API server. For an API developer, this is very handy because it means you can focus your efforts on building your APIs instead of testing them.