Midscene Test overview
Through extensive practice, we found that once vision models handle UI interaction and verification, what remains in a test case is pure intent. At that point, traditional test frameworks built around hand-coded locators and page objects become unnecessary overhead.
Midscene Test (@midscene/test) starts from that premise to rethink what an AI-native E2E framework should optimize for: expressing test cases as pure intent, encapsulating deterministic business operations as reusable capabilities, and letting engineers and AI agents maintain the same test suite together. Get started with Midscene Test
Interactive and business operations in one YAML file
Each YAML step calls a Node: an AI, platform, or custom business operation. Compose them into a test case.
beforeEach: - order.prepare: { status: paid }Business - gotoUrl: ${shopUrl}/orders/latestBusinesscases: - name: A paid order supports a full refund steps: - aiAct: Apply for a full refund and submitInteractive - aiAssert: The page shows that the refund was submittedInteractive - order.checkRefund: { status: refunding }BusinessafterEach: - clearCookies: {}BusinessSeparate intent from business logic, maintained by people and AI
Wrap reusable business logic in custom Nodes. Midscene Test generates a Markdown Node Spec listing every Node and its inputs, so QA engineers and AI agents can write cases without reading TypeScript. Learn how to develop custom Nodes
Replay every action in visual reports
Every run generates an interactive HTML report. Inspect the full lifecycle step tree, drill into each Agent step’s Plan, Locate, and action timings, and scrub through the screenshot timeline to replay exactly what happened on screen. Explore reporting
Type "headphones" in the search box and click Search
Engineering foundation built for visual agents
Midscene Test ships with the runtime and CI capabilities needed to run visual agents reliably at scale: multi-project orchestration, isolated concurrency, guaranteed teardown, GitHub Actions integration, and machine-readable outputs.
Multi-project orchestration
Run web, Android, iOS, and desktop suites from one config with --project and tag filtering.
Concurrency and isolation
Run YAML files in parallel via maxConcurrentFiles, each with its own isolated page, Agent, or device.
Lifecycle hooks and cleanup
Project, file, and case hooks with reverse-order cleanup that still runs on timeout or Ctrl+C.
Retries and timeouts
Rerun failed cases after cleanup, with step timeouts, continue-on-error, and bail.
CI & GitHub Actions
Official midscene-action with PR summaries, #runner-step=last-error deep links, and live badges.
AI-readable outputs & diagnostics
Emit summary.json and result.md for scripts and AI agents, with model verify and token tracking.
Next steps
- Create a test project: create, run, change a case, and inspect results.
- Write YAML cases: author and maintain cases.
- Built-in Nodes across platforms: inspect universal AI capabilities and platform-specific built-in operations.
- Configure test projects: manage environment variables, case files, and execution projects.
- Develop custom Nodes: encapsulate reusable business operations.
- Run tests and lifecycle and concurrency: control execution modes, concurrency strategies, and inspect test reports and diagnostics.
- Run in GitHub Actions: connect to CI workflows.
The legacy tasks/flow YAML runner is in maintenance mode, receiving compatibility updates and necessary fixes. Use Midscene Test for new projects and cases. Existing projects can continue using the midscene command; see Migrate to Midscene Test when switching to midscene-test.

