All jobs / Frontend / web developer / Testing

Frontend / web developer interview question · 3–5 years

A Playwright or Cypress suite fails about one run in five on CI, in different places. The tests are full of fixed two-second waits and long CSS selectors.

How do you make it trustworthy?

The strongest answer

Remove fixed sleeps in favour of the tool’s auto-waiting assertions, locate by role or test id, give each test its own seeded data, and use traces from failed runs to find the rest

Why it works

Exactly — flakiness has causes: timing guesses, brittle selectors, shared data. Web-first assertions wait for the condition, not the clock.

What a good answer covers

Answers that fall short

Who gets asked this

More Testing questions