Migrating from JUnit XML
- a JUnit XML report from any runner
- for the CI half of the guide: a GitHub repository with GitHub Actions
- your JUnit-producing runner uploading reports to Flakiness.io on every push and PR.
Many test runners speak JUnit XML even when they have no native Flakiness reporter. The flakiness convert-junit CLI command bridges the gap: feed it JUnit XML, get a Flakiness report out.
Part 1 — Preview as a standalone report
Section titled “Part 1 — Preview as a standalone report”-
Install the Flakiness CLI (see CLI Overview for OS-specific install commands).
-
Convert your JUnit XML into a Flakiness report. Point at a single XML file or a directory (it recurses):
Terminal window flakiness convert-junit ./test-resultsThis produces a
flakiness-report/directory with areport.jsoninside. Common options:--output-dir <dir>— write the report somewhere other thanflakiness-report/--title "My Suite"— give the run a human-readable title (see Naming Runs)--commit-id <sha>— override the auto-detected git commit
-
View it in the browser:
Terminal window flakiness show ./flakiness-report
Part 2 — Upload from CI (GitHub OIDC)
Section titled “Part 2 — Upload from CI (GitHub OIDC)”Once the conversion works locally, wire it into CI.
The example below uses GitHub Actions. The flakiness convert-junit + flakiness upload pattern works on any CI provider — only the authentication plumbing changes.
jobs: test: runs-on: ubuntu-latest permissions: contents: read # for actions/checkout id-token: write # for Flakiness.io OIDC steps: - uses: actions/checkout@v4
# ... your usual test steps that produce JUnit XML ...
- name: Install Flakiness CLI run: curl -LsSf https://cli.flakiness.io/install.sh | sh
- name: Convert JUnit XML & upload run: | flakiness convert-junit ./test-results --project my-org/my-app flakiness upload ./flakiness-report/report.jsonThe --project flag (equivalent to FLAKINESS_PROJECT env var) tells the CLI which Flakiness.io project to upload to. With id-token: write permission, OIDC handles authentication, so no secrets are required.