gotestsum

command module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2018 License: Apache-2.0 Imports: 13 Imported by: 9

README

gotestsum

GoDoc CircleCI Go Reportcard

gotestsum runs go test --json ./..., ingests the test output, and prints customizable output:

  • print test counts: tests run, skipped, failed, package build errors, and elapsed time.
  • print a summary of all failure and skip message after the tests have run
  • write a JUnit XML, or Go TestEvent JSON file for ingestion by CI systems.
  • print customized test output with different formats. Formats from most condensed to most verbose:
    • dots - prints one character per test.
    • short - prints a line for each test package (a more condensed version of the go test default output).
    • standard-quiet - prints the default go test format.
    • short-verbose - prints a line for each test and package.
    • standard-verbose - prints the standard go test -v format.
    • want some other format? Open an issue!

Requires Go version 1.10+

Install

go get gotest.tools/gotestsum

Example Output

short (default)

Prints a condensed format using relative package paths and symbols for test results. Skip, failure, and error messages are printed after all the tests have completed.

✓  cmd (10ms)
✖  pkg/do
✓  pkg/log (11ms)
↷  pkg/untested

DONE 47 tests, 3 skipped, 5 failed in 0.120s

TODO: add failure and skip messages to example output

dots

Prints the package name, followed by a . for passed tests, for failed tests, and for skipped tests. Skip, failure, and error messages are printed after all the tests have completed.

[cmd]···↷···········[pkg/do]···↷↷✖·✖✖····✖··✖····[pkg/log]········
DONE 47 tests, 3 skipped, 5 failed in 0.120s

TODO: add failure and skip messages to example output

Thanks

This package is heavily influenced by the pytest test runner for python.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
junitxml
Package junitxml creates a JUnit XML report from a testjson.Execution.
Package junitxml creates a JUnit XML report from a testjson.Execution.

Jump to

Keyboard shortcuts

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