Use the UI like a user
Vision-driven E2E testing in natural language
A GUI Agent and E2E testing framework for web, mobile, and desktop.
Back to the essence of E2E testing with vision
E2E testing should verify the interface, not its code structure. Tests tied to UI code structure are inherently fragile — and even more importantly, they cannot tell whether a user can actually understand and use the interface, or whether the UI conveys the right information.
In the AI-native era, vision models give us the ability to test closer to the essence of E2E — looking at the screen to act and judge like a user. With accuracy and cost now in balance, the next stage of E2E testing is already here.
Describe steps and expectations in natural language
Describe what a user wants to do and what they should see. Express the same intent in YAML with Midscene Test, or in your existing JavaScript tests.
A GUI Agent built for vision-driven testing
If you already have a test suite, Midscene’s GUI Agent brings visual actions and assertions directly into it. We recommend Playwright Test for web apps and Rstest or Vitest for mobile and desktop apps.
Operate and verify by vision alone
Midscene reads screenshots rather than code, testing the interface the way a user uses it.
- PlanRead screenshots and decide the next step
- Locate & ActLocate targets on screen and perform the UI action
- VerifyAssert on what users actually see
One API, across platforms
Visual localization does not depend on the UI rendering stack or code structure, so the same API works on web, mobile, desktop, and canvas-based interfaces.
await agent.aiAct('Search for headphones')Model options and cost
Pure vision testing avoids sending large DOM trees to the model. With today’s vision models, accuracy and API cost reach a practical balance for E2E testing.
Benchmarks
Midscene Test: what an E2E framework looks like when tests are pure intent
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.
Who is using Midscene
Next steps
- Understand the basics: Learn how the GUI Agent works and explore its core capabilities in The Basics
- Get started: Answer a few questions in Get started and complete a first run on your platform
- Create a test project: Write and run YAML test cases with Midscene Test
- Write tests with code: Integrate with Playwright Test for web apps or Rstest or Vitest for mobile and desktop apps
- Run standalone automation workflows: Write scripts with the JavaScript SDK
To let AI coding agents operate your UI, explore Midscene Skills.



