At 3Qi Labs we are constantly looking and recruiting for QE (Quality Engineers), and with all of the interviews we have conducted we have seen a huge range of answers to the simple question “What’s the difference between White Box and Black Box testing?”. This post is our attempt at breaking down the fundamental differences between these 2 core tenets of QA.
White Box Testing
White Box testing focuses on the internal structures of an application, which primarily impacts unit testing. Unit testing involves isolating a single class, component, API, or method to test, before they are integrated with other parts of the software. These tests function in-memory, meaning they do not rely on any data source or web service, other than input provided by the tester/coder, where the return value is validated against a known value. In doing so, the building blocks of the application are tested to ensure a solid foundation for the rest of the code.
Black Box Testing
Black Box testing focuses on the functionality of an application, which impacts a spectrum of types of testing, including functional testing, system testing and user acceptance testing. Functional testing is one level higher in scope from unit testing, which involves testing specific requirements that rely on the code which has been verified during unit testing. Functional tests are evaluated based upon an expected output, after inputting known variables. System testing involves the integration of all the functional tests that reflect end to end workflows. This approach will essentially test the software functionality as a whole, with all components interacting with one another. User acceptance testing (UAT) involves verifying that the application meets the user’s needs. This testing is typically performed by a subject matter expert (SME), who thoroughly understands the application and its’ implementation. UAT reflects real world usage conditions and is the final level of testing before going live.
Differences Between White Box and Black Box Testing
|White Box Testing
|Black Box Testing
|A method of software testing of internal workings of an application
|A method of software testing of examining the functionality of an app
|Testing Levels Applicable
|Mainly lower levels of testing- Unit testing & Integration testing
|Mainly higher levels of testing- Acceptance testing & System testing
|Basis for Test Cases
|Typically Software Developers
|Typically Software Testers