squish-qatouch
v1.1.0
Published
QA Touch reporter for Squish (Froglogic/Qt) — uploads Squish native XML or JUnit XML results to QA Touch, linking by case ID or title and auto-creating modules, test cases and test runs.
Downloads
223
Maintainers
Readme
squish-qatouch
QA Touch reporter for Squish (Froglogic / Qt) — reads your Squish result XML and uploads it to QA Touch: links each result to its case by case ID or title, creates missing modules, test cases and test runs, or updates an existing run.
Supported result formats
| Format | How to generate |
|--------|----------------|
| Squish native XML | squishrunner --reportgen xml,results.xml |
| JUnit XML | squish2junit results/ junit.xml or --reportgen xml.junit,... |
Auto-detected at runtime by the root element.
Installation
npm install squish-qatouchNo peer dependencies — works standalone in any Node.js project.
Quick start
import { SquishQATouchReporter } from "squish-qatouch";
const reporter = new SquishQATouchReporter({
domain: "mycompany", // QA Touch domain
apiToken: "YOUR_API_TOKEN",
projectKey: "PROJ",
assignTo: "user-key",
resultsFile: "./results/squish.xml", // native XML or JUnit XML
milestoneName: "Sprint 12", // created if it does not exist
tag: "squish",
});
await reporter.run();Run it after squishrunner finishes:
npx ts-node upload-results.tsLinking tests to cases by ID
Put the QA Touch case ID (the TR0015-style code shown in test runs) in the Squish test case name, e.g.
tst_TR0015_login, and its result goes to that case, whatever the rest of the name. No case is ever created
for an ID.
- The ID wins: a test with an ID goes to that case even if its name matches another case.
- The ID is
TRplus at least 4 digits standing on its own (tst_TR0015_login,tst_login_TR0015);TR4Calibrationis not an ID andTR00150is notTR0015. - Several IDs in one name (
tst_TR0014_TR0015_flow) upload the result to each case. - Several results for one ID are merged: the worst status wins (failed > blocked > passed) and the failure messages are combined.
- An ID that matches no case is reported and skipped.
- Tests without an ID are matched by title and created as before.
Uploading into an existing run
runId uploads into an existing test run instead of creating a milestone and a new run — e.g. to put
retest results into the original run.
- Results are matched to the run's cases by case ID, otherwise by title.
- Results whose case is not in the run are reported and skipped; nothing is created.
assignTo,milestone*andtagare not needed.
await new SquishQATouchReporter({ ...common, assignTo: "user-key", resultsFile: "results.xml", runKeyFile: "run_key.txt" }).run();
await new SquishQATouchReporter({ ...common, resultsFile: "retest.xml", runId: fs.readFileSync("run_key.txt", "utf-8") }).run();Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| domain | string | — | Your QA Touch domain |
| apiToken | string | — | QA Touch API token |
| projectKey | string | — | QA Touch project key |
| assignTo | string? | — | User key to assign the run to (required unless runId) |
| resultsFile | string | — | Path to the Squish XML result file |
| testsuiteId | string? | — | Pin all cases to one module key (skips auto-create) |
| milestoneName | string? | "Squish Automation" | Milestone name — reused or created |
| milestoneKey | string? | — | Use an existing milestone key directly |
| createCases | boolean? | true | Auto-create missing test cases (tests without an ID) |
| tag | string? | "squish" | Tag applied to the test run |
| runId | string? | — | Upload into this existing test run |
| runKeyFile | string? | — | File to write the key of the run the results went into |
CI example (GitHub Actions)
- name: Run Squish tests
run: squishrunner --testsuite suite_MyApp --reportgen xml,results/squish.xml
- name: Upload to QA Touch
run: npx ts-node upload-results.tsDevelopment
npm ci
npm testChangelog
1.1.0
- New: link tests to QA Touch cases by case ID in the test name (
tst_TR0015_login). Unknown IDs are skipped, never created. - New:
runIduploads into an existing test run;assignTois then optional. - New:
runKeyFilewrites the key of the run the results went into. - Fix: in JUnit XML, a self-closing
<testcase .../>swallowed the next test case. - Fix: in JUnit XML, a test's
namewas read fromclassnamewhenclassnamecame first. - Fix: milestones are now read across all pages (10 per page). Before, a milestone beyond the first 10 was not found and a duplicate was created on every upload.
- Unchanged: milestone and tag defaults, run naming (
Squish Run <timestamp>), case texts, and title matching/creation for tests without an ID.
1.0.2
- Fix:
getTestCases()pagination now uses deduplication instead ofper_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:
moduleKeyquery parameter is silently ignored by the/getAllTestCasesAPI. Filtering by module is now done client-side usingitem.module_key.
License
ISC
