Summary
In this chapter, we moved on from focusing on unit tests, which verify the functionality of code in small isolated units. We began with an introduction to the importance of integration testing and learned how to write and run integration tests for HTTP handlers using the httptest
library. Then, we learned what the practice of writing BDD-style tests entails and how to implement them using the ginkgo
testing library. Then, we discussed the importance of testing databases and what useful libraries there are available to us to be able to write these. Finally, we covered the advantages of containerization and learned how to use Docker and configure services with docker compose
.
In Chapter 6, End-To-End Testing the BookSwap Web Application, we will expand on all the fundamentals of the technologies we have learned so far and apply them to test the BookSwap
web application. This will give us good hands-on practice to configure a typical web application that has a simple database...