5

Black box testing

The above diagram shows black box testing well. Unlike white box testing where we know how the code works, black box testing is based around the idea that we do not. It is about testing the functionality of the code. We look at the input and pass it through the code. Once processed we look at the output. If the output is correct the test will pass. We are not interested in how the black box performed the result. We are not interested in what paths the code is following. What we are interested in is if the functionality of the code is correct.

 

Black box testing is commonly done by people who are not directly involved in development. It is also done in a very systematic manner. For example it is not acceptable to just play around with the software to see if it works or not. Even through we may be focusing in on the functionality we loose two main advantages. Firstly the tests will be difficult to repeat. So if we find a bug it will be hard to recreate it. Secondly we may miss some of the more subtle features. Both of these are critically for stable code.