Skip to content
Course outline

Lab: boundary values on a real shop

Find the limits of four inputs, test exactly at and around each one, and see which limits the shop gets wrong.

  • 30 minutes
  • By hand
  • 4 planted bugs
  • Free, no sign-up

Most bugs hide at the edges of what an input accepts: the last valid value, and the first one after it. Boundary value analysis tests exactly there, so a handful of values covers a whole range.

Cedar Books has four inputs with clear limits in its requirements. At least one of the shop's limits is off by one. Your job is to find out which, with as few tests as possible.

Open Cedar Books Its requirements

What you need

  • The requirements REQ-05 (quantity), REQ-09 (free delivery), REQ-11 (stars) and REQ-13 (the API's page size, in its OpenAPI document).
  • A table with four columns: input, value, expected result, actual result.
  • For the API part: a terminal with cURL, or any API client.

Steps

  1. For each input, write its valid range from the requirement: copies of one book 1 to 10; free delivery from 30.00; stars 1 to 5; API page size 1 to 50.
  2. List the two-value boundary values of each range: each edge, and its nearest invalid neighbour. For the copies: 0, 1, 10 and 11.
  3. Test the copies in the basket's quantity field, with a book that has plenty in stock. Note what the shop accepts and what it refuses.
  4. Test free delivery with "Counting the Stars Again" at 15.00: one copy, two copies, and a basket just above 30.00. Watch the delivery line.
  5. Test the stars through the API: sign in with POST /api/auth/login, then send reviews with the ratings 0, 1, 5 and 6 to POST /api/books/{id}/reviews.
  6. Test the page size: GET /api/books with limit 0, 1, 50 and 51. Then fill in the actual column and mark every row where actual and expected differ.

Hints

Stuck? Open one hint at a time, and try again after each one.

Hint 1

Two-value analysis tests the boundary and the value just past it; three-value analysis adds the value just inside.

Hint 2

Free delivery has a single boundary, and the requirement says on which side 30.00 itself falls.

Hint 3

The review form offers only 1 to 5 stars. The API takes whatever number you send: that is where to test.

Hint 4

A server error (500) is never the right answer to a value out of range.

Done? Record it

Sign in to QAIA to record this lab and keep track of the labs you finish.

Sign inRequest accessStart freeGet started

Finished the steps and compared your work? Mark the lab done to keep it with your Academy progress.

The planted bugs

This lab is about 4 of the shop's planted bugs. Compare your table with the planted bugs of this lab below: did your boundaries catch every one of them?

Sign in to see the planted bugs this lab is about. They are kept off this page, so nobody reads them by accident before trying.

Sign inRequest accessStart freeGet started

Try the lab before you look: a bug you find yourself teaches far more than one you read about.

Learn the skill

Free tools that help with this lab

Put the lessons to work on a real site

Describe a user journey in plain English. QAIA walks it in a real browser and hands back the test cases, the automation code and the evidence of every step.