@elench/testkit 0.1.15 → 0.1.17
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/README.md +9 -5
- package/lib/cli.mjs +1 -1
- package/lib/runner.mjs +1223 -592
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ npx @elench/testkit destroy
|
|
|
58
58
|
3. **Database** — provisions the selected backend (`neon` or Docker-managed `local`) when a service declares one
|
|
59
59
|
4. **Seed** — runs optional product seed commands against the provisioned database
|
|
60
60
|
5. **Runtime** — starts required local services, waits for readiness, and injects test env
|
|
61
|
-
6. **Execution** —
|
|
61
|
+
6. **Execution** — schedules file-level execution tasks across a global worker pool, reuses warm dependency graphs when possible, runs `k6` file-by-file, and batches Playwright files per worker
|
|
62
62
|
7. **Cleanup** — stops local processes and preserves `.testkit/` state for inspection or later destroy
|
|
63
63
|
|
|
64
64
|
Each run ends with a compact summary that shows per-service pass/fail status, suite totals, failed suites, and total duration.
|
|
@@ -78,7 +78,9 @@ Each run ends with a compact summary that shows per-service pass/fail status, su
|
|
|
78
78
|
|
|
79
79
|
## Parallel execution
|
|
80
80
|
|
|
81
|
-
`@elench/testkit` can run
|
|
81
|
+
`@elench/testkit` can run test work in parallel with `--jobs <n>`.
|
|
82
|
+
|
|
83
|
+
`--jobs` is global for the whole run, not per service.
|
|
82
84
|
|
|
83
85
|
Each worker gets its own:
|
|
84
86
|
- Neon branch
|
|
@@ -86,10 +88,12 @@ Each worker gets its own:
|
|
|
86
88
|
- `.testkit` state subtree
|
|
87
89
|
- local service ports
|
|
88
90
|
|
|
89
|
-
|
|
91
|
+
Workers prefer to stay on the same dependency graph so service stacks can be reused across assigned work, including dependent services such as `frontend -> bourne`.
|
|
90
92
|
|
|
91
93
|
Use `--shard <i/n>` to split the selected suite set deterministically before worker scheduling.
|
|
92
94
|
|
|
95
|
+
`testkit` also writes `.testkit/timings.json` and uses those file timings on later runs for longest-first balancing.
|
|
96
|
+
|
|
93
97
|
## Suite metadata
|
|
94
98
|
|
|
95
99
|
`runner.manifest.json` remains the source of truth for suites. Optional per-suite `testkit` metadata can tune execution:
|
|
@@ -105,8 +109,8 @@ Use `--shard <i/n>` to split the selected suite set deterministically before wor
|
|
|
105
109
|
}
|
|
106
110
|
```
|
|
107
111
|
|
|
108
|
-
- `maxFileConcurrency`: k6-only opt-in for
|
|
109
|
-
- `weight`: optional scheduling weight when
|
|
112
|
+
- `maxFileConcurrency`: k6-only opt-in for batching multiple files from the same suite onto one worker
|
|
113
|
+
- `weight`: optional fallback scheduling weight when no file timing history exists yet
|
|
110
114
|
|
|
111
115
|
## Schema
|
|
112
116
|
|
package/lib/cli.mjs
CHANGED
|
@@ -13,7 +13,7 @@ export function run() {
|
|
|
13
13
|
.command("[first] [second] [third]", "Run test suites (int, e2e, dal, all)")
|
|
14
14
|
.option("-s, --suite <name>", "Run specific suite(s)", { default: [] })
|
|
15
15
|
.option("--dir <path>", "Explicit product directory")
|
|
16
|
-
.option("--jobs <n>", "Number of isolated worker stacks
|
|
16
|
+
.option("--jobs <n>", "Number of isolated worker stacks for the whole run", {
|
|
17
17
|
default: "1",
|
|
18
18
|
})
|
|
19
19
|
.option("--db-backend <name>", "Database backend override (neon, local)")
|