Importance of Choosing Appropriate Testing Techniques for Effective Quality Assurance
To explain the difference between Black Box Testing and White Box Testing, simply put, if you think about a car, you have two types of people, the driver (black box) and the mechanic (white box). The driver doesn’t really need to understand how the engine works to drive, just press a few buttons and levers and turn the wheel and you are off. The mechanic however, lifts the hood and tinkers with the engines to make the car go, looking at the internal mechanisms, following the flow of petrol into the engine right through to the output gases from the exhaust.
Both Black and White Box Testing are the two most popular software testing techniques. Once you have a good understanding of the requirements, the budget, the system and what you are expected to test then you can choose a testing technique, whether that’ll be Black Box or White Box, the choice is yours.
Black Box Testing by nature is a software testing technique in which functionality of the software under test is tested without looking at the code structure (inside the box). Simply put, input data then check the output. In Black Box Testing it just focuses on inputs and outputs of the software system without bothering about internal knowledge of the software program.
Of course, there’s a little bit more to it in the real world. You will still have to look at the requirements and specs to understand what you need to test, and then to select the data for inputting and determining the expected results. Once complete, you can construct test cases, execute them and compare the output (pass/fail).
Black Box Testing manifests in many forms, but the three most common types are:
• Functional testing, whereby testing is related to the functional requirements of a system.
• Non-functional testing is not related to testing of a specific functionality, but requirements such as performance, scalability, usability.
• Regression testing is done after code fixes, upgrades or any other system maintenance to check the new code has not affected the existing code, automation can play a great part in regression testing.
White Box Testing (also known as Clear Box Testing, Open Box Testing, Glass Box Testing, Transparent Box Testing, Code-Based Testing, Structural Testing and I’m sure there are more terms…) is a software testing method in which the tester inputs specifically chosen data to exercise specific paths through the code and determines the appropriate outputs. Some programming and implementation knowledge is essential as White Box Testing is testing beyond the user interface and into the heart of the system under test.
The White Box Testing method is applicable to the following levels of software testing:
• Unit Testing: For testing paths within a unit.
• Integration Testing: For testing paths between units.
• System Testing: For testing paths between subsystems.
However, it is mainly applied to unit testing and testing can be commenced at an earlier stage in the physical testing life-cycle. There’s no need for a complete system to be available to start unit testing.
This article is part 2 of 2 and outlines the differences between Black and White Box testing. If you missed the first part of this series, you can read it here.