View all services
Talk to QA Advisor
Free tool · Test design

Boundary value analysis, generated

Defects cluster at the edges of ranges: an off-by-one comparison, an inclusive limit coded as exclusive, a rounding rule that tips a value over. Enter the limits from your requirement and get the exact values to test, with the reason each one is there.

Runs entirely in your browser. Nothing you enter is sent to a server.

Enter the limits of a field and get the exact values to test at its edges, with the expected result for each.

Try an example

Used in test titles and exports, such as “Age 17 is rejected”.

The limit applies to

A number such as an age, price or quantity.

1 for whole numbers, 0.01 for money. The values just outside each limit are one step away.

Values per limit

Also tests the nearest valid neighbour, which catches a limit coded as an exact match. Recommended.

7 tests for Age

Age should accept 18 to 60. Run all 7: 5 should be accepted and 2 rejected.

Boundary value test cases for Age
TestAgeExpectedWhy this valueCopy
BV117RejectJust below the lowest valid value
BV218AcceptLowest valid value
BV319AcceptJust above the lowest valid value
BV439AcceptNominal mid-range value
BV559AcceptJust below the highest valid value
BV660AcceptHighest valid value
BV761RejectJust above the highest valid value
Export as

One row per test with title, steps and expected result. Imports into TestRail, Xray, Zephyr or a spreadsheet.

How to use

How to use the Boundary value analysis generator

  1. 1Start from an example, such as Age 18 to 60, or name your own field.
  2. 2Enter the limits from the requirement. Untick a limit if the requirement excludes it: "more than 0" rather than "at least 1".
  3. 3For numbers, set the smallest change: 1 for whole numbers, 0.01 for money.
  4. 4Run every test in the table. Values marked Accept should be saved exactly as entered; values marked Reject should show a validation message.
  5. 5Export the set as ready-written test cases for TestRail, Xray or a spreadsheet, as a Markdown table, or as a Gherkin feature file.

What boundary value analysis is

Boundary value analysis is a black-box test design technique that tests the values at the edges of an equivalence partition. If a field accepts ages from 18 to 60, the interesting values are not 30 or 45 but 17, 18, 60 and 61, because that is where a developer chooses between less-than and less-than-or-equal, and where that choice is most often wrong.

It works on any input with an ordered range: numbers, dates, string lengths, file sizes, quantities in a basket, the number of retries before a lockout. It is usually applied alongside equivalence partitioning, which divides the input into ranges, while boundary value analysis tests where those ranges meet.

Two-value and three-value boundary value analysis

Two-value analysis tests each boundary value and its closest neighbour on the other side. For 18 to 60 that is 17, 18, 60 and 61: four tests. It catches a comparison operator pointing the wrong way, which is the most common boundary defect.

Three-value analysis adds the closest neighbour on the inside: 17, 18, 19 and 59, 60, 61. The extra values catch a different defect, a boundary coded as equality. Take a field with only a minimum, "at least 18". A check written as "age == 18" instead of "age >= 18" accepts 18 and rejects 17, exactly as two-value analysis expects, and only 19 reveals that it rejects every valid age above the minimum. The ISTQB Foundation syllabus describes both variants.

Inclusive and exclusive limits

Requirements state limits in different ways, and the boundaries move with the wording. "At least 1" and "more than 0" describe the same whole-number field: 0 is invalid and 1 is the lowest valid value. The generator works from the lowest and highest valid values rather than from the numbers in the sentence, so both wordings produce the same tests.

When the requirement is ambiguous ("between 1 and 10"), that ambiguity is the first defect to raise. Ask whether 1 and 10 are included before writing a single test, because the developer had to decide too, and may have decided differently.

Choosing the step

The step is the smallest change the system recognises. For whole numbers it is 1. For a price in rupees, dollars or euros it is usually 0.01, so the boundaries of a 0.01 to 999.99 range are 0.00, 0.01, 999.99 and 1000.00. Testing 1000 instead of 999.99 plus one step would miss a defect that only appears between 999.99 and 1000.00.

Choose the step from the data type, not the screen. A field that displays two decimal places but stores four has a step of 0.0001, and a rounding defect can hide between what the user sees and what the database holds.

Boundaries the requirement does not mention

Every field has boundaries nobody wrote down. A text field has a maximum length in the database even when the form has none. A number field has the limits of its data type, such as 2,147,483,647 for a 32-bit signed integer. A date has the earliest and latest date the system can store. Test these implicit boundaries too: they are where overflow, truncation and silent rounding defects live.

Length boundaries also depend on how length is counted. 255 characters of plain text and 255 characters of emoji are different sizes in a database. The edge case string generator produces strings for exactly that test.

QAble service

Manual testing services

QAble testers apply boundary analysis, partitioning and the other systematic techniques as a matter of course, so coverage is designed rather than hoped for.

Explore the service
FAQ

Frequently asked questions

What is boundary value analysis with an example?

It tests the values at the edges of a valid range. For a field that accepts ages 18 to 60, two-value analysis tests 17, 18, 60 and 61, and three-value analysis adds 19 and 59. The values just outside the range should be rejected and the values on and just inside it accepted.

What is the difference between two-value and three-value boundary value analysis?

Two-value analysis tests each boundary and its nearest neighbour outside the range. Three-value analysis also tests the nearest neighbour inside the range, which catches a boundary coded as an equality check rather than a comparison. Three-value costs two extra tests per range.

How many test cases does boundary value analysis produce?

For a single range, four with two-value analysis and six with three-value analysis, plus an optional mid-range value. Narrow ranges produce fewer, because neighbouring values coincide: a range containing a single value needs only three tests.

What is the difference between boundary value analysis and equivalence partitioning?

Equivalence partitioning divides inputs into classes the system treats alike and tests one value from each. Boundary value analysis tests the edges where those classes meet. They are complementary: partitioning gives breadth, boundary analysis finds the off-by-one defects partitioning would miss.

Can boundary value analysis be used for strings?

Yes, on the length. A password of 8 to 20 characters has boundaries at 7, 8, 20 and 21 characters. Choose the text length option in the generator to get strings of exactly those lengths.

Is anything I enter sent to QAble?

No. The values are calculated in your browser.

Need the edge cases found for you?

QAble testers work through the inputs, payment paths and data that break products in production, before your users find them.

Talk to QA Advisor