GitHub Action
Add FixSense to your CI workflow with a single line. Analyze test failures directly in your pipeline.
Overview
The FixSense GitHub Action adds AI-powered test failure analysis directly into your CI workflow. After your tests run, FixSense parses the results, analyzes each failure, and posts a detailed comment on your PR.
This is an alternative to the GitHub App installation. Use the Action if you prefer explicit workflow control, or the GitHub App for zero-config automation.
Quick Setup
Add this step after your test step:
- name: Run tests
id: tests
run: npx playwright test
continue-on-error: true
- name: FixSense Analysis
if: steps.tests.outcome == 'failure'
uses: CopilotMe/fixsense-action@v1
with:
api-key: ${{ secrets.FIXSENSE_API_KEY }}That's it. On the next test failure, you'll get an analysis comment on your PR.
Full Workflow Example
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx playwright install --with-deps
- name: Run Playwright tests
id: tests
run: npx playwright test
continue-on-error: true
- name: FixSense Analysis
if: steps.tests.outcome == 'failure'
uses: CopilotMe/fixsense-action@v1
with:
api-key: ${{ secrets.FIXSENSE_API_KEY }}
results-path: test-results/
- uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: test-results/Configuration
| Input | Required | Default | Description |
|---|---|---|---|
api-key | Yes | — | Your FixSense API key |
results-path | No | test-results/ | Path to JUnit XML test results |
post-comment | No | true | Post analysis as PR comment |
Getting Your API Key
- Sign in at fix-sense.com
- Go to Settings
- Copy your API key
- Add it as a repository secret named
FIXSENSE_API_KEY
Supported Test Frameworks
The action works with any framework that produces JUnit XML reports:
- Playwright — Add
['junit', { outputFile: 'test-results/junit.xml' }]to your reporter config - Cypress — Use
cypress-junit-reporter - Jest — Use
jest-junitreporter - pytest — Use
--junitxml=test-results/junit.xmlflag - WebdriverIO — Use
@wdio/junit-reporterwithreporters: [['junit', { outputDir: './test-results' }]] - Selenium — Works with any Selenium test runner that outputs JUnit XML (TestNG, pytest, NUnit, Mocha)
- NUnit (.NET) — Use
--result=test-results/junit.xml;format=junitor FixSense parses NUnit3 XML natively - Azure DevOps (TRX) — FixSense parses
.trx(Visual Studio Test Results) natively - Detox (React Native) — Uses Jest runner with
jest-junitreporter:["jest-junit", { outputDirectory: "e2e/reports" }] - Dart / Flutter — Use
dart test --machine | tojunit(junitreport)
What You Get
For each failing test, FixSense provides:
- Root Cause — Clear explanation of why the test failed
- App Bug vs Test Bug — Whether the issue is in your application or your test
- Flakiness Score — 0-100 indicating likelihood of flaky behavior
- Suggested Fix — Actionable steps to resolve the failure
All results appear as a single, auto-updating PR comment.
GitHub Action vs GitHub App
| Feature | GitHub Action | GitHub App |
|---|---|---|
| Setup | Add to workflow YAML | 1-click install |
| Configuration | Explicit in workflow | Zero-config |
| Dashboard | Yes | Yes |
| PR Comments | Yes | Yes |
| Auto-Fix | Coming soon | Yes |
| GitHub Issues | No | Yes |
Both options use the same AI analysis engine and count toward your plan's analysis limit.