Other CI Providers
Configure Flaky Tests using any CI Provider
Getting Started
After running tests, you must upload your test results to Trunk. You can use the analytics uploader binary.
The Trunk Flaky Tests Uploader currently only supports Linux x64 and macOS for Intel and Arm. If you have another use case, please get in touch with support at https://slack.trunk.io. For the best results, you'll need to validate that your test invocation doesn't use cached test results and doesn't automatically retry failing tests.
Create a CI job that runs the tests you want to monitor and produces a test report in JUnit XML format. Be careful that your test invocation doesn't use cached test results and doesn't automatically retry failing tests.
Find Organization Slug and Token
Next you will need your Trunk organization slug and token. Navigate to app.trunk.io. Once logged in navigate to Settings -> Manage -> Organization. Copy your organization slug. You can find your Trunk token by navigating to Settings → Manage Organization → Organization API Token and clicking "View." Copy this token.
After the test step, download and run the test uploader binary. Use the token and slug you copied above.
The trunk-analytics-uploader
binary should be run from the repository root. If you need to run the binary from another location, you must provide the path to the repo root using the --repo-root
argument.
If you're interested in better understanding this binary or want to contribute to it, you can find the open source repo here.
Last updated