The boundary values AI gets wrong

Module 1: Test with AI, and prove every test works

Course outline

Spot the mistakes

Guess first, no penalty. The requirement says a quantity field accepts whole numbers from 1 to 10. Tap the two AI-written test cases with the wrong expected result.

AI-written test cases

0 of 2 found

Boundaries are where the bugs live

A boundary value is a value at the edge of what's allowed, like the lowest and highest. Bugs cluster there, because "less than" and "less than or equal to" look almost the same in code. AI tools write boundary cases quickly, and they get the edges wrong more often than you'd expect.

For any range, test both sides of both edges:

  • Just below the minimum (0 for a 1 to 10 field): rejected.
  • The minimum (1): accepted.
  • The maximum (10): accepted.
  • Just above the maximum (11): rejected.

Then add what the range doesn't say: a decimal, a negative, an empty field, text, a value with spaces. Each is a question for the requirement, not your guess.

Check every expected result against the requirement. A wrong one is worse than a missing case: it trains everyone to ignore failures.

A worked example

Field: quantity, whole numbers 1 to 10 (from the acceptance criteria)

Boundary cases:  0 rejected | 1 accepted | 10 accepted | 11 rejected
Other inputs:    2.5 rejected | -1 rejected | empty rejected | "abc" rejected
Open question:   " 5 " with spaces: accept and trim, or reject?
                 Not in the criteria. Asked the product owner.

Fill the gaps

Fill the gaps.

Boundary check

For a field that takes 1 to 10, I test . I check each expected result against , and anything the requirement doesn't cover becomes .

Try it

Your steps, about 2 minutes

0 of 1
  1. 1.Pick one field with a range in your app. Write the four boundary cases and one question the requirement doesn't answer. Add the four-value rule to your AI test kit.2 min

Practice

Question 1 of 2

A discount applies to orders from $100 to $500. Which four boundary values do you test first?

AI tutor

Ask about this lesson and get coached through the Try it task. The tutor is part of Learn Pro.

See Learn Pro