The most common approach in Software testing is the black-box and white-box as they are very easy to distinguish.
White-box
Other known names
- Structural testing;
- Clear-box testing;
- Glass-box testing;
- Open-box testing;
Objective:
- Test the internal behavior of components of the applications;
- Design the test cases to cover maximum number of paths;
Orientation:
- Test oriented to code structure
QA Access level:
- Entire source code
Black-box
Other known names
- Functional testing
Objective:
- Test the interface;
- Find incorrect functions;
Orientation:
- Test oriented for functions of application;
QA Access level:
- Inputs, outputs, pre and post condition
I have explained using bullets, so that it can be easier to read. I hope I haven’t forgotten anything.
Ok, now we know the difference between both techniques but what type of bugs can only be discovered in white-box? The answer is easy, bugs like un-used variables.
Grey-box
Grey-box (gray-box) testing isn’t easy to define because there isn’t an official definition. Some people defend that you have access of the code but you cannot read the entire code, only some parts are known. For me, this is cheating, how can you know that the parts you read are the important ones?, and what is the benefit of reading only part of the code?
Others defends that you have access to the technical manual and algorithms, which is true, but in agile development sometimes there isn’t enough documentation or the documentation is not up to date.
Ok, now you are wondering what definition I agree with, well, I believe in two different definitions:
- Using the white-box approach your code uses a third-party control (without access to the source code). In other words you cannot know the entire code because you don’t have access of the third party code.
- When the code is unknown you ask the developer for some details about the code. When the information is received, the Grey Box method is applied.
If you use the grey-box approach you can sometimes reduce the number of tests. But you can hang in there for more details when I will cover that in a future post about testing techniques.