Summary
In this chapter, we explored the diverse landscape of testing in Go, from unit tests to integration and E2E tests, and a few other types of tests, including HTTP tests and fuzz tests. We also learned about test suites and industry best practices when it comes to code coverage for our projects. We wrapped this chapter up with what we can do with our tests, which includes creating a test report to share for our test coverage, as well as benchmarks that highlight the performance of our code base.
Armed with these tools and techniques, developers can ensure the reliability and stability of the Go code that they write. We covered a lot of ground when it comes to testing with Go, and barely scratched the surface of the capabilities that the Go toolchain offers us developers. In the next chapter, we’ll take a closer look at the Go tools and the capabilities they offer us.