5

Boundary Value Analysis is, according to ISTQB - a black box technique. How can anyone agree with that?

Most developers write unit tests following equivalence partitioning and boundary value analysis to make sure the edge cases are covered. Am I missing some specific distinction that makes sense in this case? I can see some IEEE documents too refer to Boundary Value Analysis as a black box technique.

1
  • Love that question! It shows that theory is not always capturing practice well. The fact that what you're doing doesn't match definitions doesn't mean you're doing it wrong.
    – dzieciou
    Mar 1, 2016 at 17:15

3 Answers 3

5

BVA and unit tests

It depends on when and how the developer implements the unit test. If the developer writes the test first (as recommended by test driven development, TDD), it's a black box test, because he doesn't see the implementation. In that case, the test conditions can only be based on the software specification.

If the developer writes a unit test after implementing the method, it depends:

  1. he can write the test looking at the implementation and taking the boundary values from the implementation. That's a white box test. However, the values used for testing might be different from the specification.
  2. he can write the test not looking at the implementation. In that case it's like writing the test before implementing the method and thus a black box test.

BVA and system tests

The same applies to system tests. You could look at the source code and then perform tests from the boundaries you recognize there. Then that's a white box test. The question is: is that useful? Typically not, since you test something that was not necessarily defined in the specification.

The more useful test is the black box test: look at the specification, not the code, determine the boundaries and then perform the test.

Conclusion

Boundary tests exist as white box and black box tests. However, from the usefulness I can understand that ISTQB has defined them as black box test.

4
  • I don't agree. I often find edge cases that reveal bugs based on the code or code coverage information. So this information is very useful. I would then call BVA a grey box technique.
    – dzieciou
    Mar 1, 2016 at 17:38
  • @dzieciou BVA is supposed to be based only on the boundaries of the requirements. The implementation may have additional boundaries that get generated, and my gut tells me those should be tested, but I don't believe those fall under the definition of BVA. Imagine an notes field built with a StringBuilder in Java. It's limited by the DB to 2000 characters, but we know StringBuilder will react differently at 16, 32, 64, 128, 256, 512, 1024 and 2048 characters due to how its implemented. We still only test 0, 1, 2000 and 2001 character strings with BVA.
    – corsiKa
    Mar 1, 2016 at 18:46
  • @corsiKa, sure, I can call it BVA2 and put a trademark on that ;-) But my argument was not really about definitions but rather about usefulness. The answer states that defining classes of inputs and their boundaries based on the implementation is less useful than defining them based on requirements only. I don't agree and think that your example shows it perfectly: both implementation and requirements can help.
    – dzieciou
    Mar 1, 2016 at 18:53
  • I 100% agree that it's a matter of symantics and not usefulness. Like most definitions, if you don't understand why it's important and how to leverage its principles, you're doing yourself (and the researchers who formalized it) a disservice.
    – corsiKa
    Mar 1, 2016 at 19:36
1

Different terms ad terminologies have different meaning to people. It depends on an individual's understanding and thought process as to how they perceive, understand, accept and use terminologies, methods, processes or anything for that matter.

Why don't you describe here what Boundary Value Analysis means to you and why?

4
  • 1
    As we are supposed to adhere to standards. Apparently, those contradict each other and most importantly also common sense :) BVA is a technique that obviously works for both black and white box testing, there is no logical reason to classify it as black box, as far as I know
    – Pietross
    Nov 4, 2015 at 7:31
  • 1
    When you talk about standards, what standards do you mean? Did you define those standards or were they defined by the people who you work for? Do you think it's in fact a standard or just some guidelines? May it be a standard or a guideline can't it be improved to make it more meaningful and useful? If you believe that BVA works for both Black-box and White-box testing, then can you put it in terms that can easily be understood by the people you're trying to convince? And if your thinking sounds logical and more appropriate it would be happily accepted and practiced! Nov 4, 2015 at 7:46
  • I do not need to convince anyone, I wonder how come testers do not mind to follow ISTQB in its current status. Other books of course mention BVA as a unit testing technique (i.e. white box).. My question is about reasoning why would anyone consider BVA a black box technique.
    – Pietross
    Nov 4, 2015 at 8:04
  • 1
    The answer to why anyone would consider BVA as only Black-box technique and not White-box is a variable entity. Like I said above, it depends on an individual's thinking and understanding. Everyone will have their reasons for that. I personal don't link BVA to White or Black Box. For me BVA or EP are ways to divide the test possibilities in groups and choose 1 or few candidates from each group to help me test better & quickly by not checking with endless combinations every possible inputs. Similarly, some other person may have a thinking that BVA should only be Black or White box and not both. Nov 4, 2015 at 8:16
-1

Boundary value analysis comes in BlackBox Testing we also known as test design testing. In black box testing tester only test the functionality of software. They can not see the coding of software. That's why we called as black box testing. In Boundary value analysis tester test boundary values of software.

For example, the field that holds the account balance figure may be only six figures plus two decimal figures. This would give a maximum account balance of $999 999.99 so we could use that as our maximum boundary value. If we still not able to find anything about what this boundary should be, then we probably need to use an intuitive or experience-based approach to check it by entering various large values trying to make it fail.

4
  • 1
    This doesn't answer the question of why BVA is defined as a Black Box technique
    – ilm
    Mar 1, 2016 at 17:43
  • @ilm yes it does - The second and third sentence say black box is only about functionality, not about coding. You could say it answers it poorly, but I believe this is an answer.
    – corsiKa
    Mar 1, 2016 at 18:48
  • 1
    @corsiKa Your right. But the OP meant something along the lines of "how can we agree that it can only be called a Blackbox technique and why not Whitebox technique as well. This answer is more like a definition of Blackbox.
    – ilm
    Mar 1, 2016 at 19:04
  • Not sure if you trust Wikipedia, but it says "The tendency is to relate equivalence partitioning to so called black box testing which is strictly checking a software component at its interface, without consideration of internal structures of the software. But having a closer look at the subject there are cases where it applies to grey box testing as well.": en.wikipedia.org/wiki/Equivalence_partitioning
    – dzieciou
    Mar 1, 2016 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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