百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

playwright-movies-app

> 测试质量
开源

剧作家正在测试一个电影应用程序

100 stars0 点赞5 次浏览
访问官网GitHub

工具介绍

剧作家正在测试一个电影应用程序

Playwright Movies App

Hands-on guide to end-to-end testing with Playwright on a demo Movies app (Next.js). Covers authentication, search, sorting, API and network mocking, ARIA snapshots, fixtures/helpers, an optional Page Object example, and AI-assisted workflows — taken from a coding agent, not an IDE Testing UI or Codegen.

Movie data and login come from the local TMDB mock API in mock-api/ (no cloud account required for login). Images may still load from TMDB. Fork of next-movies, customized for learning.

Start here

  1. Clone, npm install, npx playwright install chromium, copy .env.example → .env.
  2. Open this repo in Cursor, Claude Code, Codex, or similar (optional).
  3. Read the learn site or open learn/00-start-here.md in the repo.
Resource Path
Course learn/ · published site
Live demo app Movies app
Skills .agents/skills/movies-playwright, learn-lab-coach (+ official playwright-cli, playwright-trace)
Reference docs/TESTING.md, docs/AI-TESTING.md
Exercises docs/exercises/
House style AGENTS.md

Installation

bash
git clone https://github.com/debs-obrien/playwright-movies-app.git
cd playwright-movies-app
npm install
npx playwright install chromium

npm install also builds the mock API.

Environment setup for login tests

bash
cp .env.example .env

The mock accepts any username and password.

Running the app locally

Make sure ports 3000 (Next.js) and 4000 (mock API) are available.

  • npm run dev — mock API and Movies app together
  • npm run mock — mock API only (after npm run mock:build)
  • npm run build / npm run start — production Movies app build

The app talks to NEXT_PUBLIC_TMDB_API_BASE_URL (default http://127.0.0.1:4000).

Deploying the mock API (Cloudflare Workers)

From mock-api/:

bash
npx wrangler login
npm run deploy

See mock-api/README.md for CI secrets and updating the Pages build URL.

Running tests

bash
npx playwright test --ui

Playwright starts both the mock API and the app via webServer. Prefer CLI / UI Mode from your agent; you do not need an IDE Testing extension for this course.

For fixture tiers, web-first patterns, the suite map, and AI workflows, see docs/TESTING.md and docs/AI-TESTING.md.

License

MIT

Issues· 5 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptplaywrighttests

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.