...

/

Introducing the Built-in Go Testing Support

Introducing the Built-in Go Testing Support

In this lesson, we'll discuss the testing facilities that come with Go.

It turns out that Go, as a pragmatic language, provides rich testing support that includes ways to define and run tests, benchmark the run time and memory usage of your code, provide usage examples, and even test coverage. The topics we will cover include the testing package, the go test command, and writing, and running tests.

The testing package

Go testing starts (and often ends) with the ...