testeiya 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/prompt/context.js +9 -1
- package/dist/prompt/context.js.map +1 -1
- package/package.json +1 -1
- package/prompt/context.ts +8 -1
- package/skills/skills.lock.json +2 -1
- package/skills/testomatio/test-management/migrate-to-testomatio/SKILL.md +52 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/CSV_MIGRATION.md +72 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/CUSTOM_MIGRATION.md +11 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/TESTRAIL_MIGRATION.md +87 -0
- package/skills/testomatio/test-management/migrate-to-testomatio/references/XRAY_MIGRATION.md +56 -0
package/dist/prompt/context.js
CHANGED
|
@@ -10,7 +10,7 @@ export function contextPromptSection(entries, folders = []) {
|
|
|
10
10
|
|
|
11
11
|
${contextLines(entries, folders)}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Everything whose path starts with \`${TESTEIYA_DIR_NAME}/\` is in a hidden dir: file-search tools skip hidden dirs by default, so search those explicitly (pass hidden:true, or prefix the path with \`${TESTEIYA_DIR_NAME}/\`). Any other path above is an ordinary workspace path the user attached — read it where it is. Linked folders and cloned repositories are reference material: read them, never modify them. A linked folder is a symlink — wildcard searches do not descend into it; search it with its own path prefix (e.g. \`${TESTEIYA_DIR_NAME}/<name>/\`). Documents under \`${TESTEIYA_DIR_NAME}/requirements\` and \`${TESTEIYA_DIR_NAME}/docs\` are specs and plans — use them when writing or reviewing tests.
|
|
14
14
|
</workspace-context>
|
|
15
15
|
`;
|
|
16
16
|
}
|
|
@@ -67,6 +67,14 @@ function parentDir(rel) {
|
|
|
67
67
|
}
|
|
68
68
|
function describeEntry(e) {
|
|
69
69
|
const date = e.addedAt?.split("T")[0] ?? "";
|
|
70
|
+
// A path outside the hidden dir is one the user attached where it already
|
|
71
|
+
// lives — it is part of the project, not reference material dropped beside it.
|
|
72
|
+
if (!e.path.startsWith(`${TESTEIYA_DIR_NAME}/`)) {
|
|
73
|
+
let what = "folder";
|
|
74
|
+
if (e.kind === "file")
|
|
75
|
+
what = "file";
|
|
76
|
+
return `\`${e.path}\` — workspace ${what}, attached by the user (${date})`;
|
|
77
|
+
}
|
|
70
78
|
let from = "";
|
|
71
79
|
if (e.origin && e.origin !== e.name)
|
|
72
80
|
from = ` from ${e.origin}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../prompt/context.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,OAAuB,EACvB,UAA2B,EAAE;IAE7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAA;;;;IAIX,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC;;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../prompt/context.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,4EAA4E;AAC5E,MAAM,UAAU,oBAAoB,CAClC,OAAuB,EACvB,UAA2B,EAAE;IAE7B,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC5D,OAAO,MAAM,CAAA;;;;IAIX,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC;;0CAEQ,iBAAiB,kJAAkJ,iBAAiB,sTAAsT,iBAAiB,kCAAkC,iBAAiB,yBAAyB,iBAAiB;;GAE/nB,CAAC;AACJ,C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AC;IAChF,OAAO,KAAK,CAAC,CAAC,IAAI,gBAAgB,IAAI,KAAK,IAAI,GAAG,CAAC;AACrD,CAAC"}
|
package/package.json
CHANGED
package/prompt/context.ts
CHANGED
|
@@ -13,7 +13,7 @@ export function contextPromptSection(
|
|
|
13
13
|
|
|
14
14
|
${contextLines(entries, folders)}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Everything whose path starts with \`${TESTEIYA_DIR_NAME}/\` is in a hidden dir: file-search tools skip hidden dirs by default, so search those explicitly (pass hidden:true, or prefix the path with \`${TESTEIYA_DIR_NAME}/\`). Any other path above is an ordinary workspace path the user attached — read it where it is. Linked folders and cloned repositories are reference material: read them, never modify them. A linked folder is a symlink — wildcard searches do not descend into it; search it with its own path prefix (e.g. \`${TESTEIYA_DIR_NAME}/<name>/\`). Documents under \`${TESTEIYA_DIR_NAME}/requirements\` and \`${TESTEIYA_DIR_NAME}/docs\` are specs and plans — use them when writing or reviewing tests.
|
|
17
17
|
</workspace-context>
|
|
18
18
|
`;
|
|
19
19
|
}
|
|
@@ -71,6 +71,13 @@ function parentDir(rel: string): string {
|
|
|
71
71
|
|
|
72
72
|
function describeEntry(e: ContextEntry): string {
|
|
73
73
|
const date = e.addedAt?.split("T")[0] ?? "";
|
|
74
|
+
// A path outside the hidden dir is one the user attached where it already
|
|
75
|
+
// lives — it is part of the project, not reference material dropped beside it.
|
|
76
|
+
if (!e.path.startsWith(`${TESTEIYA_DIR_NAME}/`)) {
|
|
77
|
+
let what = "folder";
|
|
78
|
+
if (e.kind === "file") what = "file";
|
|
79
|
+
return `\`${e.path}\` — workspace ${what}, attached by the user (${date})`;
|
|
80
|
+
}
|
|
74
81
|
let from = "";
|
|
75
82
|
if (e.origin && e.origin !== e.name) from = ` from ${e.origin}`;
|
|
76
83
|
if (e.kind === "repo") return `\`${e.path}\` — git repository${from} (${date})`;
|
package/skills/skills.lock.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{
|
|
4
4
|
"source": "testomatio/skills",
|
|
5
5
|
"ref": null,
|
|
6
|
-
"sha": "
|
|
6
|
+
"sha": "b29f59256c3a344c2a563906314e3132bbfeee92",
|
|
7
7
|
"folder": "testomatio",
|
|
8
8
|
"skills": [
|
|
9
9
|
"automate-manual-test-cases",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"explorbot-plan",
|
|
15
15
|
"explorbot-setup",
|
|
16
16
|
"improve-test-cases",
|
|
17
|
+
"migrate-to-testomatio",
|
|
17
18
|
"prima",
|
|
18
19
|
"pull-request-diff-analyzer",
|
|
19
20
|
"qa-automation-test-consolidation",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-to-testomatio
|
|
3
|
+
description: Migrate tests to Testomat.io from TestRail, XRay, Testmo, QMetry, Allure TestOps, TestCaseLabs, Qase, Zephyr, QTest, CSV/XLSX, or an unsupported TMS needing a custom converter or API script. Use when user wants to import tests from another TMS, move test suites to Testomat.io, or convert an export file to Testomat.io format.
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: Testomat.io
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Migrate to Testomat.io
|
|
11
|
+
|
|
12
|
+
Migrate test suites from another TMS into Testomat.io via UI import, API migration script, or CSV converter.
|
|
13
|
+
|
|
14
|
+
## Pick Strategy
|
|
15
|
+
|
|
16
|
+
- Identify source: ask for TMS name only if not given.
|
|
17
|
+
- Identify input: live instance with API access, or exported CSV/XLSX file.
|
|
18
|
+
- Route by source:
|
|
19
|
+
- TestRail + API access, >1000 tests or needs attachments/runs: API migration script ([TESTRAIL_MIGRATION.md](./references/TESTRAIL_MIGRATION.md)).
|
|
20
|
+
- TestRail, <1000 tests, no attachments: built-in UI import (CSV or TestRail API option in Imports window).
|
|
21
|
+
- XRay (Jira): migration script producing Testomat.io CSV ([XRAY_MIGRATION.md](./references/XRAY_MIGRATION.md)).
|
|
22
|
+
- Testmo, QMetry, TestCaseLabs, Allure TestOps export file: CSV converter script ([CSV_MIGRATION.md](./references/CSV_MIGRATION.md)).
|
|
23
|
+
- Qase, QTest, Zephyr, other TMS export file: direct UI CSV import, no script ([CSV_MIGRATION.md](./references/CSV_MIGRATION.md)).
|
|
24
|
+
- Unsupported or broken TMS support: build a custom converter or API script ([CUSTOM_MIGRATION.md](./references/CUSTOM_MIGRATION.md)).
|
|
25
|
+
- Screenshots or file attachments needed: use the API script path, CSV import cannot create attachments.
|
|
26
|
+
- **Never invent converter output columns; converted files always import with format `Testomat.io`.**
|
|
27
|
+
- **API scripts need source credentials plus a Testomat.io General Token; never hardcode tokens, use `.env`.**
|
|
28
|
+
|
|
29
|
+
## Scope
|
|
30
|
+
|
|
31
|
+
- Migration covers test cases; runs, defects, and requirements are optional extras via API.
|
|
32
|
+
- Upload run results only after test cases are uploaded.
|
|
33
|
+
- User fields with no Testomat.io equivalent are not dropped silently: map them to Labels/Tags or extend the converter script.
|
|
34
|
+
|
|
35
|
+
## Workflow
|
|
36
|
+
|
|
37
|
+
- Create empty Testomat.io project for the import target.
|
|
38
|
+
- Get source access: API credentials (TestRail/XRay path) or export file (CSV path).
|
|
39
|
+
- Run the routed path:
|
|
40
|
+
- API script path: clone repo to a temp dir, configure `.env`, dry-run, run full migration.
|
|
41
|
+
- CSV path: convert if a converter exists, then import via UI.
|
|
42
|
+
- Custom path: build converter or API script first, then follow the matching path above.
|
|
43
|
+
- UI import in all cases ends at: Tests tab > (`...`) > Import from other TMS > Import > Import from CSV > pick source format > Choose file > Create.
|
|
44
|
+
- Verify: check Tests page count, suite nesting, steps formatting, priorities/tags.
|
|
45
|
+
- Offer post-migration cleanup: `detect-duplicate-test-cases`, `improve-test-cases`.
|
|
46
|
+
|
|
47
|
+
## References
|
|
48
|
+
|
|
49
|
+
- [TESTRAIL_MIGRATION.md](./references/TESTRAIL_MIGRATION.md) — TestRail UI options, API script env vars, runs and attachments migration.
|
|
50
|
+
- [XRAY_MIGRATION.md](./references/XRAY_MIGRATION.md) — XRay token extraction, env vars, folder-scoped import.
|
|
51
|
+
- [CSV_MIGRATION.md](./references/CSV_MIGRATION.md) — converter scripts, direct UI imports, custom Testomat.io XLSX columns.
|
|
52
|
+
- [CUSTOM_MIGRATION.md](./references/CUSTOM_MIGRATION.md) — custom converter or API v2 script for unsupported or broken TMS support.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# CSV Migration (Testmo, QMetry, TestCaseLabs, Allure, Others)
|
|
2
|
+
|
|
3
|
+
Two paths: converter script (normalizes export to Testomat.io CSV), or direct UI import.
|
|
4
|
+
|
|
5
|
+
Docs: https://docs.testomat.io/project/import-export/import/import-tests-from-csv-xlsx
|
|
6
|
+
|
|
7
|
+
## UI Import (All Sources)
|
|
8
|
+
|
|
9
|
+
- Open project > Tests tab > (`...`) > Import from other TMS > Import > Import from CSV.
|
|
10
|
+
- Sidebar: pick the tool the file came from (Qase, QTest, Zephyr, TestRail, XRay, Testmo, QMetry, Allure TestOps, TestCaseLabs, Testomatio) > Choose file > Create.
|
|
11
|
+
- Same flow works for BDD projects; rows map Precondition > Given, Step > When, Expected Result > Then.
|
|
12
|
+
- Converted files always import with format `Testomatio`.
|
|
13
|
+
|
|
14
|
+
## Converter Scripts
|
|
15
|
+
|
|
16
|
+
- Requires NodeJS 18+, each produces `*_Testomatio.csv`.
|
|
17
|
+
- Clone outside the project repo, one per source:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/testomatio/migrate-testmo.git <temp-dir>/migrate-testmo
|
|
21
|
+
git clone https://github.com/testomatio/migrate-qmetry.git <temp-dir>/migrate-qmetry
|
|
22
|
+
git clone https://github.com/testomatio/migrate-testcaselabs.git <temp-dir>/migrate-testcaselabs
|
|
23
|
+
git clone https://github.com/testomatio/migrate-allure.git <temp-dir>/migrate-allure
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- Run inside the cloned repo:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install
|
|
30
|
+
node convert.js <path-to-export-csv>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- Example: `node convert.js TestCases.csv` produces `TestCases_Testomatio.csv`.
|
|
34
|
+
- Allure output is `allure_Testomatio.csv`; maps Feature/Epic/Story to Folder hierarchy, `automated` flag to Status, `jira-*` columns to Issues.
|
|
35
|
+
- No options to invent; script takes only the input file path.
|
|
36
|
+
- Edit `convert.js` in the cloned repo to adjust column mapping.
|
|
37
|
+
|
|
38
|
+
## Sources Without Converter
|
|
39
|
+
|
|
40
|
+
- Qase, QTest, Zephyr: export CSV/XLSX from the source tool, import directly with matching format dropdown.
|
|
41
|
+
- Qase walkthrough: https://docs.testomat.io/tutorials/migration-from-qase
|
|
42
|
+
|
|
43
|
+
## Custom Testomat.io XLSX
|
|
44
|
+
|
|
45
|
+
- Build a file with these columns (ID left empty): ID, Title, Status, Folder, Emoji, Priority, Tags, Owner, Description, Labels, Issues.
|
|
46
|
+
- `Folder` nesting: `/suite/sub-suite`.
|
|
47
|
+
- `Priority`: normal, important, high, critical, low.
|
|
48
|
+
- `Status`: manual or automated, blank allowed.
|
|
49
|
+
- `Description` supports Markdown.
|
|
50
|
+
- `Issues`: Jira keys (`ABC-123`), comma-separated.
|
|
51
|
+
- Example file: https://testomatiofiles.ams3.cdn.digitaloceanspaces.com/Testomat_example.xlsx
|
|
52
|
+
|
|
53
|
+
## ID Compatibility
|
|
54
|
+
|
|
55
|
+
- Testomat.io public IDs are 8 alphanumeric chars, case-insensitive.
|
|
56
|
+
- Keep old IDs recognizable: zero-pad the numeric part to 8 chars (`TC-1` becomes `tc000001`).
|
|
57
|
+
- Put the mapped ID in the `ID` column of the Testomat.io CSV.
|
|
58
|
+
|
|
59
|
+
## Suites and Tests
|
|
60
|
+
|
|
61
|
+
- A source suite holding both suites and tests must be split: suite-folder holds only suites, suite-file holds only tests (they differ by `file_type`).
|
|
62
|
+
- Every test needs a suite: always fill the `Folder` column, using `/` nesting (`/suite/sub-suite`).
|
|
63
|
+
|
|
64
|
+
## Descriptions and Images
|
|
65
|
+
|
|
66
|
+
- Descriptions are pure Markdown; format steps per [test-case-format.md](../qa-write-test-cases/references/test-case-format.md).
|
|
67
|
+
- Images inside test cases are not carried by CSV: upload them via Testomat.io API, or switch to the API script path.
|
|
68
|
+
|
|
69
|
+
## Recovery
|
|
70
|
+
|
|
71
|
+
- Import fails: first row must hold column names.
|
|
72
|
+
- Wrong suites: check `Folder` column uses `/` nesting.
|
package/skills/testomatio/test-management/migrate-to-testomatio/references/CUSTOM_MIGRATION.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Custom Migration (Unsupported or Broken TMS)
|
|
2
|
+
|
|
3
|
+
When no converter or script fits the source, build one. Two options, cheapest first.
|
|
4
|
+
|
|
5
|
+
- CSV-to-Testomat.io converter: Node script reading the source export, writing Testomat.io CSV columns (see [CSV_MIGRATION.md](./CSV_MIGRATION.md) for column spec, ID padding, and suite splitting).
|
|
6
|
+
- API v2 migration script: pushes cases directly, required when attachments or run results must migrate.
|
|
7
|
+
- API reference: https://app.testomat.io/docs/openapi
|
|
8
|
+
- Base new API scripts on https://github.com/testomatio/migrate-testrail; for Jira-backed sources also use https://github.com/testomatio/migrate-xray.
|
|
9
|
+
- Map unmigrated user fields to Labels/Tags rather than dropping them; extend the script when the user flags an important field.
|
|
10
|
+
- Keep ID compatibility, suite-file vs suite-folder split, Markdown descriptions, and image uploads per [CSV_MIGRATION.md](./CSV_MIGRATION.md).
|
|
11
|
+
- Upload run results only after test cases are uploaded.
|
package/skills/testomatio/test-management/migrate-to-testomatio/references/TESTRAIL_MIGRATION.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# TestRail Migration
|
|
2
|
+
|
|
3
|
+
Three import methods. Pick by test count and attachment need.
|
|
4
|
+
|
|
5
|
+
- CSV file: simple import, no attachments.
|
|
6
|
+
- Built-in UI tool (TestRail API option): up to 1000 tests, no attachments.
|
|
7
|
+
- Migration script: over 1000 tests, attachments, test runs with results.
|
|
8
|
+
|
|
9
|
+
Docs: https://docs.testomat.io/project/import-export/import/import-tests-from-testrail
|
|
10
|
+
|
|
11
|
+
## UI Import
|
|
12
|
+
|
|
13
|
+
- Open project > Tests tab > (`...`) > Import from other TMS > Import > Import From TestRail.
|
|
14
|
+
- CSV option: Import > Import from CSV > dropdown `TestRail` > Choose file > Create.
|
|
15
|
+
- API option: enable API in TestRail (Administration > Site Settings > API toggle), enter TestRail credentials in Testomat.io Imports tab > Import Tests.
|
|
16
|
+
- Sample export for comparison: https://testomatio-artifacts.ams3.cdn.digitaloceanspaces.com/documentation/TestRail.csv
|
|
17
|
+
|
|
18
|
+
## Migration Script
|
|
19
|
+
|
|
20
|
+
Repo: https://github.com/testomatio/migrate-testrail
|
|
21
|
+
|
|
22
|
+
- Requires NodeJS 20+.
|
|
23
|
+
- Clone outside the project repo:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/testomatio/migrate-testrail.git <temp-dir>/migrate-testrail
|
|
27
|
+
cp .env.example .env
|
|
28
|
+
npm i
|
|
29
|
+
npm start
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- `.env` vars:
|
|
33
|
+
|
|
34
|
+
```env
|
|
35
|
+
TESTRAIL_URL=
|
|
36
|
+
TESTRAIL_USERNAME=
|
|
37
|
+
TESTRAIL_PASSWORD=
|
|
38
|
+
TESTRAIL_PROJECT_ID=
|
|
39
|
+
# TESTRAIL_SUITE_ID= # optional, single suite only
|
|
40
|
+
TESTOMATIO_TOKEN=testomat_****
|
|
41
|
+
TESTOMATIO_PROJECT=
|
|
42
|
+
# TESTOMATIO_HOST=https://app.testomat.io # custom instance only
|
|
43
|
+
# DRY_RUN=1 # dry run, no import
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- `TESTOMATIO_PROJECT` is the URL slug: `https://app.testomat.io/projects/<slug>`.
|
|
47
|
+
- `TESTOMATIO_TOKEN` is a General Token from https://app.testomat.io/account/access_tokens.
|
|
48
|
+
- Debug flags: `DEBUG="testomatio:testrail:*" npm start` (`:in` source data, `:out` posted data, `:migrate` processing).
|
|
49
|
+
- Single case debug (run after full migration): `TESTRAIL_CASE_ID=12345 npm start`.
|
|
50
|
+
- Edit `migrate.js` to customize sections, suites, steps mapping.
|
|
51
|
+
|
|
52
|
+
## Test Runs with Results
|
|
53
|
+
|
|
54
|
+
- Requires Project Reporting API key (project Settings > API section) as `TESTOMATIO_REPORT_TOKEN`.
|
|
55
|
+
- Import all cases first, then:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm run migrate-run-results
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
- Single run: `TESTRAIL_RUN_ID=<id> npm run migrate-run-results`.
|
|
62
|
+
- Already-imported runs are skipped via `@id:<run_id>` tag in run title.
|
|
63
|
+
- Artifacts need S3 bucket plus same S3 creds in Testomat.io project Settings:
|
|
64
|
+
|
|
65
|
+
```env
|
|
66
|
+
S3_ACCESS_KEY_ID=
|
|
67
|
+
S3_SECRET_ACCESS_KEY=
|
|
68
|
+
S3_REGION=
|
|
69
|
+
S3_BUCKET=
|
|
70
|
+
# S3_ENDPOINT= # non-AWS only
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Attachments Fix
|
|
74
|
+
|
|
75
|
+
- Fixes orphaned `index.php?/attachments/get/123` URLs left by earlier imports.
|
|
76
|
+
- Needs `TESTRAIL_SESSION` (browser cookie `tr_session` from DevTools > Application > Cookies after TestRail login).
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
npm run migrate-attachments:dry-run
|
|
80
|
+
npm run migrate-attachments
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Recovery
|
|
84
|
+
|
|
85
|
+
- Duplicated steps after TestRail template change: `git checkout opt/template-fields-sync`, rerun.
|
|
86
|
+
- UI tool cannot connect: API disabled in TestRail.
|
|
87
|
+
- CSV fails: first row must hold column names.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# XRay Migration
|
|
2
|
+
|
|
3
|
+
Script pulls from XRay API, produces a Testomat.io-compatible CSV, imported via UI.
|
|
4
|
+
|
|
5
|
+
Docs: https://docs.testomat.io/project/import-export/import/import-tests-from-xray
|
|
6
|
+
Repo: https://github.com/testomatio/migrate-xray
|
|
7
|
+
|
|
8
|
+
## Setup
|
|
9
|
+
|
|
10
|
+
- Requires NodeJS 20+.
|
|
11
|
+
- Clone outside the project repo:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
git clone https://github.com/testomatio/migrate-xray.git <temp-dir>/migrate-xray
|
|
15
|
+
cp .env.example .env
|
|
16
|
+
npm i
|
|
17
|
+
npm start
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- `.env` vars:
|
|
21
|
+
|
|
22
|
+
```env
|
|
23
|
+
JIRA_URL=
|
|
24
|
+
JIRA_USERNAME=
|
|
25
|
+
JIRA_TOKEN=
|
|
26
|
+
JIRA_PROJECT_ID=
|
|
27
|
+
XRAY_URL=
|
|
28
|
+
XRAY_INTERNAL_TOKEN=
|
|
29
|
+
# XRAY_FOLDER_ID= # optional, single folder from Test Repository URL (?selectedFolder=...)
|
|
30
|
+
TESTOMATIO_TOKEN=testomat_****
|
|
31
|
+
TESTOMATIO_PROJECT=
|
|
32
|
+
# DRY_RUN=1 # dry run, no import
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `JIRA_TOKEN` is an Atlassian API token: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
|
|
36
|
+
- `TESTOMATIO_TOKEN` is a General Token from https://app.testomat.io/account/access_tokens.
|
|
37
|
+
- `TESTOMATIO_PROJECT` is the URL slug: `https://app.testomat.io/projects/<slug>`.
|
|
38
|
+
|
|
39
|
+
## XRay Token Extraction
|
|
40
|
+
|
|
41
|
+
- XRay has no public token endpoint; extract manually.
|
|
42
|
+
- Open XRay app > F12 DevTools > Network tab > filter `xray.cloud.getxray.app`.
|
|
43
|
+
- Open any XRay request Headers, copy `X-Acpt` header value into `XRAY_INTERNAL_TOKEN`.
|
|
44
|
+
- Copy request Origin into `XRAY_URL` (usually `https://eu.xray.cloud.getxray.app` or `https://us.xray.cloud.getxray.app`).
|
|
45
|
+
- Token expires: on `401 ... Authentication request has expired` reopen XRay and fetch a fresh token.
|
|
46
|
+
|
|
47
|
+
## Import Result
|
|
48
|
+
|
|
49
|
+
- Tests tab > Imports > Import from CSV > dropdown `XRay` (or `Testomatio` for script output) > Choose file > Create.
|
|
50
|
+
- Debug: `DEBUG="testomatio:xray:*" npm start` (`:in` source, `:out` posted, `:migrate` processing).
|
|
51
|
+
- Edit `migrate.js` to customize steps or field mapping.
|
|
52
|
+
|
|
53
|
+
## Known Limitations
|
|
54
|
+
|
|
55
|
+
- Test params are not exported by XRay API.
|
|
56
|
+
- Tests referencing steps from another XRay test import as `[steps from a missing XRay test]` unless the referenced test is imported first.
|