Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • dev test has a --stress flag for running tests under stress and --race for running tests with the race detector enabled.

  • Next to the test.log file produced by your test, you can find a test.xml file. This file contains specific information on each test run and its status, as well as timing information.

  • The -v argument to dev test will result in more verbose logging as well as more detailed information written to the test.xml. You can make this the default behavior on your machine by adding test --test_env=GO_TEST_WRAP_TESTV=1 to your .bazelrc.user file.

  • As with dev build, dev test allows you to pass additional arguments directly to Bazel by putting them after --: for example, dev test pkg/sql/types -- --verbose_failures --sandbox_debug.

  • To get test results printed as tests are being run add -v -- --test_output streamed to the test command. Note that this reduces test parallelism.

  • To attach a debugger to a hung dev test process tack -- -c dbg to the end of your command and it will disable stripping which breaks dlv (

  • For more tips on debugging test failures, see “How to ensure your tests can run in the Bazel sandbox