Metadata-Version: 2.4
Name: testops-mirror
Version: 0.1.1
Summary: Mirror test cases from any TMS into a Git repository as Markdown files
Project-URL: Homepage, https://github.com/exzist-qa/testops-mirror
Project-URL: Repository, https://github.com/exzist-qa/testops-mirror
Project-URL: Issues, https://github.com/exzist-qa/testops-mirror/issues
Author: testops-mirror contributors
License: MIT License
        
        Copyright (c) 2026 testops-mirror contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: allure,git,mirror,test-management,testing,testops,tms
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Requires-Dist: gitpython>=3.1
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2
Requires-Dist: python-dotenv>=1.0
Requires-Dist: pyyaml>=6
Requires-Dist: rich>=13
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest-cov>=5; extra == 'dev'
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Description-Content-Type: text/markdown

# testops-mirror

> Mirror test cases from any TMS into a Git repository — one file per test case, history forever.

```
mirror/
├── Transfers/
│   ├── Negative/
│   │   └── TC-2301-transfer-to-blocked-account.md
│   └── TC-2201-transfer-between-own-accounts.md
└── Auth/
    └── TC-1001-login-with-valid-credentials.md
```

## Why

Your TMS is a single point of failure. Test cases deserve version control just like code —
history, diff, blame, and code review through merge requests.

testops-mirror pulls every test case on a schedule and commits changes to a plain Git repo.
No vendor lock-in, no proprietary format.

## Quick Start

**pip:**

```bash
pip install testops-mirror
cp .env.example .env  # fill in TESTOPS_ENDPOINT and TESTOPS_TOKEN
testops-mirror sync --project-id 42 --repo ./mirror
```

**Docker:**

```bash
docker run --rm \
  -e TESTOPS_ENDPOINT=https://testops.example.com \
  -e TESTOPS_TOKEN=your-token \
  -v $(pwd)/mirror:/mirror \
  ghcr.io/exzist-qa/testops-mirror \
  sync --project-id 42 --repo /mirror
```

## Example output file

See [`docs/example/Transfers/Negative/TC-2301-transfer-to-blocked-account.md`](docs/example/Transfers/Negative/TC-2301-transfer-to-blocked-account.md)
for a real file generated by the tool from Allure TestOps fixture data.

## Supported TMS

| TMS | Status |
|-----|--------|
| Allure TestOps | ✅ |
| TestIT | 🚧 planned |
| TestRail | 🤝 contributions welcome |

## Configuration

| Option | Env | Default | Description |
|--------|-----|---------|-------------|
| `--project-id` | — | required | TMS project ID |
| `--endpoint` | `TESTOPS_ENDPOINT` | required | Base URL of TMS |
| `--token` | `TESTOPS_TOKEN` | required | API token |
| `--repo` | — | `./mirror` | Local Git repo path |
| `--suite-field` | `TESTOPS_SUITE_FIELD` | `Suite` | Custom field for folder structure |
| `--dry-run` | — | false | Preview changes without writing |
| `-v/--verbose` | — | false | Verbose logging |

> **Note:** API endpoint paths are verified against Allure TestOps documented API.
> If your instance uses different paths, check `<endpoint>/swagger-ui/` and
> update the constants in `connectors/allure_testops.py`.

## Roadmap

- Attachments download
- TestIT connector
- Index file (`cases/INDEX.md`) with a table of all cases
- Reverse import (Markdown → TMS)

## License

MIT
