GitLab CI
Connect FixSense to your GitLab CI pipelines for automated test failure analysis.
Overview
FixSense supports GitLab CI alongside GitHub Actions. When a Playwright or Cypress pipeline fails on GitLab, FixSense automatically downloads artifacts, parses test results, and delivers AI-powered root cause analysis — just like it does for GitHub.
Requirements
- A GitLab project with Playwright or Cypress tests
- A GitLab Project Access Token with
apiscope (Maintainer role or higher) - Test framework configured with a JSON reporter:
// playwright.config.ts
export default defineConfig({
reporter: [
['html'],
['json', { outputFile: 'test-results/report.json' }],
],
});- CI artifacts configured to include
test-results/:
# .gitlab-ci.yml
playwright-tests:
image: mcr.microsoft.com/playwright:v1.58.2-noble
script:
- npm install
- npx playwright test
artifacts:
when: always
paths:
- test-results/
expire_in: 7 daysSetup
Step 1: Sign in with GitLab
Go to the FixSense login page and click Sign in with GitLab. This grants FixSense read access to your GitLab profile and projects.
Step 2: Connect your project
- Open the Setup page
- Enter your GitLab project path (e.g.
my-group/my-project) - Enter a Project Access Token with
apiscope - Click Connect
FixSense will automatically:
- Verify the token has access to the project
- Register a webhook on the project for pipeline and merge request events
- Save the configuration
Step 3: Trigger a pipeline
Push a commit or run a pipeline manually. When a test fails, FixSense will:
- Receive the pipeline webhook
- Download test artifacts from the failed job
- Parse the test JSON report (Playwright or Mochawesome)
- Run AI analysis on each failure
- Post results to the dashboard (and optionally as MR comments)
Features
All core FixSense features work with GitLab:
| Feature | GitLab Support |
|---|---|
| AI failure analysis | Yes |
| Flakiness scoring | Yes |
| MR comments | Yes (via Notes API) |
| Issue tracking | Yes (via GitLab Issues API) |
| Quality gates | Yes (via Commit Status API) |
| Slack notifications | Yes |
| Dashboard | Yes |
| Auto-fix agent | Yes |
GitLab vs GitHub Differences
| GitHub | GitLab | |
|---|---|---|
| Auth | GitHub App (automatic) | Project Access Token (manual) |
| Webhook | Auto-registered by GitHub App | Auto-registered during setup |
| Quality gate | Checks API (check run) | Commit Status API |
| PR comments | Pull Request reviews | MR Notes (upsert via marker) |
| Auto-fix | GitHub Actions workflow | GitLab CI job |
Troubleshooting
"Cannot create webhook" error during setup
Your Project Access Token needs Maintainer role or higher on the project. Alternatively, ask a project admin to manually add the webhook:
- URL:
https://fix-sense.com/api/webhooks/gitlab - Secret token: (provided during setup)
- Triggers: Pipeline events, Merge request events
No analyses appear after pipeline failure
- Check that your
.gitlab-ci.ymluploadstest-results/as artifacts - Verify your test framework config includes a JSON reporter (Playwright:
outputFile: 'test-results/report.json', Cypress: Mochawesome reporter) - Check that the pipeline webhook was delivered (GitLab > Settings > Webhooks > Recent events)
Artifacts are empty or too small
Make sure artifacts are set to when: always so they're uploaded even when the job fails.