Documentation ¶
Overview ¶
The test package contains a variety of small helper packages to make writing tests in go a little easier. The test project has no external dependencies beyond the go standard library.
Directories ¶
Path | Synopsis |
---|---|
The assert package include various simple test assertions, and a mechanism to group assertions together.
|
The assert package include various simple test assertions, and a mechanism to group assertions together. |
Allows for the categorization and selective execution of tests.
|
Allows for the categorization and selective execution of tests. |
Simple checks that don't don't make any assertions but are most likely of use in tests.
|
Simple checks that don't don't make any assertions but are most likely of use in tests. |
Package http includes useful extensions to the net/http/httptest package.
|
Package http includes useful extensions to the net/http/httptest package. |
Package io provides io.Reader and io.Writer implementations useful for testing.
|
Package io provides io.Reader and io.Writer implementations useful for testing. |
Package log provides functions for producing useful Loggers for testing
|
Package log provides functions for producing useful Loggers for testing |
Package matcher provides helpful implementations of the gomock.Matcher interface.
|
Package matcher provides helpful implementations of the gomock.Matcher interface. |
Package server produces a binary called testserver, which serves HTTP on a specified port with a specified error rate and latency distribution.
|
Package server produces a binary called testserver, which serves HTTP on a specified port with a specified error rate and latency distribution. |
Package stack is used to produce user friendly stack traces.
|
Package stack is used to produce user friendly stack traces. |
String conversions that are most likely of use in tests.
|
String conversions that are most likely of use in tests. |
Package tempfile provides wrappers around ioutil.TempFile to easily create temporary files or file names.
|
Package tempfile provides wrappers around ioutil.TempFile to easily create temporary files or file names. |
Package runner executes a test executable in a subprocess, parses its go-style output to calculate test results, and generates a junit-style test result XML file.
|
Package runner executes a test executable in a subprocess, parses its go-style output to calculate test results, and generates a junit-style test result XML file. |
junit
Package junit provides a formatter for generating junit-style test results.
|
Package junit provides a formatter for generating junit-style test results. |
parser
Package parser provides a test output parser for go test.
|
Package parser provides a test output parser for go test. |
results
Package results contains types that represent test packages, tests, and their results.
|
Package results contains types that represent test packages, tests, and their results. |
Click to show internal directories.
Click to hide internal directories.