Skip to content
CodeKruPro

Test boundaries without one failure masking another

Automation taskMediumAsked in: Amazon, Swiggy

"Give me boundary tests for this field" comes up in almost every API round. In this lesson you send the boundary values one at a time, so no failure hides another, and record what each request returned.

Test boundaries without one failure masking another

04 · Design cases and verify stored changes

Recommended first: Turn customer requirements into executable test cases

Your goal: Test boundaries without one failure masking another

Type each request yourself. This lesson shows the method, URL, headers and body. It does not fill the console.

  1. 1Set up data
  2. 2Send requests
  3. 3Submit answers

Start here: sign in to practise.

Jump to practice

What you will learn

A boundary is the line where allowed input becomes rejected. Test just inside and just outside that line. Keep every other field valid so one failure does not hide another.

Your goals

  • Send age 18 and age 17 as separate cases.
  • Keep the name and email valid in both.

Before you start

Read the previous lesson first if you have not already. This course does not require programming.

Practice setup

Click Create workspace. Then log in as the fictional customer named in the steps. Use that practice token, not your CodeKru sign-in. Reset starts this lesson’s data over and invalidates its tokens.

Follow these steps

  1. Click Create workspace and log in as fictional customer A. Copy the token.
  2. Send a customer whose age is the number 18, with a valid name and a new email. Select that response.
  3. Send a customer whose age is the number 17, with a valid name and a different email. Select that response.
  4. Copy both statuses.
  5. Submit Answers. The same idea applies to name length 1 and 0, and to 80 and 81. Practice those in your notes with one field changed at a time.

Investigate before concluding

First record the actual result for each case. Compare the body, headers and later state with the stated contract. Keep an observation separate from a prediction; use the model answer only after making your own attempt.

What to keep as evidence

  • Both sides of the age boundary are sent.
  • Other fields stay valid.
  • The statuses match the selected responses.
References for this lesson

Finish this assignment

Select each named response with Use this response. Answer from those responses or the transcript on this page. Click Submit Answers. Your score is the percentage of checks that passed. Core checks are required to finish. Extra evidence checks are labelled. A saved 100/100 means every check passed. Continue opens the next lesson you can submit.

If something goes wrong
  • Change one part of the request at a time.
  • A 401 means the practice login token is missing or expired. Log in again in this workspace.
  • A 409 on create means that fictional email is already used. Choose another email.
Self-review and independent variation
  • Both sides of the age boundary are sent.
  • Other fields stay valid.
  • The statuses match the selected responses.

Age 18.5 and the text 18 are different cases. They are not the integer boundary.

Automatic checks verify the requests and answers configured for this lesson. The self-review is for your own reasoning. A score is not a certificate.

Open API reference

Practise and save your evidence

The lesson is public. Sign in to send requests and save progress. You will return to this lesson.

Sign in to practiseCreate an account