Web QA SDK that plays the scenarios Selvage and Shuttle run, in a browser through Playwright
A Node.js package that compiles the same scenario YAML as Selvage and Shuttle and plays it in a browser through Playwright.
A scenario is written once in YAML, compiled to canonical JSON and played against the app. Every run leaves evidence and a verdict.
One file holds two YAML documents split by ---: the config (appId, name, tags, seed, mocks, lanes) and the list of steps. It sits at Scenarios/Modules/<Module>/<Screen>/<id>.yaml. Sub-flows live in Common/Shared and are pulled in with runFlow, and Common/compiler.yaml holds the settings both compilers read.
Reads the same YAML. The role and css selectors are web only and belong in a sub-flow with when: {platform: web}; assertUrl exists only on the web.
The compiler turns each file into canonical JSON with its sub-flows inlined. An unknown key, command or argument is an error that names file:line:column, prints the line and puts a caret under the fault.
Its own compiler matches the kernel's bytes on the golden fixtures, except that a scenario naming no platforms also lists web.
Cheap checks come first, so a broken catalogue never costs a build or a device.
heddle compile --check reports every error without opening a browser. A compile error met during a run ends it with exit 2.
After sub-flows are inlined the first step is launchApp, exactly one per scenario, and an openLink right after it is folded into the launch. The seed (locale, link and the app's own values) travels with the launch. onFlowStart runs before it, onFlowComplete after the steps whether they passed or not.
Each launch opens a new browser context, and window.FLOW_ENV carries the launch environment the other platforms pass to the app.
Each step resolves its selector (id, text, index and the rest) and acts: tap, type, scroll, wait. repeat, retry, runFlow and measure nest, and ${VARIABLES} resolve at run time.
Playwright plays the steps in Chromium, Firefox or WebKit. A step a browser cannot do passes with a warning that names the reason.
assertVisible, assertNotVisible, assertCount, assertTrue and assertNetwork check what the screen and the network promised. A failed assertion fails the scenario on that step.
Visible means rendered with a size, not necessarily inside the viewport. assertUrl checks the address and is web only.
While the steps run, each SDK records what happened: screens, network, logs. Secrets are masked before anything is written to disk.
A failing scenario leaves one heddle-report-<id>-<time>.zip: trace, video, HAR, console, page errors, interaction trail, DOM and screenshots. Redaction makes two passes over every file and cannot be switched off.
The run ends with a status per scenario and files a person and a machine can both read.
run.json and junit.xml in the report folder, heddle-report/ by default, and one line per scenario on the terminal.
Node 20 or later and a Playwright browser. The repository carries a notes app to try it on.
npm install && npm run build npx playwright install chromium npm run sample npx heddle run sample/scenarios --base-url http://127.0.0.1:4173 npx heddle compile <folder> --check npx heddle serve scenarios/ --base-url http://127.0.0.1:3000 npm run check
The workflow file runs only when started by hand (workflow_dispatch), not on a push: ubuntu-latest, Node 20, a 20-minute limit, and Chromium as the only browser.
npm ci npx playwright install --with-deps chromium npm run lint npm run typecheck npm test npm run test:integration npm run test:fixture npm run gate
Reads the scenario YAML and compiles it to the shared wire format.
Plays the compiled steps through Playwright.
By default a failing scenario leaves one archive, and a local page follows runs.