Helix is an AI-native test automation framework built on Harness Engineering principles. It turns acceptance criteria in a Spec document into executable E2E tests — and keeps them healthy through a self-healing feedback loop.
Spec → Test Cases → YAML Scripts → Execution → Reporting → Root Cause Analysis → Auto-fix → Re-run
Traditional test harnesses require engineers to manually write locators, maintain selectors, and triage failures. Helix replaces that with:
- AI-generated scripts from plain-language test cases
- Natural language locators — no CSS/XPath, no selector drift
- Root cause classification instead of just "test failed"
- Auto-repair for script issues and flaky tests
- Observability across runs to guide harness improvement
Helix is organized as a pipeline of single-responsibility skills, connected by a .pipeline-state.json contract file.
┌──────────────────────────────────────────────────────────────────────┐
│ HARNESS LAYER SKILL ROLE │
├──────────────────────────────────────────────────────────────────────┤
│ Spec Ingestion Layer │ spec-to-testcase │ Spec → Test Cases │
│ AI Generation Layer │ gen-midscene-yaml │ Cases → YAML │
│ Configuration Layer │ env-specialist │ Environment Gate │
│ Execution Driver │ exec-midscene-yaml │ Run Tests │
│ Reporting Pipeline │ parse-midscene-report │ HTML → Summary │
│ Self-Healing Layer │ analyze-test-failure │ Root Cause + Fix │
│ Observability Layer │ pipeline-report │ Trend Analysis │
└──────────────────────────────────────────────────────────────────────┘
Full pipeline:
spec-to-testcase → gen-midscene-yaml → env-specialist → exec-midscene-yaml → parse-midscene-report → analyze-test-failure
| Skill | Description |
|---|---|
spec-to-testcase |
Parses acceptance criteria from a Spec doc and generates structured manual test cases (P1 functional / P2 boundary), with coverage and verifiability checks |
gen-midscene-yaml |
Converts manual test cases into Midscene YAML automation scripts, with a 4-item lint gate including aiAssert quality check |
env-specialist |
Pre-execution environment gate: validates @midscene/cli, AI model key, YAML file, and CDP port |
exec-midscene-yaml |
Executes Midscene YAML scripts via CDP, records raw results without judgment |
parse-midscene-report |
Parses Midscene HTML reports into structured Markdown summaries with pass/fail details |
analyze-test-failure |
Classifies failures into TYPE-1~5, auto-fixes script issues, outputs bug reports, triggers re-runs |
midscene-test-pipeline |
Orchestrator that chains all skills into a full pipeline with run archiving and state management |
pipeline-report |
Scans historical runs and generates quality trend reports with Harness improvement suggestions |
analyze-test-failure classifies every failure before acting on it:
| Type | Definition | Action |
|---|---|---|
| TYPE-1 Script Issue | Wrong description, bad step order, over-strict assertion | Auto-fix YAML, trigger re-run |
| TYPE-2 Product Bug | Script correct, feature broken | Output bug report |
| TYPE-3 Flaky (high confidence ≥70%) | Pure timeout / animation / unstable locator | Tune sleep/waitFor, trigger re-run |
| TYPE-3 Flaky (low confidence <70%) | Timeout + functional assertion failure | Flag as [FLAKY?], suggest manual re-run |
| TYPE-4 Environment Issue | URL unreachable, API key invalid, browser crash | Output troubleshooting guide |
| TYPE-5 Design Issue | Asserting dynamic data, oversized task scope | Output redesign suggestion |
Auto re-run triggers on TYPE-1 and TYPE-3 (high confidence) fixes, max 2 rounds per pipeline run.
Helix is a workflow layer on top of Midscene.js. You need Midscene installed and configured before running any pipeline.
- Node.js 18+
@midscene/cli—npm i -g @midscene/cli- An AI model key:
OPENAI_API_KEYorANTHROPIC_API_KEY - For CDP mode: SLBrowser or any Chromium with remote debugging enabled on port 9222
/midscene-test-pipeline --from phase0 --spec ./specs/your-feature.md --url https://your-app.com
/midscene-test-pipeline --url https://your-app.com
# then paste your test cases
/midscene-test-pipeline --from phase2 --yaml ./tc_login.yaml
/midscene-test-pipeline --from phase3 --html ./midscene_run/report/tc_login.html
/pipeline-report
Each pipeline run is archived under a unique run_id (YYYYMMDD-HHMM). Re-runs create a new run_id — history is never overwritten.
midscene_run/
runs/
20260413-1430/
tc_login.md ← Phase 0: test cases from Spec
tc_login.yaml ← Phase 1: generated YAML script
report.html ← Phase 2: execution report
report.md ← Phase 3: Markdown summary
failure-analysis.md ← Phase 4: root cause analysis
.pipeline-state.json ← inter-phase contract
pipeline-report-20260413-1500.md ← observability report
See CONTRIBUTING.md.
Helix is built on top of Midscene.js — an AI-powered, vision-driven UI automation framework by Bytedance. All test script generation, execution, and report parsing in Helix depend on Midscene's CLI and APIs.
Midscene.js is licensed under the MIT License. Copyright (c) 2024-present Bytedance, Inc. and its affiliates.
If you use Helix in research or a project that builds on Midscene's capabilities, please also cite Midscene.js per their request:
@software{Midscene.js,
author = {Xiao Zhou, Tao Yu, YiBing Lin},
title = {Midscene.js: Your AI Operator for Web, Android, iOS, Automation & Testing.},
year = {2025},
publisher = {GitHub},
url = {https://github.com/web-infra-dev/midscene}
}CC BY 4.0 — free to use, modify, and distribute with attribution.