Skip to main content

Prepare Test Output

Actions Insights reads test result files in their native format. Your test runner must write compatible output files before the Actions Insights step runs.

Supported Formats

FormatTypical extensionsTest runners
TRX.trx.NET (dotnet test), Visual Studio
JUnit XML.xmlJava (Maven, Gradle), Python (pytest), JavaScript
NUnit XML.xmlNUnit (.NET)
xUnit XML.xmlxUnit (.NET)

The action auto-detects the format from file content. Use the test-results input to specify which files to parse.

.NET (TRX)

- name: Run tests
run: dotnet test --logger "trx;LogFileName=results.trx"

- uses: mzbrau/actions-insights@v1
with:
test-results: '**/*.trx'

Java (JUnit)

- name: Run tests
run: mvn test

- uses: mzbrau/actions-insights@v1
with:
test-results: '**/TEST-*.xml'

Python (JUnit via pytest)

- name: Run tests
run: pytest --junitxml=test-results.xml

- uses: mzbrau/actions-insights@v1
with:
test-results: 'test-results.xml'

Multiple Result Files

Use a glob pattern to match multiple files:

with:
test-results: '**/*.{trx,xml}'

Troubleshooting

  • No results found — verify the glob matches your output path and that tests ran before the Actions Insights step
  • Wrong format detected — ensure XML files use a supported schema; place specific parsers before generic ones
  • Empty report — check that test files are not in .gitignore paths excluded from the workspace

Next Step

Add the action to your workflow.