Part 2: Integration and End-to-End Testing with TDD
With the fundamentals of TDD and Go testing in place, this part moves our focus beyond testing components in isolation. We explore the importance of integration testing and learn how to write tests using httptest
and ginkgo
to test the BookSwap
web application. Then, we extend the functionality of the application by adding a database and containerizing it using Docker, which allows us to create identical test setups. Once the application is extended into a monolithic application, we use GoDog
to implement end-to-end testing using BDD-style features. However, refactoring is an integral part of the development process, often applied to splitting monolithic applications to microservice architectures. We examine testing microservice integrations using contract testing, implemented using the Pact open-source testing tool.
This part has the following chapters:
- Chapter 5, Performing Integration Testing
- Chapter 6, End-to-End...