For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /midscene-test/overview.md.
  • English
  • 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.

    cases/refund.yaml
    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: {}Business

    Separate 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

    1. nodes/order.ts
      defineNode({
        name: 'order.prepare',
        description: "Create a test order",
        inputSchema: z.strictObject({
          status: z.literal('paid'),
        }),
        async execute({ input }) {
          await orders.create(input);
        },
      });
    2. midscene-node-spec.md
      ### order.prepare
      Create a test order
      - status: "paid"
    3. case.yaml
      steps:
        - order.prepare:
            status: paid

    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

    Midscene.js/Overview/PassedFind headphones under $100
    10.6s28.5K tokensVisualYAML
    #3aiActPassed

    Type "headphones" in the search box and click Search

    ExecutionTime
    Plan1.82s
    Locate0.42s
    Input0.96s
    Tap0.55s
    Elapsed3.75s
    Model2.24s
    RecordPlan · 1.82s
    2s
    4s
    6s
    8s
    Midscene Shop
    Ready to search
    Wireless Headphones$89
    Add to cart

    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.

    Next steps

    Migrating from the legacy YAML runner

    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.