arrow-right-arrow-leftEP & BVA

Quick Summary

  • Equivalence (Class) Partitioning (ECP or just EP) - group values or other things together that are expected to behave the same way, then pick one (or a few) to test

    • EP is not limited to input values. EP can be applied to output, versions of products or environments (e.g., consider groups of browsers and/or their versions as "equivalent" or "close enough")

  • Boundary Value Analysis (BVA) - testing around partition edges generally yields a higher chance of finding bugs. For the example above - values 17 (reject) and 18 (accept)

    • BVA may be "normal" or "robust", based on system criticality and risk

    • Use min, min+, nom (nominal, or “mid”), max–, max and context-driven special values

    • 0 is a frequent special value

    • Other special numerical values: -1, 0, 0.01, 100, 100.1, 101

    • Other common special technical numerical values:

      • Unsigned 8-bit Integer Max (uint8): 255

      • Signed 32-bit Integer Min and Max (int32): –2,147,483,648 and 2,147,483,647

      • Unsigned Integer Max (uint32): 4,294,967,295

      • JavaScript Safe Integer Min and Max (–9,007,199,254,740,991 and 9,007,199,254,740,991)

    • Boundaries exist for other data types

      • Time and Dates: start or end of minute/hour/day/etc.

      • Strings: min, max length restrictions,

EP Basics

Even if the System Under Test (SUT) has a single number input, there are an infinite number of possible test values. We may test with -2,147,483,649, 0 , 10.555 or 65,535.

We don't have infinite time to test infinitely, so what numbers do we pick?

circle-check

Example: Shipping Delivery Fee based on distance (whole values only)

  • Free: 0–49 km

  • Standard: 50–499 km

  • Not Supported: 500 km and above

Without using BVA, we may pick one value for each partition, for example 5, 32, 700.

Thus

Number of partitions = the number of test values (bare minimum)

Adding BVA to EP

Picking representative 1+ values for each partition helps reduce effort, but it is not targeted enough. Practice shows that bugs are frequently found around the edges, for example, because code implementation may be incorrect (e.g., using > instead of >= ),

Base or Normal BVA

In Software Testing literature, you will encounter "Base" or "Normal" BVA that includes more values. For a single partition or parameter, you may use all or some of these - min, min+, nom (nominal, or “mid”), max–, and max.

This translates to the general formula:

an

  • a - number of valid values per partition

  • n - number of partitions

Use 4n (min, min+, max-, max per partition) without mid or 4n + 1 with it.

Robust or Standard BVA

If we add min- and max+ (invalid values just outside the boundaries), we get "Robust BVA".

circle-info

min– and max+ values may belong to adjacent partitions and thus can be considered valid test inputs for those neighboring partitions.

Special Business Values

It is often wise to add special values. "Special" depends on the domain (medicine, banking, etc.).

circle-exclamation

While 0 is arguably the most common special value, others exist.

Value
Why special

100

Where percent-based values are used, i.e., 100% is the maximum of something

100.1 or 101

Invalid or excessive percentage

.01

Smallest currency denomination in most systems. In other cases, .001 or .0001, etc. may be the smallest allowed decimal value

1

Minimum whole (integer) value

-1

"Missing value", "not available" or similar meaning. 1) Usually, this value should not be exposed to users 2) If this value is generated as an (internal) intermediate result, it may lead to incorrect calculations in later processes.

Any

To highlight that any value may be special depending on the domain, e.g. 212 Fahrenheit (100 Celsius) at which water boils at sea level.

Thus, the updated desired number of test values may be expressed as:

an + c (special values)

Example: 4n + 2 (4 edge values for each partition n, and 2 special values, such as -1 and 0)

Special Technical Numerical Values

It is useful to know Computer Science (CS) Fundamentals to be aware of special technical values that may break the software. For example, the Delivery Fee app may work correctly if you input a large number, such as 2,000,000,000 , but will break with 2,147,483,648 .

Why?

Data is stored in program variables in memory. For numbers representing business values, common data types are int/integer or JavaScript's Number (whole numbers: age, count, quantity) and double / float 64 (wherever decimals are needed, e.g. 10.50 or 12.4567).

circle-exclamation

Min and Max Values may vary depending on the type and the technology used. CS Fundamentals are a separate topic worth studying by all involved in IT, but here is a non-exhaustive list of values to use for testing (add 1 to Max or subtract 1 from Min):

Type
Use Case Example
Min Value
Max Value

byte / uint8*

Small positive integers

(flags, statuses)

0

255

short / int16

Small integers

(e.g. config codes)

-32,768

32,767

unsigned int / uint32

Non-negative integers

0

4,294,967,295

int

-2,147,483,648

2,147,483,647

double

Where decimals are needed

±4.9e-324

(smallest pos)

±1.7976931348623157e308 (ca. 1.797 sextillion × 10³⁰⁸,

an enormous number)

Number

(JavaScript)

Wherever this tech is used

-9,007,199,254,740,991

See MIN_SAFE_INTEGERarrow-up-right

9,007,199,254,740,991

See MAX_SAFE_INTEGERarrow-up-right

*"u" stands for "unsigned". Numbers may be unsigned (only 0 or greater), or signed (both negative and positive).

circle-info

Learn the technology stack of your SUT and test accordingly.

EP & BVA for non-number inputs

Boundaries and partitions apply to more than just numbers. Test what is relevant to your context.

This table focuses on boundaries; it is not an exhaustive list of possible or useful test values.

Type
Example

Time

Start / end of second / minute / hour

00:00 - 00:59

Midnight or noon

00:00:00, 12:00:00

Dates

Start / end of day, month, year, etc.

Jan 1, Dec 31, Feb 29 in leap years

Always invalid days (invalid partitions)

Feb 29 in non-leap years, Feb 30, Apr 31

Daylight Savings Time (DST) Transitions

1) DST rules vary by country 2) Days vary by year 3) Some countries abolished DST

For example, JavaScript counts negative milliseconds for dates earlier than Unix time. const date = new Date('1969-12-31T23:59:59Z'); console.log(date.getTime());

// -1000 (negative milliseconds)

Strings

Invalid String or Character

Any of: 1) Empty string 2) Whitespace only 3) Outside Min / Max length 4) Accented chars (àáâãçèéìíîðö, etc.) 5) Special chars (( “ ‘ ` | / \ , ; : & < > ^ * ?, etc.) 6) 255 or 260 - max file name length and max full file path lengtharrow-up-right in some Operating Systems.

EP for things other than inputs

Most resources on software testing limit the concept of EP to inputs (mostly numbers, sometimes strings, dates, and others). But EP is about grouping things with similar behavior - whether that’s inputs, states, configurations, or outputs - and testing a representative from each group. It’s a prioritization and risk-based technique, not limited to raw input fields. Depending on your context and needs, you may apply EP to:

1. Outputs / Results

  • Group expected outputs into equivalence classes.

  • Example 1: For a payment system, outputs might be:

    • "Success", "Insufficient funds", "Invalid card", etc.

2. System States

  • For state-based testing, partition based on states.

  • Example: Logged in, logged out; account locked, account frozen.

3. User Roles / Permissions

  • Different roles = different behavior.

  • Example: Admin, Editor, Viewer.

4. Test Environments or App Versions

  • Example 1 (simple - app versions):

    • Split the app versions into "oldest supported", "current," and "beta" partitions.

  • Example 2 (more advanced - test environments):

    • To test Web App feature X, you might group Google Chrome versions 130-139 as Partition A, and versions 140-145 as Partition B

    • To test feature Y, a different grouping might make more sense - 135-145 as Partition A, and 146-150 as Partition B

    • In such cases, traditional BVA ideas like testing min–, min+, or max– may not apply meaningfully.

5. Timing / Events

  • Before the event, during, after.

  • Example: Before a sale, during active discount, after expiration.

Last updated