QA Fundamentals · Middle · Question 24 of 75
What is a common cause of flaky UI tests?
- 1Fixed waits and timing assumptions about async behaviour
- 2Running tests in a headless browser instead of a visible one
- 3Using too many assertions inside one test case
Show the answer
Correct answer: Fixed waits and timing assumptions about async behaviour
Explanation
sleep(2000) may be enough locally and too short in CI. Waiting for a specific condition (an element, a response) makes tests stable and faster.