# Boundary value analysis - ordered list

I have a question about using the boundary value analysis.

I know that elements in partitions should be ordered if we want to use boundary value analysis, but it is a little bit confusing to me that in one of my books it is stated that: “Every equivalence class needs to be “compact”. Formally, this means that if any two values a, b belong to a certain class, then necessarily all elements x, such that a<x<b, must also belong to this class.

Informally, we can say that the classes cannot have “holes”.

So, if I understand it correctly, this means that our partition should look like in this way: {1, 2, 3, 4, 5, 6, 7, 8...}, and cannot be in this way: {2, 4, 6, 8, 10...}? Or what does it mean that it “cannot have holes”? Also, on Wikipedia, it is stated that "The test vectors on either side of the boundary are called boundary values.

In practice, this would require that the test vectors can be ordered and that the individual parameters follow some kind of order (either partial order or total order)."

What does partial order mean here with an example?

• Note that the classes need context in their analysis. {1, 2, 3, 4, 5, 6, 7, 8...} means nothing by itself - you need to consider what each value means in the context of your testing. May 27, 2021 at 11:57

{1, 2, 3, 4, 5, 6, 7, 8...}

Hm, how about decimal numbers? 1.5, 2.5 etc. What is the smallest increment anyway?

What you're missing is some context in which BVA is applied. You can't abstract that away and start drawing equivalence classes out of thin air.

A concrete example #1:

If you have a field in which you enter a human age, than it might make sense that you'll have only integers starting from 0 or 1, so then it can look like {1, 2, 3, 4, ...}

A concrete example #2:

If you have a field in which you enter a correlation coefficient, than you'll likely want to input a decimal number in <-1;1> interval.

In each of these examples, you have a completely different increment and boundaries. And that's the point, you always have to take your context into account. So going back to one of your question:

So, if I understand it correctly, this means that our partition should look like in this way: {1, 2, 3, 4, 5, 6, 7, 8...}, and cannot be in this way: {2, 4, 6, 8, 10...}?