← Quiz: Testing AI Code: all 10 questions
Quiz: Testing AI Code · Question 9 of 10
What do property-based testing libraries such as Hypothesis add to random testing?
What do property-based testing libraries such as Hypothesis add to random testing?
- A.They replace the need for any expected behaviour
- B.They generate many inputs automatically and shrink a failing input to the smallest example
- C.They only test the happy path
- D.They write the implementation for you
Answer & explanation
Correct answer: They generate many inputs automatically and shrink a failing input to the smallest example
A small failing example is much easier to debug.
Can you get the rest right without peeking?
Take the timed Quiz: Testing AI Code quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →