testeiya 0.4.5 → 0.5.0

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.
Files changed (32) hide show
  1. package/README.md +2 -2
  2. package/dist/prompt/report.js +38 -0
  3. package/dist/prompt/report.js.map +1 -0
  4. package/dist/prompt/system-prompt.js +16 -93
  5. package/dist/prompt/system-prompt.js.map +1 -1
  6. package/dist/prompt/testomat.io.js +47 -0
  7. package/dist/prompt/testomat.io.js.map +1 -0
  8. package/dist/prompt/{comment-thread.js → thread.js} +59 -6
  9. package/dist/prompt/thread.js.map +1 -0
  10. package/dist/src/args.js +2 -2
  11. package/dist/src/output.js +1 -1
  12. package/dist/src/output.js.map +1 -1
  13. package/dist/src/run.js +16 -2
  14. package/dist/src/run.js.map +1 -1
  15. package/dist/src/session.js +1 -0
  16. package/dist/src/session.js.map +1 -1
  17. package/package.json +1 -1
  18. package/prompt/report.ts +46 -0
  19. package/prompt/system-prompt.ts +18 -111
  20. package/prompt/testomat.io.ts +63 -0
  21. package/prompt/{comment-thread.ts → thread.ts} +70 -6
  22. package/skills/playwright/playwright-cli/SKILL.md +31 -21
  23. package/skills/playwright/playwright-cli/references/video-recording.md +64 -3
  24. package/skills/skills.lock.json +3 -2
  25. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +15 -0
  26. package/skills/testomatio/requirements/qa-explain-behavior/SKILL.md +1 -0
  27. package/skills/testomatio/requirements/wiki-from-code/SKILL.md +124 -0
  28. package/skills/testomatio/requirements/wiki-from-code/references/layout.md +94 -0
  29. package/skills/testomatio/test-management/migrate-to-testomatio/SKILL.md +15 -4
  30. package/skills/testomatio/test-management/migrate-to-testomatio/references/CSV_MIGRATION.md +3 -1
  31. package/skills/testomatio/test-management/migrate-to-testomatio/references/TESTMO_MIGRATION.md +101 -0
  32. package/dist/prompt/comment-thread.js.map +0 -1
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: wiki-from-code
3
+ description: >-
4
+ Builds and refreshes a product wiki from the application source code (implicit requirements).
5
+ Optionally attaches issue-tracker task/issue/story links.
6
+ Use when the user asks to build or refresh the wiki/requirements/specification/docs from code, or to catalog existing functionality.
7
+ metadata:
8
+ author: Testomat.io
9
+ version: 1.0.0
10
+ ---
11
+
12
+ # Wiki from code
13
+
14
+ Wiki of **how the product works now**. Bootstrap from code. Refresh when the code changes.
15
+
16
+ We call this "wiki" as the closest term to what we are building. But user may ask for "requirements" or "specification" or "docs" or something similar.
17
+
18
+ **Implicit** requirements means inferred from code. **Explicit** requirements means from issues/tasks/docs etc.
19
+
20
+ Decide audience once:
21
+
22
+ | Audience | Human wiki |
23
+ | --- | --- |
24
+ | End users (default, preferred) | Behavior and acceptance only. No file paths, types, stack, or protocol internals. |
25
+ | Callers who are not end users (API, job, contract etc.) | Technical entry could be treated as requirements. |
26
+
27
+ ## Modes
28
+
29
+ Pick one. If unclear, **bootstrap** when `wiki/` is missing, else **refresh**.
30
+
31
+ | Mode | When |
32
+ | --- | --- |
33
+ | `bootstrap` | First wiki from this repo |
34
+ | `refresh` | Code moved; update implicit pages + catalog |
35
+
36
+ Default root: `wiki/` (or the user’s path).
37
+
38
+ Move from **overview** to **details**. Do not write feature pages before the tree exists.
39
+
40
+ ## Steps
41
+
42
+ ```
43
+ - [ ] 1. Catalog (shallow)
44
+ - [ ] 2. Tracker links? (ask; optional)
45
+ - [ ] 3. Overview tree (indexes)
46
+ - [ ] 4. Dive each area (one subagent each)
47
+ - [ ] 5. Validate
48
+ - [ ] 6. Report
49
+ ```
50
+
51
+ Read [references/layout.md](references/layout.md) before writing files.
52
+
53
+ ## Rules
54
+
55
+ - Current-state code wins any other source (e.g. docs, tests, config, infra, comments, issues etc). Intended, but not implemented (or implemented differently) behavior goes in `mismatches/` only — never a SHOULD heading on a feature page.
56
+ - Name areas and features from the **product** and user perspective, not the stack or code.
57
+ - Capabilities describe *what the product does*. Catalog records *where that lives in the repo*.
58
+ - Pair capabilities and catalog items (use relative path) (`capabilities/{area}/{feature}.md` ↔ `catalog/{area}/{feature}.yaml`). Feature page: after breadcrumb, relative link to the YAML.
59
+ - Tracker links (tasks, issues, stories, etc.) are optional. **Ask** before adding any. Put them in catalog YAML (`issues`), not on feature pages. Do not invent keys or URLs.
60
+
61
+ ## 1. Catalog (shallow)
62
+
63
+ The **catalog** is what exists in the product: first a shallow area → feature list, then YAML facts in `catalog/`. Code, test, doc, and issue tracker links live here (`sources`, `tests`, `wiki_path`, `issues`).
64
+
65
+ From **code** map the product into **areas**, each with a **feature list**. That list *is* the catalog of what exists in the product at this step. Do not draft Requirement/Acceptance or YAML yet.
66
+
67
+ If an area is large, group features into sub-folders at this step. Catalog YAML uses the same relative path as the feature page.
68
+
69
+ ## 2. Tracker links (optional)
70
+
71
+ **Ask the user** whether to attach issue-tracker links (tasks, issues, stories, etc.) to catalog YAML.
72
+
73
+ If none of MCP / user-supplied links work: skip with reason. Do not write placeholder tickets.
74
+
75
+ Write only into catalog YAML (`issues`). Omit the `issues` key when a feature has no match.
76
+
77
+ ## 3. Overview tree
78
+
79
+ Write only the indexes first ([references/layout.md](references/layout.md)). Give the tree hierarchy when the product is complex enough. If names are ambiguous, **stop and show the list** before diving.
80
+
81
+ Shared rules live on one page; others link.
82
+
83
+ ## 4. Dive each area
84
+
85
+ For each feature: catalog YAML first (`catalog/{area}/{feature}.yaml`), then the feature page (Requirement / Acceptance). Stubs, unused wiring, and doc-vs-code gaps go in `mismatches/` with all required source links (layout).
86
+
87
+ Use `subagent` per area/feature to keep the main agent focused on the helicopter view, subagents focused on the details of one area/feature.
88
+
89
+ Each subagent gets: area/feature name, allowed paths, audience, [references/layout.md](references/layout.md), "code wins", and whether tracker `issues` are in scope (matched links to write, or omit). Feature pages are Requirement / Acceptance only. Do not rewrite sibling areas except to add the one index line the parent asked for.
90
+
91
+ Subagent returns: files written, mismatches, open questions. Parent merges links and sitemap; then validates.
92
+
93
+ Exception: a one-line fix on an existing page already in context — no subagent spawn.
94
+
95
+ ## 5. Validate
96
+
97
+ ```markdown
98
+ Structure
99
+ - [ ] wiki/README.md is a sitemap; every listed link exists
100
+ - [ ] catalog YAML exists for every feature; every wiki_path exists
101
+ - [ ] catalog/README.md indexes every area; each area catalog README lists its YAML
102
+ - [ ] Area (and group) folders named from the product, not from stack/code
103
+ - [ ] Feature pages use the layout heading order (Requirement, Acceptance); breadcrumbs match folder depth; links are relative
104
+ - [ ] Feature pages link to the paired catalog YAML (relative path)
105
+ - [ ] Feature pages are not mega-dumps (one cluster per page)
106
+ - [ ] Feature pages not overloaded with meta info (it is located in catalog YAML)
107
+ - [ ] Tracker links are in catalog YAML (`issues`); omitted when declined or none matched; no invented keys/URLs
108
+
109
+ Content
110
+ - [ ] Features described from the user perspective, not the stack/code
111
+ - [ ] Catalog is YAML facts, not a second spec
112
+ - [ ] Current-state Requirement matches code
113
+ - [ ] mismatches/ covers disagreements (between code and other sources)
114
+ ```
115
+
116
+ ## 6. Report
117
+
118
+ Where to start from. Results. Mismatches. Huge projects: those three only.
119
+
120
+ ## Next actions
121
+
122
+ - Explain a capability in QA language → `qa-explain-behavior`
123
+ - Risk scenarios for a capability → `qa-thinking`
124
+ - Test cases for capability/feature → `qa-write-test-cases`
@@ -0,0 +1,94 @@
1
+ # Wiki layout
2
+
3
+ Product-agnostic. Name `{area}` / `{feature}` (and any extra group folders) from **what the product does**, not from the stack. Follow naming rules according to code/language used (kebab-case by default). Same relative path in `capabilities/` and `catalog/`.
4
+
5
+ Default tree is multiple levels under `capabilities/`. Add sub-folders (with required depth) when the project is complex enough that an area needs a named group. Each with a README.
6
+
7
+ ```
8
+ wiki/
9
+ README.md # front door → roots
10
+ capabilities/ # Wiki > Capabilities
11
+ README.md # areas index
12
+ {area}/ # Wiki > Capabilities > {Area}
13
+ README.md # features index
14
+ {feature}.md # Wiki > … > {Feature} — leaf
15
+ {group}/ # optional extra nesting
16
+ README.md
17
+ {feature}.md
18
+ catalog/ # Wiki > Catalog — list of functionalities
19
+ README.md # areas index
20
+ {area}/
21
+ README.md # YAML index
22
+ {feature}.yaml
23
+ {group}/
24
+ README.md
25
+ {feature}.yaml
26
+ mismatches/ # optional — create when a disagreement exists
27
+ README.md
28
+ ```
29
+
30
+ Create `mismatches/` when code disagrees with comments, infra, docs, issues etc.
31
+
32
+ ## Rules
33
+
34
+ | Rule | Do |
35
+ | --- | --- |
36
+ | Default | `capabilities/{area}/{feature}.md` |
37
+ | Extra depth | New group folder when the area (or group) is too crowded or a cluster needs a name. Any depth. |
38
+ | Split | New sibling `{feature}.md`, a new group folder, or a new `{area}/`. |
39
+ | Share | One page owns a shared rule; others link. Same behavior, two entries → one page. |
40
+ | Growth | New behavior → new leaf + catalog entry + one new index line. Do not thicken an existing leaf into a mega-page. |
41
+ | Overview first | Indexes exist before any leaf is written. |
42
+
43
+ ## Formatting
44
+
45
+ Every page: `# Title`, then a breadcrumb that matches folders, then the body. Omit empty sections. Relative links only.
46
+
47
+ **Index** (any `README.md`): title + breadcrumb + a bullet list. No Requirement or Acceptance.
48
+
49
+ | File | Body |
50
+ | --- | --- |
51
+ | `wiki/README.md` | Roots (`capabilities/`, `catalog/`, `changes/` / `mismatches/` (if present)) |
52
+ | `capabilities/README.md` | Every area: link + purpose (markdown indexes only — not catalog YAML) |
53
+ | `capabilities/{area}/README.md` | Every child feature (or group): link + purpose |
54
+ | Extra group `README.md` | Every child feature (or deeper group): link + purpose |
55
+ | `catalog/README.md` | Every area: link to that area’s catalog README |
56
+ | `catalog/{area}/README.md` | Every child YAML: link + purpose (YAML indexes only — not feature pages) |
57
+
58
+ **Leaf** (`{feature}.md`): headings in this order only — Requirement, Acceptance. After the breadcrumb, a relative link to the paired catalog YAML. Intended-but-unwired behavior is not a feature heading — it goes in `mismatches/` only. Code and tracker references live in catalog YAML (`sources`, `tests`, `issues`), never on the feature page.
59
+
60
+ ## Catalog YAML
61
+
62
+ ```yaml
63
+ wiki_path: capabilities/{area}/{feature}.md
64
+ entry:
65
+ - POST /api/v1/orders
66
+ - UI /checkout
67
+ - Job SettlePayments
68
+ sources:
69
+ - path/to/code
70
+ tests:
71
+ - TestOrSpecFile
72
+ issues: # optional; omit the key when none
73
+ - key: PROJ-123
74
+ url: https://example.com/browse/PROJ-123
75
+ behaviors:
76
+ - One as-implemented fact (observable outcome).
77
+ ```
78
+
79
+ `entry` is whatever a human would use to *find* the behavior. Catalog is **implicit** current state. One YAML per feature. If the feature sits in extra folders, the YAML uses the same folders.
80
+
81
+ `wiki_path` is the pointer from catalog to the feature page. `sources` is the implementation (and product docs that describe it). `issues` is optional tracker links (tasks, issues, stories). `url` is required on each item; `key` when the tracker has a display key. Ask before adding. Omit `issues` when the user declined or nothing matched.
82
+
83
+ Repo paths (implementation, tests, docs) and tracker links are written only in catalog YAML.
84
+
85
+ ## Mismatch page
86
+
87
+ Create `mismatches/` when code disagrees with comments, infra, docs, issues/tasks. Index: `mismatches/README.md`.
88
+
89
+ Every mismatch must link every source that justifies it (omit none that exist):
90
+
91
+ | Link | What to point at |
92
+ | --- | --- |
93
+ | Implemented | Always — current behavior based on code |
94
+ | Intended | Always — the non-wiki source that disagrees with those files (comment, doc, infra, issue, unused config, or stub) |
@@ -11,31 +11,41 @@ metadata:
11
11
 
12
12
  Migrate test suites from another TMS into Testomat.io via UI import, API migration script, or CSV converter.
13
13
 
14
+ ## Scope Discovery (Ask First)
15
+
16
+ - Before picking a strategy, ask the user what must migrate: test cases only, or also run history/results, attachments/screenshots, automation runs, milestones, defects/issues links, custom fields.
17
+ - Do not assume cases-only. Confirm explicitly: "Do you need just test cases, or also runs/results and attachments?"
18
+ - Record the answer and route accordingly: anything beyond test cases forces the API script path (CSV cannot carry it).
19
+
14
20
  ## Pick Strategy
15
21
 
16
22
  - Identify source: ask for TMS name only if not given.
23
+ - Proactively discover the best fetch method: prefer live API access over CSV export whenever the scope needs it or the dataset is large. CSV is a quick fallback, not the default for complete migrations.
24
+ - Ask for API access early: "Do you have admin/API access to the source instance (URL + API token)?" If yes, use the API script path even when a CSV export also exists.
17
25
  - Identify input: live instance with API access, or exported CSV/XLSX file.
18
26
  - Route by source:
19
27
  - TestRail + API access, >1000 tests or needs attachments/runs: API migration script ([TESTRAIL_MIGRATION.md](./references/TESTRAIL_MIGRATION.md)).
20
28
  - TestRail, <1000 tests, no attachments: built-in UI import (CSV or TestRail API option in Imports window).
29
+ - Testmo + API access, or needs runs/results/attachments: API migration via Testmo REST API ([TESTMO_MIGRATION.md](./references/TESTMO_MIGRATION.md), modeled on the TestRail script).
21
30
  - 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)).
31
+ - Testmo, QMetry, TestCaseLabs, Allure TestOps export file, cases-only, no attachments: CSV converter script ([CSV_MIGRATION.md](./references/CSV_MIGRATION.md)).
23
32
  - Qase, QTest, Zephyr, other TMS export file: direct UI CSV import, no script ([CSV_MIGRATION.md](./references/CSV_MIGRATION.md)).
24
33
  - 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.
34
+ - **CSV limits: CSV/XLSX migrates test cases only. It cannot migrate run results/history, attachments/screenshots, automation runs, or milestones. If the user needs any of these, switch to the API migration path.**
35
+ - Screenshots or file attachments needed: use the API script path, CSV import cannot create attachments.
26
36
  - **Never invent converter output columns; converted files always import with format `Testomat.io`.**
27
37
  - **API scripts need source credentials plus a Testomat.io General Token; never hardcode tokens, use `.env`.**
28
38
 
29
39
  ## Scope
30
40
 
31
- - Migration covers test cases; runs, defects, and requirements are optional extras via API.
41
+ - Migration covers test cases by default; runs, results/history, attachments, automation runs, milestones, defects, and requirements are optional extras via API — confirm which the user needs (see Scope Discovery).
32
42
  - Upload run results only after test cases are uploaded.
33
43
  - User fields with no Testomat.io equivalent are not dropped silently: map them to Labels/Tags or extend the converter script.
34
44
 
35
45
  ## Workflow
36
46
 
37
47
  - Create empty Testomat.io project for the import target.
38
- - Get source access: API credentials (TestRail/XRay path) or export file (CSV path).
48
+ - Get source access: API credentials (TestRail/XRay/Testmo path) or export file (CSV path).
39
49
  - Run the routed path:
40
50
  - API script path: clone repo to a temp dir, configure `.env`, dry-run, run full migration.
41
51
  - CSV path: convert if a converter exists, then import via UI.
@@ -47,6 +57,7 @@ Migrate test suites from another TMS into Testomat.io via UI import, API migrati
47
57
  ## References
48
58
 
49
59
  - [TESTRAIL_MIGRATION.md](./references/TESTRAIL_MIGRATION.md) — TestRail UI options, API script env vars, runs and attachments migration.
60
+ - [TESTMO_MIGRATION.md](./references/TESTMO_MIGRATION.md) — Testmo REST API migration (cases, runs, results, attachments), modeled on the TestRail script.
50
61
  - [XRAY_MIGRATION.md](./references/XRAY_MIGRATION.md) — XRay token extraction, env vars, folder-scoped import.
51
62
  - [CSV_MIGRATION.md](./references/CSV_MIGRATION.md) — converter scripts, direct UI imports, custom Testomat.io XLSX columns.
52
63
  - [CUSTOM_MIGRATION.md](./references/CUSTOM_MIGRATION.md) — custom converter or API v2 script for unsupported or broken TMS support.
@@ -1,6 +1,8 @@
1
1
  # CSV Migration (Testmo, QMetry, TestCaseLabs, Allure, Others)
2
2
 
3
- Two paths: converter script (normalizes export to Testomat.io CSV), or direct UI import.
3
+ > CSV/XLSX migrates test cases only. It cannot migrate run results/history, attachments/screenshots, automation runs, or milestones. If the user needs any of these, stop and switch to the API migration path (TestRail: [TESTRAIL_MIGRATION.md](./TESTRAIL_MIGRATION.md), Testmo: [TESTMO_MIGRATION.md](./TESTMO_MIGRATION.md), other/unsupported: [CUSTOM_MIGRATION.md](./CUSTOM_MIGRATION.md)).
4
+
5
+ Two paths: converter script (normalizes export to Testomat.io CSV), or direct UI import. Use only for cases-only scope with no attachments.
4
6
 
5
7
  Docs: https://docs.testomat.io/project/import-export/import/import-tests-from-csv-xlsx
6
8
 
@@ -0,0 +1,101 @@
1
+ # Testmo Migration
2
+
3
+ Three import methods. Pick by scope (cases-only vs full) and attachment/run need.
4
+
5
+ - CSV file or converter script: test cases only, no runs/results, no attachments ([CSV_MIGRATION.md](./CSV_MIGRATION.md), repo https://github.com/testomatio/migrate-testmo).
6
+ - Built-in UI tool (Testmo format option): test cases only, no attachments, small suites.
7
+ - API migration script: full migration — cases with folders, runs with results, attachments. Modeled on https://github.com/testomatio/migrate-testrail.
8
+
9
+ Docs: https://docs.testomat.io/project/import-export/import/import-tests-from-csv-xlsx
10
+ Testmo API docs: https://support.testmo.com/hc/en-us/sections/37971074321293-API-Reference
11
+
12
+ ## UI Import (Cases Only)
13
+
14
+ - Open project > Tests tab > (`...`) > Import from other TMS > Import > Import from CSV > dropdown `Testmo` > Choose file > Create.
15
+ - Converter output (`*_Testomatio.csv`) always imports with format `Testomatio`.
16
+ - Confirm scope first: if the user needs runs/results or attachments, skip UI import and use the API script below.
17
+
18
+ ## API Access
19
+
20
+ - Base URL: `https://<your-name>.testmo.net/api/v1`.
21
+ - Auth: `Authorization: Bearer <token>` header. Token is a user API key from Testmo profile settings (or a dedicated API user created by the admin).
22
+ - Quick check:
23
+
24
+ ```bash
25
+ curl -H "Authorization: Bearer $TESTMO_TOKEN" \
26
+ https://<your-name>.testmo.net/api/v1/user
27
+ ```
28
+
29
+ - Key read endpoints for migration:
30
+ - `GET /api/v1/projects/{project_id}/folders` — folder tree (`id`, `parent_id`, `name`).
31
+ - `GET /api/v1/projects/{project_id}/cases?expands=tags,folders&per_page=100&page=N` — cases with custom fields (`custom_steps` HTML, `custom_priority`, tags). Paginate to `last_page`.
32
+ - `GET /api/v1/projects/{project_id}/templates` — template/field definitions, resolve `custom_*` keys before mapping.
33
+ - `GET /api/v1/projects/{project_id}/runs` — manual runs.
34
+ - `GET /api/v1/runs/{run_id}/results?get_latest_result=true&per_page=100` — latest result per test in a run (drop the flag for full history).
35
+ - `GET /api/v1/projects/{project_id}/cases/{case_id}/result-history` — per-case history alternative.
36
+ - `GET /api/v1/cases/{case_id}/attachments` — attachment list with download `path`.
37
+ - Automation runs (optional): `GET /api/v1/projects/{project_id}/automation/runs`, `GET /api/v1/automation/runs/{run_id}/tests`.
38
+ - All list endpoints paginate (`per_page` max `100`); loop until `next_page` is null.
39
+
40
+ ## Migration Script (Based on migrate-testrail)
41
+
42
+ No standalone `migrate-testmo` API script exists yet; scaffold it from https://github.com/testomatio/migrate-testrail (same structure: fetch source → map → push via Testomat.io API v2 → migrate runs).
43
+
44
+ - Requires NodeJS 20+.
45
+ - Scaffold outside the project repo:
46
+
47
+ ```bash
48
+ git clone https://github.com/testomatio/migrate-testrail.git <temp-dir>/migrate-testmo-api
49
+ cp .env.example .env
50
+ npm i
51
+ ```
52
+
53
+ - `.env` vars (adapted from the TestRail script):
54
+
55
+ ```env
56
+ TESTMO_URL=https://<your-name>.testmo.net
57
+ TESTMO_TOKEN=
58
+ TESTMO_PROJECT_ID=
59
+ # TESTMO_FOLDER_ID= # optional, single folder only
60
+ TESTOMATIO_TOKEN=testomat_****
61
+ TESTOMATIO_PROJECT=
62
+ # TESTOMATIO_HOST=https://app.testomat.io # custom instance only
63
+ # DRY_RUN=1 # dry run, no import
64
+ ```
65
+
66
+ - `TESTOMATIO_PROJECT` is the URL slug: `https://app.testomat.io/projects/<slug>`.
67
+ - `TESTOMATIO_TOKEN` is a General Token from https://app.testomat.io/account/access_tokens.
68
+ - Replace the TestRail client in `migrate.js` with Testmo calls:
69
+ - Folders: build `/Folder` paths from `parent_id` chains (`GET .../folders`).
70
+ - Cases: page through `GET .../cases?expands=tags,folders`, convert `custom_steps` HTML (`text1` step, `text3` expected) to Markdown steps, map priority/tags/issues per [CSV_MIGRATION.md](./CSV_MIGRATION.md) column spec.
71
+ - Keep ID compatibility: zero-pad numeric IDs to 8 chars where a stable ID is needed.
72
+ - Debug flags (same as TestRail script): `DEBUG="testomatio:testmo:*" npm start` (`:in` source data, `:out` posted data, `:migrate` processing).
73
+ - Single case debug (run after full migration): `TESTMO_CASE_ID=12345 npm start`.
74
+
75
+ ## Test Runs with Results
76
+
77
+ - Requires Project Reporting API key (project Settings > API section) as `TESTOMATIO_REPORT_TOKEN`.
78
+ - Import all cases first, then migrate runs (same ordering as `npm run migrate-run-results` in the TestRail script).
79
+ - Source: `GET /api/v1/projects/{project_id}/runs` then per run `GET /api/v1/runs/{run_id}/results?get_latest_result=true` (or full history without the flag).
80
+ - Map Testmo statuses via `GET /api/v1/projects/{project_id}/statuses` (`is_passed` → passed, `is_failed` → failed, `is_untested` → untested, else skipped/retest as comment).
81
+ - Tag created Testomat.io runs with `@id:<testmo_run_id>` in the run title so reruns skip already-imported runs.
82
+ - Single run: `TESTMO_RUN_ID=<id> npm run migrate-run-results` (same convention as `TESTRAIL_RUN_ID`).
83
+
84
+ ## Attachments
85
+
86
+ - Source: `GET /api/v1/cases/{case_id}/attachments`, download each file via its `path` with the Bearer token.
87
+ - CSV import cannot carry attachments; re-upload downloaded files via Testomat.io API after the case exists (same pattern as the TestRail `migrate-attachments` step).
88
+ - Dry-run first, then full run (mirroring the TestRail script):
89
+
90
+ ```bash
91
+ npm run migrate-attachments:dry-run
92
+ npm run migrate-attachments
93
+ ```
94
+
95
+ ## Recovery
96
+
97
+ - 401/403 from Testmo: token missing, expired, or lacking project access — regenerate the API key or use a dedicated API user.
98
+ - 422 on case create: `custom_*` field not in the template — check `GET .../templates` and drop or remap the field.
99
+ - Empty cases list: wrong `TESTMO_PROJECT_ID` or user has no access to that project.
100
+ - HTML in steps: `custom_steps` returns HTML (`<p>...</p>`) — strip/convert to Markdown during mapping.
101
+ - CSV import fails: first row must hold column names; converted files import with format `Testomatio`, not `Testmo`.
@@ -1 +0,0 @@
1
- {"version":3,"file":"comment-thread.js","sourceRoot":"","sources":["../../prompt/comment-thread.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;;;;;GAMG;AACH,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE;QACN,GAAG,EAAE,CAAC,gBAAgB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