Skip to main content
Community
Q&A

Is test.step() worth using in Playwright? What does it actually give you?

Ajitesh Mohanta
Ajitesh MohantaAmbassador
3w ago 413 0
I see `test.step()` mentioned in Playwright docs but I'm not clear on when it's worth the extra nesting. From what I understand it: - Groups actions for better trace viewer readability - Shows step names in HTML reports - Doesn't affect test logic But it also adds indentation and `.step()` boilerplate everywhere. For a suite of ~150 tests, is it worth standardising on steps? Or is it mainly useful for very long tests that do a lot of distinct things?

No replies yet. Be the first to answer this question!

Join the discussion

Sign in to join the discussion

Sign in