Manuals / Playwright with Python / Chapter 42

Part 6 · Pro-Level Practices · pro · ~40 min · Chapter 42 of 61

32. Performance Considerations

Reducing test execution time The biggest wins, roughly in order of impact: 1. Auth session reuse (storage_state, Chapter 20) — skip repeated UI logins across the suite.

Path progress
68%

Step 1 of 5

Reducing test execution time

The biggest wins, roughly in order of impact: 1. Auth session reuse (storage_state, Chapter 20) — skip repeated UI logins across the suite.

Reducing test execution timeDrag stickies · tap for tips
Study mapDrag stickies · tap for tipsKeep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Assert the UIdrag · tap →Retry wiselydrag · tap →Seed datadrag · tap →Close the loopdrag · tap →Keep it shortdrag · tap →Name the waitdrag · tap →Scope locatorsdrag · tap →Trace when stuckdrag · tap →One browser firstdrag · tap →Isolate statedrag · tap →Pathwise hackdrag · tap →Page under testdrag · tap →Multi-browserdrag · tap →Automation pathdrag · tap →Tooling nodedrag · tap →
Was this step clear?
Chapter learning outcomes
  • Reducing test execution time
  • 2. API-based test data setup (Chapter 18) — skip slow UI flows for state that
  • Optimizing locators and waits
  • Worker/parallelization tuning
  • Part 7: Real-World Project & Job

Clear these before you leave

Side quest

32. Performance Considerations deliverable

Apply one idea from “Reducing test execution time” in a small script or note.