semvec/pypi-packages huggingface dataset:
qa-copilot 0.2.0
AI-powered self-healing for Selenium and Playwright tests
Requires Python: >=3.9

# QA Copilot

AI-powered self-healing for Selenium and Playwright tests.

## Install

```bash
pip install qa-copilot
```

## Quick Start

```bash
# Detect broken locators
pytest tests/ --heal

# Report to QA Platform dashboard
pytest tests/ --heal --qa-copilot-key=sk_live_your_key_here

# Or use environment variable
export QA_COPILOT_KEY=sk_live_your_key_here
pytest tests/ --heal
```

## Options

| Flag | Description |
|------|-------------|
| `--heal` | Enable broken locator detection |
| `--qa-copilot-key KEY` | Platform API key (or `QA_COPILOT_KEY` env var) |
| `--qa-copilot-url URL` | API URL (default: `https://api.qacopilot.com`) |

## Supported Frameworks

- **Selenium** WebDriver (Python)
- **Playwright** (Python)

## CI Integration

### Jenkins

```groovy
pipeline {
    agent any
    stages {
        stage('Test') {
            steps {
                sh '''
                    pip install qa-copilot
                    pytest tests/ --heal --qa-copilot-key=$QA_COPILOT_KEY
                '''
            }
        }
    }
    environment {
        QA_COPILOT_KEY = credentials('qa-copilot-key')
    }
}
```

### Azure DevOps

```yaml
steps:
  - script: |
      pip install qa-copilot
      pytest tests/ --heal
    env:
      QA_COPILOT_KEY: $(QA_COPILOT_KEY)
```

### GitHub Actions

```yaml
steps:
  - run: |
      pip install qa-copilot
      pytest tests/ --heal
    env:
      QA_COPILOT_KEY: ${{ secrets.QA_COPILOT_KEY }}
```

## How It Works

1. Plugin intercepts test failures caused by broken locators
2. Extracts the broken locator from the exception message
3. Reports the event to the QA Platform SaaS dashboard
4. In the dashboard, you can review, approve, and create PRs with fixes

## Get Your API Key

1. Sign up at [qacopilot.com](https://qacopilot.com)
2. Create a project
3. Generate an API key
4. Add it to your CI environment