test

package module
v0.0.0-...-f1836c7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

turbinelabs/test

This project is no longer maintained by Turbine Labs, which has shut down.

Apache 2.0 GoDoc CircleCI Go Report Card codecov

The test project 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.

Requirements

  • Go 1.10.3 or later (previous versions may work, but we don't build or test against them)

Install

go get -u github.com/turbinelabs/test/...

Clone/Test

mkdir -p $GOPATH/src/turbinelabs
git clone https://github.com/turbinelabs/test.git > $GOPATH/src/turbinelabs/test
go test github.com/turbinelabs/test/...

Packages

Each package is best described in its respective Godoc:

  • assert: a collection of useful test assertions
  • category: categorization and selective execution of tests
  • check: simple boolean checks, some of which are used by assert
  • http: useful extensions to the net/http/httptest package
  • io: useful io.Reader and io.Writer implementations
  • log: useful log.Logger factories
  • matcher: useful gomock.Matcher implementations
  • server: a command-line configurable test HTTP server
  • stack: produces user friendly stack traces
  • strings: provides string conversions that are useful in tests
  • tempfile: provides wrappers around ioutil.TempFile to easily create temporary files or file names
  • testrunner: a testrunner for go test that generates a junit-style test result XML file

Versioning

Please see Versioning of Turbine Labs Open Source Projects.

Pull Requests

Patches accepted! Please see Contributing to Turbine Labs Open Source Projects.

Code of Conduct

All Turbine Labs open-sourced projects are released with a Contributor Code of Conduct. By participating in our projects you agree to abide by its terms, which will be carefully enforced.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL