入门与基础测试
Day 01-05Getting Started with Playwright
理解 Playwright 解决什么问题,完成项目初始化并运行官方示例
Understanding the Test File Structure
看懂 test、expect、page 的关系,写出第一个自己的测试
Recording Scripts with Codegen
使用 Test Generator 快速生成脚本并完成重构
Running Tests and CLI Essentials
掌握常用 CLI,能按文件、浏览器、headed/debug 模式运行测试
Weekly Review 1: First Smoke Test Suite
整合 Day 1-4,从 0 创建项目并写 5 条冒烟测试
定位器、断言与等待
Day 06-10Locators Fundamentals
掌握推荐 locator 的优先级,避免脆弱 CSS/XPath
Advanced Locators: Filtering and Chaining
用 filter、容器加内部定位处理列表、表格和重复元素
Assertions
掌握 web-first 断言,知道何时断言页面、元素、URL、文本、数量
Auto-waiting and Timeouts
理解 auto-waiting,避免滥用 waitForTimeout,掌握合理等待策略
Weekly Review 2: Writing Stable Tests
整合 Locator、Assertion、Auto-waiting,建立稳定测试标准
测试组织与项目结构
Day 11-15Playwright Configuration
理解 playwright.config.ts,掌握 baseURL、projects、timeout、retries、reporter、use
Hooks and Test Organization
掌握 beforeEach、afterEach、describe,学会组织测试文件和套件
Fixtures
理解 fixture 的核心机制,学会使用内置和自定义 fixture
Page Object Model
掌握 POM 思想,把页面操作封装成语义化类
Weekly Review 3: Project Structure Refactor
建立可维护项目结构,产出规范 README,具备团队协作基础
真实业务场景
Day 16-20Authentication and Reusing Login State
掌握 storageState,避免每条测试重复登录,理解复用风险
API Testing
使用 request fixture 做 API 测试,理解 UI 与 API 如何配合
Network Interception and Mocking
掌握 page.route(),能测试异常、空数据、慢响应等场景
Uploads, Downloads, Dialogs, and Frames
掌握文件、弹窗、iframe 等复杂页面交互
Weekly Review 4: Real Business Flow E2E
组合认证、API、Mock、文件能力,完成接近真实业务的 E2E 流程
CI/CD 与交付
Day 21-25Trace Viewer and Failure Debugging
熟练使用 Trace Viewer,从 action、snapshot、network、console 定位失败
HTML, JUnit, and Allure Reports
掌握内置报告体系,了解 CI 常用报告格式
Parallelism, Retries, and Sharding
理解并行执行模型,掌握 workers、retries、fullyParallel、shard
CI/CD Integration
把 Playwright 放进 GitHub Actions,理解浏览器安装、依赖缓存、报告上传
Weekly Review 5: A Sustainably Running Test Suite
整合 trace、report、parallel、CI,让测试持续可运行
进阶掌握
Day 26-30Visual Testing and Screenshot Comparison
掌握 screenshot assertion,能判断视觉测试适合哪些场景
Accessibility and User-Behavior Testing
理解 role-based locator 与可访问性的关系,从用户行为角度写测试
Test Data Management and Environment Strategy
掌握数据准备、隔离和清理思路,理解环境稳定性对自动化的影响
Framework Design and Team Standards
从会写脚本升级到能维护框架,建立团队级规范
Final Project and Next Steps
完成 Playwright QA Automation Starter 项目,明确下一阶段方向