FixSense
Integrations

Bitbucket Cloud

Connect FixSense to your Bitbucket Cloud pipelines for automated test failure analysis.

Overview

FixSense supports Bitbucket Cloud alongside GitHub, GitLab, and Azure DevOps. When a Playwright or Cypress pipeline fails on Bitbucket, FixSense automatically downloads artifacts, parses test results, and delivers AI-powered root cause analysis.

Requirements

  • A Bitbucket Cloud repository with Playwright or Cypress tests
  • Admin access to the repository (for webhook registration)
  • Bitbucket Pipelines enabled on the repository
  • Test framework configured with a JUnit XML reporter
  • CI pipeline configured to upload test results as artifacts

Test Reporter Configuration

// playwright.config.ts
export default defineConfig({
  reporter: [
    ['html'],
    ['junit', { outputFile: 'test-results/results.xml' }],
  ],
});

Pipeline Artifact Upload

# bitbucket-pipelines.yml
pipelines:
  default:
    - step:
        name: Run Tests
        image: mcr.microsoft.com/playwright:v1.58.2-noble
        script:
          - npm ci
          - npx playwright test
        artifacts:
          - test-results/**

Bitbucket Pipelines artifacts are automatically available to FixSense — no extra configuration needed beyond listing the artifact paths in your pipeline.

Setup

Step 1: Sign in with Bitbucket

Go to the FixSense login page and click Sign in with Bitbucket. This grants FixSense read access to your Bitbucket profile and repositories.

Step 2: Connect your repository

  1. Open the Setup page
  2. FixSense will load your Bitbucket repositories automatically
  3. Select the repository you want to connect
  4. Click Connect Repository

FixSense will automatically:

  • Register a webhook on the repository for pipeline completion events
  • Save the configuration

Step 3: Trigger a pipeline

Push a commit or run a pipeline manually. When a test fails, FixSense will:

  1. Receive the pipeline completion webhook
  2. Download test artifacts from the failed pipeline step
  3. Parse the JUnit XML test report
  4. Run AI analysis on each failure
  5. Post results to the dashboard (and optionally as PR comments)

Features

All core FixSense features work with Bitbucket:

FeatureBitbucket Support
AI failure analysisYes
Flakiness scoringYes
PR commentsYes (via Pull Request Comments API)
Quality gatesYes (via Commit Status API)
Slack notificationsYes
DashboardYes
Auto-fix agentYes

Bitbucket vs GitHub Differences

GitHubBitbucket
AuthGitHub App (automatic)Bitbucket OAuth
WebhookAuto-registered by GitHub AppAuto-registered during setup
Quality gateChecks API (check run)Commit Status API
PR commentsPull Request reviewsPR Comments API
Artifact formatGitHub Artifacts APIPipeline step log artifacts
Auto-fixGitHub Actions workflowCustom pipeline trigger

Auto-Fix on Bitbucket

FixSense can automatically fix failing tests on Bitbucket using a custom pipeline. To enable auto-fix:

Step 1: Add the fix pipeline to your repository

Add a custom pipeline to your bitbucket-pipelines.yml:

pipelines:
  custom:
    fixsense-fix:
      - step:
          name: FixSense Auto-Fix
          image: mcr.microsoft.com/playwright:v1.58.2-noble
          script:
            - echo "FixSense auto-fix pipeline"
            # The auto-fix agent will be triggered by FixSense
          artifacts:
            - test-results/**

Step 2: Enable auto-fix in the dashboard

  1. Go to the Dashboard
  2. Open Settings
  3. Toggle Auto-Fix to enabled
  4. Provide your AI API key for the fix agent

When a test fails, FixSense will trigger the custom pipeline, run the AI fix agent, and create a pull request with the proposed fix.

Auto-fix uses your Bitbucket Pipeline minutes. Each fix attempt typically takes 2-5 minutes depending on test complexity.

Alternative: FixSense Pipe

You can also add FixSense as a Bitbucket Pipe — a standalone pipeline step that sends test results for analysis:

pipelines:
  default:
    - step:
        name: Run Tests
        script:
          - npm ci
          - npx playwright test
        artifacts:
          - test-results/**
    - step:
        name: FixSense Analysis
        script:
          - pipe: docker://sgace11/fixsense-pipe:0.1.0
            variables:
              FIXSENSE_API_KEY: $FIXSENSE_API_KEY
              RESULTS_PATH: "test-results/**"

This works alongside the webhook integration — use whichever fits your workflow. The pipe is useful if you prefer explicit pipeline steps over automatic webhook-based analysis.

Troubleshooting

No repositories appear during setup

Make sure you have Admin access to at least one Bitbucket repository. FixSense only shows repositories where you can manage webhooks.

No analyses appear after pipeline failure

  1. Check that your bitbucket-pipelines.yml includes test-results/** in the artifacts section
  2. Verify your test framework config includes a JUnit XML reporter
  3. Check that the pipeline completed with FAILED or STOPPED status
  4. Verify the webhook exists: Repository Settings > Webhooks

"Invalid grant" error when signing in

This usually means the Bitbucket OAuth session expired. Sign out of FixSense and sign in again with Bitbucket.

Auto-fix pipeline not triggering

  1. Verify the custom pipeline fixsense-fix exists in your bitbucket-pipelines.yml
  2. Make sure the pipeline is committed and pushed to the default branch
  3. Check that auto-fix is enabled in the FixSense dashboard settings