DAY 15
Debug & Trace
A professional does not guess. Master the tools that reveal the truth.
Core Practice
- Run with
--uimode for time-travel debugging - Use
--trace onand open in Trace Viewer - Inspect Network, Console, and DOM snapshots
- Add
page.pause()to inspect live browser state
DAY 16
Data-Driven Testing
One test covering many scenarios. Drive from JSON/CSV files.
- Use
test.each()for parameterized tests - Implement a
CsvReaderutility - Run tests with both valid and invalid data sets
DAY 17
API Testing
Test the engine, not just the skin. Built-in API context.
- Create
ApiClientclass with typed methods - Write tests for
GET/POST/PUT/DELETEendpoints - Verify status codes, JSON schemas, and response times
DAY 18
Hybrid UI + API
API for setup, UI for action. The ultimate speed hack.
- Setup test data via API, then verify in UI
- Bypass login page by injecting auth cookies
- Clean up data via API in
afterAllhooks
DAY 19
Network Mocking
Control the network. Test error states and slow responses easily.
- Use
page.route()to intercept API calls - Mock a 500 server error and verify UI handling
- Simulate a 3-second network delay (loading indicators)
- Abort requests to test offline/failure modes
DAY 20
Mid-Way Checkpoint
Consolidate everything from Days 1–19 before the second half.
- Verify POM, Fixtures, and Strict TS are all in place
- Ensure all tests pass 3 consecutive times
- Run
npm run lintand fix all standards errors - Update README to reflect current framework capability
DAY 21
Built-in Reporting
Local and Machine-readable reports for the whole team.
- Configure HTML, JSON, and List reporters simultaneously
- Attach screenshots and traces to failed test reports
- Explore
Report Portalintegration for team visibility