Interview practice question
Test with random data fails occasionally
Backend Engineering · Testing · Beginner
A test that uses randomly generated user data fails about once in 200 runs. How do you deal with it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Random data hits edge case.
- Log/fix the seed to reproduce.
- Find the failing input.
- Fix code or test assumption.
- Use seeded or property-based testing deliberately.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.