gotestsum runs tests using go test -json, prints formatted test output, and a summary of the test run. It is designed to work well for both local developments, and for automation like CI. When the --rerun-fails flag is set, gotestsum will re-run any failed tests. The tests will be re-run until each passes once, or the number of attempts exceeds the maximum attempts. Maximum attempts defaults to 2, and can be changed with --rerun-fails=n. gotestsum supports executing a compiled test binary (created with go test -c) by running it as a custom command. pkgname is the name of the package being tested, it will show up in the test output. ./binary.test is the path to the compiled test binary. The -test.v must be included so that go tool test2json receives all the output. When the --watch flag is set, gotestsum will watch directories using file system notifications.

Features

  • Change the test output format, from compact to verbose with color highlighting
  • Print a summary of the test run after running all the tests
  • Use any go test flag, run a script with --raw-command, or run a compiled test binary
  • Write a JUnit XML file for integration with CI systems
  • Write all the test2json input received by gotestsum to a file
  • Print a character for each test

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

Apache License V2.0

Follow gotestsum

gotestsum Web Site

Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects Icon
$300 Free Credits for Your Google Cloud Projects

Start building on Google Cloud with $300 in free credits. No commitment, no credit card required until you're ready to scale.

Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Start Free Trial
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of gotestsum!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

Go

Related Categories

Go Frameworks

Registered

2023-02-03