🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.They replace the need for any expected behaviour
  2. B.They generate many inputs automatically and shrink a failing input to the smallest example
  3. C.They only test the happy path
  4. 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 →