Summary
In this chapter, we explored how to identify edge cases and write test suites that cover multiple conditions. We began with how to identify edge cases for systems with input parameters and external services, revising Go’s approach to explicit error handling. Then, we learned how to implement table-driven testing. This popular technique allows us to test multiple scenarios with a minimal amount of boilerplate code. It also allows running test cases in parallel, enabling us to make optimizations for the running of test cases as well. Finally, we introduced our new use case—the BookSwap web application. This example application will be the focus of the next few chapters, where we will learn how to test one of Go’s most popular use cases: building web applications.
In Chapter 5, Performing Integration Testing, we will begin to consider how to use TDD for testing end-to-end (E2E) applications, including database testing. We will also learn how to use Docker...