Metadata-Version: 2.4
Name: qa-copilot
Version: 0.1.0
Summary: AI-powered self-healing for Selenium and Playwright tests
Author-email: StratagemLabs <support@qacopilot.com>
License: Proprietary
Project-URL: Homepage, https://qacopilot.com
Project-URL: Documentation, https://docs.qacopilot.com
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: pytest>=7.0
Requires-Dist: requests>=2.28
Provides-Extra: selenium
Requires-Dist: selenium>=4.0; extra == "selenium"
Provides-Extra: playwright
Requires-Dist: playwright>=1.30; extra == "playwright"
Provides-Extra: all
Requires-Dist: selenium>=4.0; extra == "all"
Requires-Dist: playwright>=1.30; extra == "all"

# 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
