Upload test reports

Enhance CI Autopilot by uploading test reports

By default, CI Autopilot analyzes general CI logs to identify failures. Adding structured test reports enables more precise, test-level analysis with better root cause identification and more targeted fix recommendations.

Prerequisites

Step 1 of 3: Configure test framework to generate test reports

This setup shares documentation with Trunk's Flaky Tests feature, but you don't need to use Flaky Tests to benefit from enhanced CI Autopilot analysis.

Select test framework and follow the instructions to configure test reports: Test Frameworks

Validating reports (JUnit XML files)

You can validate your test reports using the Trunk CLI. If you don't have it installed already, you can install and run the validate command like this:

curl -fsSLO --retry 3 https://trunk.io/releases/trunk && chmod +x trunk
./trunk flakytests validate --junit-paths "./junit.xml"

This will not upload anything to Trunk. To improve detection accuracy, you should address all errors and warnings before proceeding to the next steps.

✅ Success: The test reports pass the validation checks

Step 2 of 3: Configure GitHub Actions to upload test reports

Follow the setup guide to upload test results: GitHub Actions

✅ Success: The updated workflow uploads test reports successfully

Step 3 of 3: Confirm test reports are uploaded

A new Uploads view for CI Autopilot is currently in progress

Currently, the best way to validate test result uploads are successfully processed by Trunk is by looking into the Uploads tab for Flaky Tests.

  • Select "Flaky Tests" in the top navigation

  • Click on the "Uploads" tab

  • Select your repository in the repository selector on the top right

The uploads tab contains results received from past CI jobs.
The uploads tab contains results received from past CI jobs

✅ Success: The uploaded test reports are showing up in the uploads view

Last updated