Getting Started
- a monorepo on GitHub or GitLab — tests and code live in the same repository. Flakiness.io keys results by commit, so test results and the code that produced them must share the same git history.
- a CI workflow that runs your tests (GitHub Actions, GitLab CI/CD, or any other provider).
- your first report visible on the Flakiness.io dashboard, with a GitHub check posted on new pull requests (GitHub-linked projects only).
-
Sign in to Flakiness.io with GitHub or GitLab.
Choose the provider that hosts your repositories. You can connect the other provider later from your user settings and use either one to sign in.
Sign in with GitHub Sign in with GitLab -
Create an Organization.
Create Organization -
Connect your repository. Flakiness.io reads your commit history to line test results up with the code that produced them, so it needs read access to the repository.
Install the Flakiness.io GitHub App. It grants read-only access to commit history and permission to post PR checks.
Install the GitHub AppThen create a Project inside your organization and link it to the repository. Installing the App on its own connects nothing: the Project is what ties a repository to Flakiness.io.
Create a GitLab personal access token with the
Create a GitLab tokenread_apiscope. Flakiness.io uses it to read commits and merge requests.Then create a Project inside your organization, choose GitLab, paste the token, and pick your project from the list.
-
Copy your
flakinessProjectidentifier. Open your project page on Flakiness.io; the URL looks likehttps://flakiness.io/<orgSlug>/<projectSlug>. Your identifier is that<orgSlug>/<projectSlug>pair — you’ll paste it into the reporter config in the next step. -
Upload test results from CI. Pick your runner — each tile shows the install, config, and CI integration you need.
Install the reporter:
Terminal window npm install -D @flakiness/playwrightAdd it to your config:
playwright.config.ts import { defineConfig } from '@playwright/test';export default defineConfig({reporter: [['@flakiness/playwright', {flakinessProject: 'my-org/my-app'}]],});Configure your CI:
Grant the
id-token: writepermission: Playwright Test supports GitHub OIDC and usesflakinessProjectfor secretless authentication..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version: '20'- run: npm ci- run: npx playwright install --with-deps- run: npx playwright testFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKENwith your project as its audience: Playwright Test supports GitLab OIDC and usesflakinessProjectfor secretless authentication..gitlab-ci.yml test:image: node:20id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- npm ci- npx playwright install --with-deps- npx playwright testFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Expose an access token via
FLAKINESS_ACCESS_TOKEN(from your project’s settings) and run your tests:Terminal window FLAKINESS_ACCESS_TOKEN=<token> npx playwright testInstall the reporter:
Terminal window uv add --dev pytest-flakiness# or: pip install pytest-flakinessThe reporter auto-activates once installed.
Configure your CI:
Grant the
id-token: writepermission and specify aFLAKINESS_PROJECTto upload the report to: Pytest supports Github OIDC for secretless authentication..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCenv:FLAKINESS_PROJECT: my-org/my-appsteps:- uses: actions/checkout@v4- uses: actions/setup-python@v5with:python-version: '3.12'- run: pip install -e '.[test]'- run: pytestFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKENand specify aFLAKINESS_PROJECTto upload the report to: Pytest supports GitLab OIDC for secretless authentication..gitlab-ci.yml test:image: python:3.12id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appvariables:FLAKINESS_PROJECT: my-org/my-appscript:- pip install -e '.[test]'- pytestFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Set
FLAKINESS_ACCESS_TOKEN(from your project’s settings) and run your tests:Terminal window FLAKINESS_ACCESS_TOKEN=<token> pytestInstall the reporter:
Terminal window npm install -D @flakiness/vitestAdd it to your config:
vitest.config.ts import { defineConfig } from 'vitest/config';import flakinessReporter from '@flakiness/vitest';export default defineConfig({test: {reporters: ['default', flakinessReporter({flakinessProject: 'my-org/my-app'})],},});Configure your CI:
Grant the
id-token: writepermission: Vitest supports GitHub OIDC and usesflakinessProjectfor secretless authentication..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version: '20'- run: npm ci- run: npx vitest runFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKENwith your project as its audience: Vitest supports GitLab OIDC and usesflakinessProjectfor secretless authentication..gitlab-ci.yml test:image: node:20id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- npm ci- npx vitest runFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Set
FLAKINESS_ACCESS_TOKEN(from your project’s settings) and run your tests:Terminal window FLAKINESS_ACCESS_TOKEN=<token> npx vitest runInstall the reporter:
Terminal window npm install -D @flakiness/jestAdd it to your config:
jest.config.ts import type { Config } from 'jest';const config: Config = {testLocationInResults: true,reporters: ['default',['@flakiness/jest', { flakinessProject: 'my-org/my-app' }],],};export default config;Configure your CI:
Grant the
id-token: writepermission: Jest supports GitHub OIDC and usesflakinessProjectfor secretless authentication..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version: '20'- run: npm ci- run: npx jestFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKENwith your project as its audience: Jest supports GitLab OIDC and usesflakinessProjectfor secretless authentication..gitlab-ci.yml test:image: node:20id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- npm ci- npx jestFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Set
FLAKINESS_ACCESS_TOKEN(from your project’s settings) and run your tests:Terminal window FLAKINESS_ACCESS_TOKEN=<token> npx jestInstall the reporter:
Terminal window npm install -D @flakiness/cucumberjsAdd it to your config:
cucumber.mjs export default {default: {format: ['@flakiness/cucumberjs'],formatOptions: {flakinessProject: 'my-org/my-app',},},};Configure your CI:
Grant the
id-token: writepermission: CucumberJS supports GitHub OIDC and usesflakinessProjectfor secretless authentication..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4- uses: actions/setup-node@v4with:node-version: '20'- run: npm ci- run: npx cucumber-jsFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKENwith your project as its audience: CucumberJS supports GitLab OIDC and usesflakinessProjectfor secretless authentication..gitlab-ci.yml test:image: node:20id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- npm ci- npx cucumber-jsFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Set
FLAKINESS_ACCESS_TOKEN(from your project’s settings) and run your tests:Terminal window FLAKINESS_ACCESS_TOKEN=<token> npx cucumber-jsbun testhas built-in JUnit XML output. Run it with--reporter=junit, then use@flakiness/junit-xmlto convert and upload the report.Configure your CI:
Grant the
id-token: writepermission: the@flakiness/junit-xmlstep uses GitHub OIDC for secretless authentication. GitHub Actions ships withnpx, so it runs without a separate install step..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4- uses: oven-sh/setup-bun@v2- run: bun install- run: bun test --reporter=junit --reporter-outfile=./junit.xml- name: Upload to Flakiness.ioif: always()run: npx @flakiness/junit-xml ./junit.xml --category bun --flakiness-project my-org/my-appFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKEN: the@flakiness/junit-xmlstep uses GitLab OIDC for secretless authentication. It runs inafter_script, which executes even when tests fail..gitlab-ci.yml test:image: oven/bun:1id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- bun install- bun test --reporter=junit --reporter-outfile=./junit.xmlafter_script:- bunx @flakiness/junit-xml ./junit.xml --category bun --flakiness-project my-org/my-appFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Install the standalone
flakiness-junit-xmlbinary (no Node.js required), setFLAKINESS_ACCESS_TOKEN(from your project's settings), run your tests, then convert and upload:Terminal window curl -fsSL https://github.com/flakiness/junit-xml/releases/latest/download/install.sh | shbun test --reporter=junit --reporter-outfile=./junit.xmlFLAKINESS_ACCESS_TOKEN=<token> flakiness-junit-xml ./junit.xml --category bun --flakiness-project my-org/my-appInstall the standalone
flakiness-junit-xmlbinary (no Node.js required), setFLAKINESS_ACCESS_TOKEN(from your project's settings), run your tests, then convert and upload:Terminal window irm https://github.com/flakiness/junit-xml/releases/latest/download/install.ps1 | iexbun test --reporter=junit --reporter-outfile=./junit.xml$env:FLAKINESS_ACCESS_TOKEN = "<token>"flakiness-junit-xml ./junit.xml --category bun --flakiness-project my-org/my-appRust doesn’t have a native Flakiness reporter. The simplest path is
cargo-nextest, a drop-incargo testreplacement that emits JUnit XML.Adopt
cargo-nextest. If your project doesn’t already use it, install it locally and switch your test command fromcargo testtocargo nextest run. See the nextest installation guide for the recommended install for your OS.Configure the
ciprofile to emit JUnit XML:.config/nextest.toml [profile.ci.junit]path = "junit.xml"Configure your CI:
Grant the
id-token: writepermission: the@flakiness/junit-xmlstep uses GitHub OIDC for secretless authentication. GitHub Actions ships withnpx, so it runs without a separate install step..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4- uses: dtolnay/rust-toolchain@stable- run: cargo nextest run --profile ci- name: Upload to Flakiness.ioif: always()run: npx @flakiness/junit-xml ./target/nextest/ci/junit.xml --category rust --flakiness-project my-org/my-appFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKEN: the upload uses GitLab OIDC for secretless authentication. The Rust image ships no Node.js, so install the standaloneflakiness-junit-xmlbinary inafter_script, which executes even when tests fail..gitlab-ci.yml test:image: rust:latestid_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- cargo nextest run --profile ciafter_script:- curl -fsSL https://github.com/flakiness/junit-xml/releases/latest/download/install.sh | sh- flakiness-junit-xml ./target/nextest/ci/junit.xml --category rust --flakiness-project my-org/my-appFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Install the standalone
flakiness-junit-xmlbinary (no Node.js required), setFLAKINESS_ACCESS_TOKEN(from your project's settings), run your tests, then convert and upload:Terminal window curl -fsSL https://github.com/flakiness/junit-xml/releases/latest/download/install.sh | shcargo nextest run --profile ciFLAKINESS_ACCESS_TOKEN=<token> flakiness-junit-xml ./target/nextest/ci/junit.xml --category rust --flakiness-project my-org/my-appInstall the standalone
flakiness-junit-xmlbinary (no Node.js required), setFLAKINESS_ACCESS_TOKEN(from your project's settings), run your tests, then convert and upload:Terminal window irm https://github.com/flakiness/junit-xml/releases/latest/download/install.ps1 | iexcargo nextest run --profile ci$env:FLAKINESS_ACCESS_TOKEN = "<token>"flakiness-junit-xml ./target/nextest/ci/junit.xml --category rust --flakiness-project my-org/my-appFor runners without a native reporter, produce JUnit XML, then use
@flakiness/junit-xmlto convert and upload it.Configure your CI:
Grant the
id-token: writepermission: the@flakiness/junit-xmlstep uses GitHub OIDC for secretless authentication. GitHub Actions ships withnpx, so it runs without a separate install step..github/workflows/tests.yml jobs:test:runs-on: ubuntu-latestpermissions:contents: read # for actions/checkoutid-token: write # for Flakiness.io OIDCsteps:- uses: actions/checkout@v4# ... your existing test steps, producing JUnit XML in ./test-results ...- name: Upload to Flakiness.ioif: always()run: npx @flakiness/junit-xml ./test-results --flakiness-project my-org/my-appFor fork PRs or more advanced cases, see GitHub Actions Setup and GitHub Actions for Open Source Projects.
Declare an ID token named
FLAKINESS_ID_TOKEN: the@flakiness/junit-xmlstep uses GitLab OIDC for secretless authentication. It runs inafter_script, which executes even when tests fail..gitlab-ci.yml test:id_tokens:FLAKINESS_ID_TOKEN:aud: my-org/my-appscript:- ./run-tests.sh # your existing test command, producing JUnit XML in ./test-resultsafter_script:- npx @flakiness/junit-xml ./test-results --flakiness-project my-org/my-appFor self-managed GitLab and other details, see GitLab CI/CD Setup.
Install the standalone
flakiness-junit-xmlbinary (no Node.js required), setFLAKINESS_ACCESS_TOKEN(from your project's settings), run your tests, then convert and upload:Terminal window curl -fsSL https://github.com/flakiness/junit-xml/releases/latest/download/install.sh | sh<your test command producing JUnit XML in ./test-results>FLAKINESS_ACCESS_TOKEN=<token> flakiness-junit-xml ./test-results --flakiness-project my-org/my-appInstall the standalone
flakiness-junit-xmlbinary (no Node.js required), setFLAKINESS_ACCESS_TOKEN(from your project's settings), run your tests, then convert and upload:Terminal window irm https://github.com/flakiness/junit-xml/releases/latest/download/install.ps1 | iex<your test command producing JUnit XML in ./test-results>$env:FLAKINESS_ACCESS_TOKEN = "<token>"flakiness-junit-xml ./test-results --flakiness-project my-org/my-appNo official reporter for your runner? You have three options — see Custom Integration.
-
Push a commit and open the dashboard. Your first report should appear within seconds of the test job finishing.
Next steps
Section titled “Next steps”- Pull & Merge Requests — inspect regressions and, on GitHub, interpret the PR check.
- Slack Notifications — daily alerts on failures and regressions.
- Sharded Tests — configure CI matrix sharding.
- AI Agents — let Claude Code / Codex / Cursor investigate flaky tests.