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
AI-powered service management for IT and enterprise teams Icon
AI-powered service management for IT and enterprise teams

Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity. Maximize operational efficiency with refreshingly simple, AI-powered Freshservice.
Try it Free
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