Test Frameworks
How to connect your test framework to Automated Future.
af run works with any test framework that can produce JUnit XML output. This page shows how to configure each one.
The pattern is always the same:
af run will execute the command, find the JUnit XML file(s), and upload every test result automatically. See the CLI Reference for all options.
JavaScript / TypeScript
Jest
Install the JUnit reporter:
Run with af:
By default jest-junit writes to ./junit.xml. To customise the output path, set the JEST_JUNIT_OUTPUT_DIR and JEST_JUNIT_OUTPUT_NAME environment variables:
JEST_JUNIT_OUTPUT_DIR=./reports
Or configure it in package.json:
Vitest
Install the JUnit reporter (included with Vitest, no extra package needed):
Or set it in vitest.config.ts:
;
Then run:
Mocha
Install the JUnit reporter:
Run with af:
Playwright
Playwright has a built-in JUnit reporter:
By default this writes to stdout. To write to a file, set PLAYWRIGHT_JUNIT_OUTPUT_NAME:
PLAYWRIGHT_JUNIT_OUTPUT_NAME=results.xml
Or configure it in playwright.config.ts:
;
Cypress
Install the JUnit reporter:
Add to cypress.config.js:
module.exports = ;
Run with af:
Python
pytest
No extra packages needed — JUnit XML output is built into pytest.
To include stdout/stderr capture in the report:
unittest
Python's built-in unittest does not produce JUnit XML directly. Use unittest-xml-reporting:
Java / Kotlin
JUnit 5 with Gradle
Gradle generates JUnit XML by default under build/test-results/test/. No extra configuration needed:
JUnit 5 with Maven
Maven Surefire generates JUnit XML by default under target/surefire-reports/. No extra configuration needed:
To also include Failsafe (integration tests):
Go
Go's built-in test runner does not produce JUnit XML. Use go-junit-report to convert:
If using gotestsum (recommended):
Rust
Cargo's built-in test runner supports JUnit XML output with the unstable --report-junit flag (nightly or recent stable):
Alternatively, use cargo-nextest which has built-in JUnit support:
Add a JUnit profile to .config/nextest.toml:
[]
= "results.xml"
Ruby
RSpec
Install the JUnit formatter:
Or add it to .rspec:
--format RspecJunitFormatter
--out results.xml
Minitest
Install the JUnit reporter:
Add to your test helper:
Minitest::Reporters.use! Minitest::Reporters::JUnitReporter.new()
.NET
dotnet test has built-in JUnit XML support via the logger:
If the JUnit logger is not available, install it:
PHP
PHPUnit
PHPUnit has built-in JUnit XML support:
Or configure it in phpunit.xml:
Then run:
Swift
XCTest (Xcode)
Xcode 16+ can produce JUnit XML via xcresulttool:
For earlier Xcode versions, use xcpretty:
Elixir
Use junit_formatter:
Add to mix.exs:
Add to config/test.exs:
config :junit_formatter, report_dir:
Custom or Unsupported Frameworks
If your framework does not appear here, check whether it has a JUnit XML output option or plugin — most do. The JUnit XML format is widely supported.
If the output path is non-standard, point af run to it explicitly:
You can also upload JUnit XML to an existing test run manually:
For frameworks that cannot produce JUnit XML at all, use the API to report results directly.