Trunk Flaky Tests now supports uploading test results by parsing Bazel Build Event Protocol (BEP) files. Supporting BEP files gives Trunk more context when parsing Bazel test results for more accurate detection results. Parsing BEP files lets Trunk accurately track tests run by understanding which targets were actually built and which were cached and skipped. In the future, this will also allow Trunk to work better with Bazel's built-in retries.
Trunk expects a JSON serialization of the build event protocol which you can export by running the bazel test
command with the options --nobuild_event_json_file_path_conversion
and --build_event_json_file=build_events.json
.
You can switch to uploading BEP files by running the upload command with the --bazel-bep-path build_events.json
option.
1./trunk flakytests upload --bazel-bep-path build_events.json \2--org-url-slug <TRUNK_ORG_SLUG> \3--token $TRUNK_TOKEN
You can learn more about Bazel in the docs or chat with us on Slack.