Bazel

August 7, 2024

What is Bazel?

Bazel is an open source build and test tool similar to Make, Maven, and Gradle. Bazel supports projects in multiple languages and builds outputs for multiple platforms.

Enabling XML Output

By default bazel test will output JUnit compatible XML. If you are using gtest for your testing framework, Bazel is still in control of running the tests and will still produce XML output. By default the XML output will go to ./bazel-testlogs/TEST_NAME/test.xml along with the other test outputs.

Test Suite naming

By default bazel test will produce XML output in a file named test.xml

Handling Retries

Bazel can retry tests using the --flaky_test_attempts command line option. The following will retry tests up to three times if the test fails.

1bazel test --flaky_test_attempts=3

See the Bazel Command Line Reference for more information.

Other Configuration

See an example of running Bazel inside of a GitHub action here.

Try it yourself or
request a demo

Get started for free

Try it yourself or
Request a Demo

Free for first 5 users