Vitest
The official Flakiness.io reporter for Vitest. The open source implementation is available at github.com/flakiness/vitest.
A custom Vitest reporter that generates Flakiness Reports from your Vitest test runs. The reporter automatically converts Vitest test results into the standardized Flakiness JSON format, capturing test outcomes, system utilization, and environment information.
Quick Start
Section titled “Quick Start”-
Install the Flakiness.io Vitest reporter:
Terminal window npm install -D @flakiness/vitest -
Configure the reporter in your
vitest.config.tsfile:vitest.config.ts import { defineConfig } from 'vitest/config';export default defineConfig({test: {includeTaskLocation: true,reporters: ['default',['@flakiness/vitest', { flakinessProject: 'my-org/my-project' }]],},}); -
Run your tests. The report will be automatically generated in the
./flakiness-reportfolder:Terminal window npx vitest run -
View the interactive report:
Terminal window npx flakiness show ./flakiness-report
CI/CD Integration
Section titled “CI/CD Integration”Reports are automatically uploaded to Flakiness.io at the end of each test run when authentication is configured. If no credentials are present, the report is still generated locally and can be uploaded manually later.
When uploading succeeds, you’ll see a confirmation in your terminal:
45 passed (1.5m)[flakiness.io] ✓ Uploaded as https://flakiness.io/flakiness/flakiness/run/6574| Upload Method | Status | Guide |
|---|---|---|
| GitHub OIDC | Supported | GitHub Actions |
| Access Token | Supported | GitHub Actions |
| Other CI | Supported | Other CI Providers |
Configuration
Section titled “Configuration”For a full list of configuration options, see the reporter README on GitHub.