Chapter 8. Testing your application

This chapter covers

  • The Go testing libraries
  • Unit testing
  • HTTP testing
  • Testing with dependency injection
  • Using third-party testing libraries

Testing is one of the main critical activities in programming, but often it’s neglected or left as an afterthought. Go provides basic testing capabilities that look surprisingly primitive, but as you’ll learn in this chapter, Go supplies the tools to create the automated tests you need as a programmer. This chapter also covers the check and Ginkgo packages, popular Go testing libraries that extend the built-in testing package.

As with the web application programming libraries we’ve explored in the previous few chapters, Go provides only the fundamental tools. ...

Get Go Web Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.