Skip to content

feat(examples): add Midscene Test Runner demo - #99

Open
xiong35 wants to merge 1 commit into
mainfrom
feat/test-runner-demo
Open

feat(examples): add Midscene Test Runner demo#99
xiong35 wants to merge 1 commit into
mainfrom
feat/test-runner-demo

Conversation

@xiong35

@xiong35 xiong35 commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a standalone midscene-test-runner-demo that demonstrates how to build and run a Web Test Project with @midscene/test.
  • Use TodoMVC to show the boundary between declarative YAML cases and reusable TypeScript Nodes:
    • Playwright preset Nodes handle navigation and viewport setup.
    • Custom todo.* Nodes prepare data, capture state, and perform exact deterministic assertions.
    • Midscene Nodes use aiAct and aiAssert for visual interaction and user-facing semantic validation.
  • Demonstrate Project setup and teardown, workflow lifecycle hooks, Zod-validated Node inputs, structured Node results, and Midscene reports.
  • Add and commit the generated midscene-nodes.md reference so users can inspect the registered Node contract directly.
  • Pin @midscene/test and @midscene/web to 1.12.3, add setup and troubleshooting documentation, and expose the demo from the repository README.

Test plan

  • Run pnpm run typecheck.
  • Run pnpm run describe:nodes and confirm it completes without Node warnings.
  • Confirm the generated midscene-nodes.md exactly matches the current describe-nodes output.
  • Run pnpm run browser:install.
  • Run pnpm test without model configuration and verify:
    • the deterministic TodoMVC case passes in a real Chromium browser;
    • beforeEach, afterEach, and afterAll execute correctly;
    • the AI case reports the missing model configuration explicitly.

@xiong35
xiong35 requested a review from yuyutaotao September 7, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant