Metadata-Version: 2.4
Name: squish-qatouch
Version: 1.0.2
Summary: QA Touch reporter for Squish (Froglogic/Qt) - auto-creates modules, test cases and test runs from Squish native XML or JUnit XML result files.
Author: UjjwalaMeena
License: ISC
Project-URL: Homepage, https://github.com/ujjwala91/squish-qatouch-py
Project-URL: Repository, https://github.com/ujjwala91/squish-qatouch-py
Project-URL: Issues, https://github.com/ujjwala91/squish-qatouch-py/issues
Keywords: squish,froglogic,qt,qatouch,reporter,test-management,qa
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: ISC License (ISCL)
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown

﻿# squish-qatouch

> QA Touch reporter for **Squish** (Froglogic / Qt Group) — pure Python, zero dependencies.
> Reads your Squish result file and automatically creates modules, test cases, milestones,
> and test runs in QA Touch.

## Supported result formats

| Format | How to generate |
|--------|----------------|
| **Squish native XML** | `squishrunner --reportgen xml,results.xml` |
| **JUnit XML** | `squish2junit results/ junit.xml` |

Auto-detected at runtime — just point `--results` at the file.

## Works with all Squish script languages

Python, JavaScript, Perl, Ruby, Tcl — the script language does not matter.
`squishrunner` always produces the same XML format.

## Installation

```bash
pip install squish-qatouch
```

Requires **Python >= 3.10**. No third-party dependencies.

## Usage — CLI

```bash
# after squishrunner writes results.xml
squish-qatouch \
  --results   ./results/squish.xml \
  --domain    mycompany \
  --token     $QATOUCH_TOKEN \
  --project   PROJ \
  --assign    user-key \
  --milestone-name "Sprint 12"
```

Or via `python -m`:

```bash
python -m squish_qatouch --results results.xml --domain mycompany \
  --token $QATOUCH_TOKEN --project PROJ --assign user-key
```

## Usage — Python API

```python
from squish_qatouch import SquishQATouchReporter

reporter = SquishQATouchReporter(
    domain="mycompany",
    api_token="YOUR_TOKEN",
    project_key="PROJ",
    assign_to="user-key",
    results_file="./results/squish.xml",
    milestone_name="Sprint 12",   # created automatically if missing
    tag="squish",
)
reporter.run()
```

## All options

| Option | CLI flag | Default | Description |
|--------|----------|---------|-------------|
| `domain` | `--domain` | — | QA Touch domain |
| `api_token` | `--token` | — | QA Touch API token |
| `project_key` | `--project` | — | QA Touch project key |
| `assign_to` | `--assign` | — | User key to assign the run to |
| `results_file` | `--results` | — | Path to Squish XML or JUnit XML |
| `testsuite_id` | `--testsuite` | — | Pin all cases to one module key |
| `milestone_name` | `--milestone-name` | `"Squish Automation"` | Milestone name |
| `milestone_key` | `--milestone-key` | — | Use existing milestone key directly |
| `create_cases` | `--no-create-cases` | `True` | Auto-create missing test cases |
| `tag` | `--tag` | `"squish"` | Tag on the test run |

## CI example (GitHub Actions)

```yaml
- name: Run Squish tests
  run: |
    squishrunner --testsuite suite_MyApp --reportgen xml,results/squish.xml

- name: Set up Python
  uses: actions/setup-python@v5
  with:
    python-version: "3.12"

- name: Upload to QA Touch
  run: |
    pip install squish-qatouch
    squish-qatouch --results results/squish.xml \
      --domain mycompany --token ${{ secrets.QATOUCH_TOKEN }} \
      --project PROJ --assign user-key
```

## Changelog

### 1.0.2

- **Fix:** `get_test_cases()` pagination now uses deduplication instead of `per_page`-based stop condition. The API returns variable item counts per page, which caused pagination to stop at page 1 even when more pages existed.
- **Fix:** `module_key` query parameter is silently ignored by the `/getAllTestCases` API. Filtering by module is now done client-side using `item["module_key"]`.

## License

ISC
