2

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?

1
  • 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. – João Farias May 27 at 11:57
3

{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...}?

The answer is it depends on your context.

3
  • Thank you for such a detailed answer! One thing that I still don't understand, that what is the difference between partial and total ordered list? I would be very grateful if you could give me some example about them too. Thank you in advance! – Jack89 May 26 at 9:53
  • @Jack89: Honestly, I have no idea, and I have never really needed this kind of theory in my testing work. So, I don't want to write some nonsense here, so I won't update my answer. But I think someone else might come here and give you a better answer to your question. Just wait a bit :) – pavelsaman May 26 at 14:18
  • Thank you for your answer! :) – Jack89 May 26 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.