testeiya 0.4.3 → 0.4.5

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 (56) hide show
  1. package/README.md +21 -1
  2. package/dist/prompt/clis.js +38 -0
  3. package/dist/prompt/clis.js.map +1 -0
  4. package/dist/prompt/comment-thread.js +56 -44
  5. package/dist/prompt/comment-thread.js.map +1 -1
  6. package/dist/prompt/system-prompt.js +154 -174
  7. package/dist/prompt/system-prompt.js.map +1 -1
  8. package/dist/src/doctor.js +9 -1
  9. package/dist/src/doctor.js.map +1 -1
  10. package/dist/src/langfuse-extension.js +135 -0
  11. package/dist/src/langfuse-extension.js.map +1 -0
  12. package/dist/src/langfuse.js +143 -0
  13. package/dist/src/langfuse.js.map +1 -0
  14. package/dist/src/output.js +48 -3
  15. package/dist/src/output.js.map +1 -1
  16. package/dist/src/run.js +36 -12
  17. package/dist/src/run.js.map +1 -1
  18. package/dist/src/session.js +22 -8
  19. package/dist/src/session.js.map +1 -1
  20. package/package.json +1 -1
  21. package/prompt/clis.ts +45 -0
  22. package/prompt/comment-thread.ts +65 -47
  23. package/prompt/system-prompt.ts +182 -184
  24. package/skills/playwright/playwright-cli/SKILL.md +49 -0
  25. package/skills/playwright/playwright-cli/references/pr-attachments.md +60 -0
  26. package/skills/playwright/playwright-cli/references/session-management.md +2 -0
  27. package/skills/playwright/playwright-cli/references/video-recording.md +12 -0
  28. package/skills/skills.lock.json +3 -2
  29. package/skills/testomatio/requirements/write-user-story/SKILL.md +7 -10
  30. package/skills/testomatio/test-management/migrate-to-testomatio/SKILL.md +52 -0
  31. package/skills/testomatio/test-management/migrate-to-testomatio/references/CSV_MIGRATION.md +72 -0
  32. package/skills/testomatio/test-management/migrate-to-testomatio/references/CUSTOM_MIGRATION.md +11 -0
  33. package/skills/testomatio/test-management/migrate-to-testomatio/references/TESTRAIL_MIGRATION.md +87 -0
  34. package/skills/testomatio/test-management/migrate-to-testomatio/references/XRAY_MIGRATION.md +56 -0
  35. package/skills/testomatio/test-management/scan-automation-project/SKILL.md +103 -26
  36. package/dist/prompt/context.js +0 -79
  37. package/dist/prompt/context.js.map +0 -1
  38. package/dist/prompt/index.js +0 -60
  39. package/dist/prompt/index.js.map +0 -1
  40. package/dist/prompt/print.js +0 -30
  41. package/dist/prompt/print.js.map +0 -1
  42. package/dist/prompt/project-info.js +0 -2
  43. package/dist/prompt/project-info.js.map +0 -1
  44. package/dist/prompt/testomatio.js +0 -264
  45. package/dist/prompt/testomatio.js.map +0 -1
  46. package/dist/prompt/tools.js +0 -70
  47. package/dist/prompt/tools.js.map +0 -1
  48. package/dist/prompt/vocab.js +0 -8
  49. package/dist/prompt/vocab.js.map +0 -1
  50. package/prompt/context.ts +0 -101
  51. package/prompt/index.ts +0 -102
  52. package/prompt/print.ts +0 -32
  53. package/prompt/project-info.ts +0 -30
  54. package/prompt/testomatio.ts +0 -281
  55. package/prompt/tools.ts +0 -72
  56. package/prompt/vocab.ts +0 -7
@@ -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.
@@ -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.
@@ -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.
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: scan-automation-project
3
- description: Scan project source code to inventory languages, frameworks, and existing tests (manual `*.test.md` and automated test files). Use this skill whenever analyzing a codebase for test planning, detecting test frameworks, or preparing for test automation. Specifically, when the user mentions "scan project", "what tests exist", "analyze codebase", "detect frameworks", "test matrix", or needs a codebase inventory before a QA workflow.
3
+ description: Scan a project and inventory what is available for QA work - project type, languages, frameworks, manual `*.test.md` cases, automated tests and automated references, and how Testomat.io is reachable (token, MCP, project settings). Use this skill whenever analyzing a codebase for test planning, detecting test frameworks, counting tests, or preparing for test automation. Specifically, when the user mentions "scan project", "what tests exist", "how many tests", "analyze codebase", "detect frameworks", "test matrix", or needs an inventory before a QA workflow.
4
4
  license: MIT
5
5
  metadata:
6
6
  author: Testomat.io
7
- version: 1.0.0
7
+ version: 1.1.0
8
8
  ---
9
9
 
10
10
  # Scan Automation Project
11
11
 
12
- Scan project source code and return a QA-focused inventory: languages, frameworks, and existing tests.
12
+ Scan the project and return a QA-focused inventory: project type, languages, frameworks, existing tests, and what Testomat.io access is available.
13
13
 
14
14
  **Shallow scan only.** No full import resolution, no line-by-line parsing, no reading full test implementations. High-level structure only.
15
15
 
@@ -27,26 +27,42 @@ Where is the source code?
27
27
  ```
28
28
 
29
29
  - Wait for the user's reply.
30
- - If the user gives a Git repo or another folder, clone or symlink it into `.testeiya/code/`. No-op if it is already there.
30
+ - If the user gives a Git repo or another folder, clone or symlink it into `.testeiya/<name>/` (the source's basename; `extra-` prefix if taken). No-op if it is already there.
31
+
32
+ ### The `.testeiya/` folder
33
+
34
+ All persistent QA metadata lives in `.testeiya/` in the project root.
35
+
36
+ - `<name>/`: a linked or cloned external project, named after its source. Read-only reference.
37
+ - `requirements/`: user stories and acceptance criteria (pdfs, docs, images).
38
+ - `docs/`: feature explanations, test planning and strategy files. Prose for humans, never data dumps.
39
+ - `manual-tests/`: markdown test cases pulled from Testomat.io.
40
+ - `auto-tests/`: references to the relevant automated (e2e) tests.
41
+ - `exploratory/`: explorbot setup.
42
+ - `project-info.json`: the project's settings as Testomat.io reports them, when cached.
43
+
44
+ Rules:
45
+
46
+ - It is a dot-folder. File-search tools skip it by default: search it with hidden:true or an explicit `.testeiya/` path prefix. A linked folder is a symlink; wildcard searches do not descend into it, so search it with its own `.testeiya/<name>/` prefix.
47
+ - It excludes itself from git: when you create `.testeiya/`, also create `.testeiya/.gitignore` containing a single `*`. **Never add `.testeiya/` to the repo's own `.gitignore`**: a repo-level entry hides the folder from search tools, so the next scan reports "no manual tests" while the cases sit right there.
31
48
 
32
49
  ### Rule for pulled data
33
50
 
34
51
  **When you need to pull external data** (manual test cases, app code, e2e tests from another repo) into this project:
35
52
 
36
- | This project has | Store pulled data in | Gitignored? |
37
- | ------------------ | ---------------------- | ----------- |
38
- | **Source code** (`src/` folder) or **big project** | `.testeiya/…` | **Yes** |
39
- | **Only test infrastructure** (e2e dirs like `tests/`, `playwright/`, `cypress/` but no `src/`) | `manual-tests/` or `e2e-tests/` | No |
40
- | **Empty / manual-only** | `manual-tests/` | No |
53
+ | This project has | Store pulled data in |
54
+ | ------------------ | ---------------------- |
55
+ | **Source code** (`src/` folder) or **big project** | `.testeiya/…` |
56
+ | **Only test infrastructure** (e2e dirs like `tests/`, `playwright/`, `cypress/` but no `src/`) | `manual-tests/` or `e2e-tests/` |
57
+ | **Empty / manual-only** | `manual-tests/` |
41
58
 
42
59
  Detection logic:
43
60
  1. Has `src/` folder or is a monorepo? → Use `.testeiya/`
44
61
  2. Has e2e test dirs (`tests/`, `playwright/`, `cypress/`, `e2e/`)? → Use tracked folder (`manual-tests/`, `e2e-tests/`)
45
62
  3. Otherwise → Default to `manual-tests/`
46
63
 
47
- - Any skill that creates `.testeiya/...` must also add `.testeiya/` to the project's `.gitignore` — but only if it is not there yet. Never add it twice.
48
64
  - The rule covers *pulled* data only. Output a skill *produces* and the user wants — a `coverage.*.yml`, new `*.test.md` files — goes in the repo as normal.
49
- - On a source repo with no manual tests, this skill changes no tracked file: it only creates the gitignored `.testeiya/` directory and, if needed, adds one line to `.gitignore`.
65
+ - On a source repo with no manual tests, this skill changes no tracked file: it only creates the self-ignored `.testeiya/` directory.
50
66
  - **Only touch `.testeiya/` and tracked folders — never pollute the repo with cache in a wrong location.**
51
67
 
52
68
  ## Step 2: Project Analysis
@@ -59,11 +75,15 @@ Include:
59
75
 
60
76
  Exclude:
61
77
  - Dependencies, build output, coverage, reports, caches, config, lock, and environment files.
62
- - Paths ignored by `.gitignore` — but **not** `.testeiya/code/`. In a manual-tests repo the app code lives there; scan it as source.
78
+ - Paths ignored by `.gitignore` — but **not** `.testeiya/<name>/`. In a manual-tests repo the app code lives there; scan it as source.
63
79
  - Testeiya internal files (e.g. `session-factory.ts`, `system-prompt.ts`).
64
80
  - **If in doubt**, exclude.
65
81
 
66
82
  From the file list:
83
+ - Classify the **project type**, one of:
84
+ - `source`: application source code. Never change it; use it for discovery.
85
+ - `e2e`: a test automation project (e2e dirs, a test framework config, little or no app source). You can write tests for it.
86
+ - `manual`: empty, or mostly `*.test.md` files. Test cases go into the project itself.
67
87
  - Detect languages and frameworks. Collect one `frameworks` list with ALL application and testing frameworks.
68
88
  - Extract the project name from a project config file (`package.json`, `Cargo.toml`, `pom.xml`, ...); fall back to the root directory name.
69
89
  - Rate complexity by source file count:
@@ -75,34 +95,81 @@ From the file list:
75
95
  | 151-500 | `large` |
76
96
  | 500+ | `very-large` |
77
97
 
78
- ## Step 3: Test Inventory (optional)
98
+ ## Step 3: Test Inventory
79
99
 
80
100
  Detect existing tests, automated and manual. Stay shallow.
81
101
 
82
- Automated tests:
83
- - Detect frameworks via config files (`jest.config.*`, `playwright.config.*`, `vitest.config.*`, `pytest.ini`, `pom.xml`, ...), project dependencies, and test file patterns (`*.test.*`, `*.spec.*`, `*_test.*`).
84
- - For each framework: identify its test file pattern and count matching files.
102
+ ### Manual tests
85
103
 
86
- Manual tests:
87
- - Find all `.test.md` files and parse test titles. `find .` also looks inside `.testeiya/manual-tests/`, so a re-run after a pull finds the cached cases instead of reporting "no manual tests":
104
+ A `*.test.md` file is a suite. Each test inside it is a `<!-- test ... -->` block followed by an `#`/`##` heading (the title). The block's `type:` field says which kind of test it is:
105
+
106
+ - `type: manual`: a manual test case, authored and maintained here as markdown.
107
+ - `type: automated`: a **reference** to an automated test (see below).
108
+ - No `type:` line at all: treat as manual. This is common, so never count manual tests by grepping for `type: manual`; it silently undercounts.
109
+
110
+ Know the counts before you answer anything about project scope, coverage or progress. Read them straight from the files; this mirrors how Testomat.io parses them. `find .` also looks inside `.testeiya/manual-tests/`, so a re-run after a pull finds the cached cases instead of reporting "no manual tests":
88
111
 
89
112
  ```bash
113
+ # one line per suite or test: SUITE <title>, or <type> <title>
90
114
  find . -name "*.test.md" -exec awk '
91
- /^<!-- test/ { in_block=1; kind="TEST"; next }
92
115
  /^<!-- suite/ { in_block=1; kind="SUITE"; next }
116
+ /^<!-- test/ { in_block=1; kind="manual"; next }
117
+ in_block && /^type:[[:space:]]*automated/ { kind="automated"; next }
93
118
  in_block && /^-->/ { in_block=0; expect=1; next }
94
119
  expect && /^#+[[:space:]]+/ {
95
120
  title=$0; sub(/^#+[[:space:]]+/, "", title)
96
121
  if (kind == "SUITE") printf "SUITE: %s\n", title
97
- else printf "|- %s\n", title
122
+ else printf "|- [%s] %s\n", kind, title
98
123
  expect=0
99
124
  }
100
125
  ' {} +
101
126
  ```
102
127
 
128
+ Pipe the output into `grep -c '\[manual\]'` or `grep -c '\[automated\]'` to count one kind.
129
+
103
130
  - If the only `.test.md` files are under `.testeiya/manual-tests/`, say so in the inventory: they came from Testomat.io, not from this repo.
131
+ - A source checkout with no `*.test.md` files has nothing to count. Say so; do not estimate.
132
+
133
+ ### Automated tests
134
+
135
+ - Detect frameworks via config files (`jest.config.*`, `playwright.config.*`, `vitest.config.*`, `pytest.ini`, `pom.xml`, ...), project dependencies, and test file patterns (`*.test.*`, `*.spec.*`, `*_test.*`).
136
+ - For each framework: identify its test file pattern and count matching files.
137
+ - Unit and integration tests are inventory, not QA scope: note them, but flag e2e and acceptance suites as the ones QA work targets.
138
+
139
+ ### Automated references
140
+
141
+ `type: automated` entries in `*.test.md` are references, not runnable code. They arrive via `check-tests pull --export-automated`, which exports the automated tests Testomat.io knows about as markdown. The real implementation lives in a **different repository**, the automation project, which is usually not this one.
142
+
143
+ - Never claim you ran an automated test because you found its reference here. Nothing here executes.
144
+ - Do not edit a reference's markdown to change the test's behaviour. The code is elsewhere, the edit gets overwritten on the next pull, and pushing it can clobber TMS data. Locate the real test in the automation repo instead.
145
+ - To actually run them, use a CI profile (Step 4): if the project has one configured, a run can be triggered through Testomat.io.
146
+ - They are still valuable context: they tell you what is already automated versus what is still manual, which is what coverage gaps and automation candidates need.
147
+
148
+ ## Step 4: Testomat.io Access
149
+
150
+ Record how Testomat.io is reachable from this session. Check, do not assume:
151
+
152
+ - **Token:** `TESTOMATIO` in the environment (or in `.env`). With it, `npx check-tests` can pull and push test cases and the REST API answers under `$TESTOMATIO_URL/api/v2`.
153
+ - **MCP:** Testomat.io MCP tools are present (tools prefixed `testomatio-`, direct tools such as `tests_list` and `runs_list`, or one `mcp` tool that searches and calls operations). MCP needs `TESTOMATIO_PROJECT_ID` as well as the token; a token alone identifies no project. Setup lives in the `testomatio-mcp` skill.
154
+ - **Project settings:** `.testeiya/project-info.json`, when present: framework, language, environments, labels, tags, and **CI profiles** (runs can be triggered through them).
104
155
 
105
- ## Step 4: Output
156
+ Never ask the user for the Testomat.io token when one is configured. Secrets the app under test needs are a different thing; a missing one blocks a run.
157
+
158
+ ### Which source answers what
159
+
160
+ | Question is about | First action |
161
+ |---|---|
162
+ | Test content: steps, gherkin, description, file path, tags | `read`, `find`, `grep` in the project |
163
+ | Suite hierarchy, structure, which files exist | `ls`, `find` |
164
+ | Individual test metadata: priority, status flag, labels | the files; if missing, get the test from Testomat.io |
165
+ | Runs, testruns, plans, labels, issues, analytics | Testomat.io (MCP or REST); these are not files |
166
+ | Creating or updating tests or suites | edit the markdown file, then `npx check-tests push` (see `sync-test-cases-with-tms`) |
167
+ | Launching an automated or mixed run on CI | `npx -y @testomatio/reporter@latest run --remote <profile>`; raise an error if no CI profile is configured |
168
+ | Running automated tests locally | the local test runner with the Testomat.io reporter attached |
169
+
170
+ Statuses and counts in Testomat.io are live. Runs change them at any time, so fresh query results supersede numbers from earlier in the conversation.
171
+
172
+ ## Step 5: Output
106
173
 
107
174
  Return one structured markdown result directly. **Do NOT save to a file.**
108
175
 
@@ -111,14 +178,16 @@ Return one structured markdown result directly. **Do NOT save to a file.**
111
178
 
112
179
  - **Project Name:** acme-web-app
113
180
  - **Description:** A React-based customer dashboard with an Express API.
181
+ - **Project Type:** source
114
182
  - **Languages:** TypeScript, SQL
115
183
  - **Frameworks:** React, Express, Jest, Playwright
116
184
  - **Complexity:** small (12 files)
117
185
 
118
186
  ## Test Inventory
119
187
 
120
- - **Automated Tests:** 10 files
121
- - **Manual Tests:** 37 cases
188
+ - **Automated Tests:** 10 files (Playwright)
189
+ - **Manual Tests:** 37 cases (`.testeiya/manual-tests/`, pulled from Testomat.io)
190
+ - **Automated References:** 12 (implementation lives in another repository)
122
191
 
123
192
  ### Manual Tests (20 of 37 shown)
124
193
 
@@ -133,17 +202,25 @@ Return one structured markdown result directly. **Do NOT save to a file.**
133
202
 
134
203
  - home.page.spec.ts
135
204
  ...
205
+
206
+ ## Testomat.io
207
+
208
+ - **Token:** set (`TESTOMATIO`)
209
+ - **MCP:** available (`testomatio-*` tools)
210
+ - **Project settings:** `.testeiya/project-info.json`, framework playwright, CI profiles: "e2e" (github)
136
211
  ```
137
212
 
138
213
  Field rules:
139
214
  - **Description:** 1-2 sentences based only on detected source code and folder structure (include the domain area if that makes sense).
215
+ - **Project Type:** one of `source` | `e2e` | `manual`.
140
216
  - **Complexity:** one of `small` | `moderate` | `large` | `very-large`, plus the file count.
141
- - **Manual Tests:** preserve hierarchy as plain strings — SUITE items as parent bullets, test titles (`|-`) as nested children.
217
+ - **Manual Tests:** preserve hierarchy as plain strings — SUITE items as parent bullets, test titles (`|-`) as nested children. Say where they live.
142
218
  - **Automated Tests:** list of detected test files.
143
- - All values must come from observable files. Do NOT guess missing data or add fields not shown above.
219
+ - **Testomat.io:** one line per access path, `available`/`not available`; omit the section only when none is present, and then say the project is not connected.
220
+ - All values must come from observable files and tools. Do NOT guess missing data or add fields not shown above.
144
221
 
145
222
  Sections:
146
- - If Step 3 was skipped or found no tests, omit `## Test Inventory` and note that the project contains no tests; the `# Project Overview` section is still useful for next steps.
223
+ - If Step 3 found no tests, omit `## Test Inventory` and note that the project contains no tests; the `# Project Overview` section is still useful for next steps.
147
224
  - If one test type is absent, note it with a blockquote, e.g. ``> No manual tests (`.test.md`) found in the project.``
148
225
 
149
226
  Test listing truncation:
@@ -1,79 +0,0 @@
1
- import dedent from "dedent";
2
- import { TESTEIYA_DIR_NAME } from "./vocab.js";
3
- /** System-prompt section describing the workspace context; "" when none. */
4
- export function contextPromptSection(entries, folders = []) {
5
- if (entries.length === 0 && folders.length === 0)
6
- return "";
7
- return dedent `
8
- <workspace-context>
9
- This workspace has context attached — the user (or you, earlier) put it there for a purpose. Consult it before answering, and prefer it over assumptions about the project.
10
-
11
- ${contextLines(entries, folders)}
12
-
13
- ALL of it lives under the hidden \`${TESTEIYA_DIR_NAME}/\` dir: file-search tools skip hidden dirs by default, so search it explicitly (pass hidden:true, or prefix the path with \`${TESTEIYA_DIR_NAME}/\`). 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
- </workspace-context>
15
- `;
16
- }
17
- /** Per-prompt notice when the context changed mid-session; appended to the next prompt. */
18
- export function contextUpdateNotice(entries, folders = []) {
19
- if (entries.length === 0 && folders.length === 0) {
20
- return dedent `
21
- <workspace-context-update>
22
- All extra workspace context was removed. Do not rely on it anymore.
23
- </workspace-context-update>
24
- `;
25
- }
26
- return dedent `
27
- <workspace-context-update>
28
- The workspace context just changed. It now contains:
29
-
30
- ${contextLines(entries, folders)}
31
-
32
- This was done for a purpose — take it into account for this and future requests. Remember \`${TESTEIYA_DIR_NAME}/\` is hidden: search it with hidden:true or an explicit path prefix.
33
- </workspace-context-update>
34
- `;
35
- }
36
- function contextLines(entries, folders) {
37
- const lines = [];
38
- const covered = new Set(entries.map((e) => parentDir(e.path)));
39
- for (const f of folders) {
40
- if (covered.has(f.path))
41
- continue;
42
- lines.push(`- \`${f.path}/\` — ${folderPurpose(f.name)}`);
43
- }
44
- for (const e of entries)
45
- lines.push(`- ${describeEntry(e)}`);
46
- return lines.join("\n");
47
- }
48
- function folderPurpose(name) {
49
- if (name === "manual-tests") {
50
- return "the project's manual test suites pulled from Testomat.io (*.test.md — THE manual tests of this project)";
51
- }
52
- if (name === "code")
53
- return "reference code added as context";
54
- if (name === "requirements")
55
- return "requirements and specs";
56
- if (name === "docs")
57
- return "test planning and strategy documents";
58
- if (name === "auto-tests")
59
- return "automated test references";
60
- return "exploratory testing setup";
61
- }
62
- function parentDir(rel) {
63
- const idx = rel.lastIndexOf("/");
64
- if (idx < 0)
65
- return "";
66
- return rel.slice(0, idx);
67
- }
68
- function describeEntry(e) {
69
- const date = e.addedAt?.split("T")[0] ?? "";
70
- let from = "";
71
- if (e.origin && e.origin !== e.name)
72
- from = ` from ${e.origin}`;
73
- if (e.kind === "repo")
74
- return `\`${e.path}\` — git repository${from} (${date})`;
75
- if (e.kind === "folder")
76
- return `\`${e.path}\` — local folder${from} (${date})`;
77
- return `\`${e.path}\` — document${from} (${date})`;
78
- }
79
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
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,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,OAAO,KAAK,CAAC,CAAC,IAAI,gBAAgB,IAAI,KAAK,IAAI,GAAG,CAAC;AACrD,CAAC"}
@@ -1,60 +0,0 @@
1
- import { getSystemPrompt } from "./system-prompt.js";
2
- import { testomatioTms, testomatioConnection, testomatioNotConnected, projectSettings, } from "./testomatio.js";
3
- import { briefAnswer, nonInteractive, reportOutput } from "./print.js";
4
- import { contextPromptSection, } from "./context.js";
5
- export function buildSystemPrompt(options) {
6
- const mode = options?.mode ?? "tui";
7
- const interactive = mode !== "print";
8
- // The base prompt (role, workspace, tools, goals) comes first — it defines who
9
- // the agent is. Specialized rules layer on after it, dynamic context goes last.
10
- // Anything only one harness can do — its own question tool, a browser it can
11
- // open for a watching user — reaches the prompt through `sections`,
12
- // `toolBullets` and `rules`, never from here.
13
- const parts = [
14
- getSystemPrompt(options?.cwd, {
15
- interactive,
16
- toolBullets: options?.toolBullets,
17
- rules: options?.rules,
18
- connectedClis: options?.connectedClis,
19
- connectedMcps: options?.connectedMcps,
20
- }),
21
- ];
22
- const tokenSlugs = options?.tokens ? Object.keys(options.tokens) : [];
23
- // The TUI passes no `connection`, so it keeps the managed-tokens gating.
24
- const tokenAvailable = options?.connection?.tokenAvailable ?? tokenSlugs.length > 0;
25
- const tms = options?.tms ?? "mcp-direct";
26
- // Gated on the same condition as the connection section below: both describe
27
- // the same connection, and the rules are just as needed when the token comes
28
- // from the environment rather than from a per-project session token.
29
- if (tokenAvailable || tokenSlugs.length > 0)
30
- parts.push(testomatioTms(tms));
31
- if (mode === "print")
32
- parts.push(nonInteractive);
33
- // Whatever this harness alone can offer — its chat-app UI tools, a browser it
34
- // can open for a watching user. A one-shot CLI contributes none of it, and
35
- // `nonInteractive` tells the agent to report such a gap rather than try.
36
- for (const section of options?.sections ?? [])
37
- parts.push(section);
38
- if (options?.promptContext) {
39
- parts.push(`## Project Test Context\n\n${options.promptContext}`);
40
- }
41
- if (options?.contextEntries?.length || options?.contextFolders?.length) {
42
- parts.push(contextPromptSection(options.contextEntries ?? [], options.contextFolders ?? []));
43
- }
44
- if (options?.projectInfo) {
45
- parts.push(projectSettings(options.projectInfo));
46
- }
47
- if (tokenAvailable || tokenSlugs.length > 0) {
48
- parts.push(testomatioConnection(tokenSlugs, options?.backendUrl, options?.connection, tms));
49
- }
50
- else if (mode === "web" || mode === "print") {
51
- parts.push(testomatioNotConnected());
52
- }
53
- // The answer contract goes last so it is the final instruction the model reads.
54
- if (options?.brief)
55
- parts.push(briefAnswer);
56
- if (options?.outputFile)
57
- parts.push(reportOutput(options.outputFile));
58
- return parts.join("\n\n");
59
- }
60
- //# sourceMappingURL=index.js.map