CSC326 ยท 2081 ยท 10 marks
Differentiate between black box and white box testing. Explain the testing process.
Differentiate between black box and white box testing. Explain the testing process.[10]
Quick answer
Software testing is the process of verifying and validating that a software or application is bug-free and meets technical requirements. It also measures efficiency, accuracy, and usability of the software.
Black Box Testing vs White Box Testing and the Testing Process
1. Differentiation: Black Box vs White Box Testing
| Aspect | Black Box Testing | White Box Testing |
|---|---|---|
| Definition | Testing where the tester has no knowledge of the internal structure or code of the system | Testing where the tester has full knowledge of the internal structure, logic, and code |
| Focus | Tests the functionality and output based on inputs | Tests the internal logic, paths, and code structure |
| Tester's Knowledge | Tester does not need to know programming | Tester must have programming and technical knowledge |
| Basis of Testing | Based on requirements and specifications | Based on source code and program logic |
| Also Known As | Functional testing / Closed box testing | Structural testing / Glass box testing / Clear box testing |
| Who Performs | Usually performed by end users or QA testers | Usually performed by developers |
| Error Detection | Detects missing functions, interface errors, and incorrect outputs | Detects logical errors, unused code paths, and security vulnerabilities |
| Coverage | Tests what the system does | Tests how the system does it |
2. The Testing Process
The testing process follows a structured sequence of stages as described below:
Step 1: Inspections
- A testing technique in which participants examine program code for predictable, language-specific errors.
- Syntax, grammar, and other routine errors can be checked by automated inspection software.
- This is typically the first step before actual execution begins.
Step 2: Desk Checking
- A testing technique in which the programmer manually traces through the logic of the program using paper and pencil.
- The reviewer acts as the computer, mentally checking each step and its results for the entire set of computer instructions.
- This helps catch logical errors early without running the program.
Step 3: Unit Testing
- An automated technique where each module is tested alone in an attempt to discover any errors that may exist in the module's code.
- The goal is to isolate each part of the program and verify that individual parts work correctly.
Step 4: Stub Testing
- A technique used in testing modules, especially where modules are written and tested in a top-down fashion.
- A "stub" is a dummy module that simulates the behavior of modules not yet written, allowing higher-level modules to be tested first.
Step 5: Integration Testing
- The process of bringing together more than one module that a program comprises for testing purposes.
- After individual modules pass unit testing, they are combined and tested together to check for interface errors and interaction problems between modules.
Step 6: System Testing
- The process of bringing together all of the programs that a system comprises for testing purposes.
- The system is tested as a whole to verify that it meets all specified requirements.
- System testing can be carried out using:
- Black Box Testing -- testing based on inputs and expected outputs without knowledge of internal code.
- White Box Testing -- testing based on knowledge of the internal structure and logic of the system.
Summary Diagram of Testing Process
Inspections
|
Desk Checking
|
Unit Testing
|
Stub Testing
|
Integration Testing
|
System Testing
(Black Box / White Box)
Conclusion
The testing process moves from individual code review (inspections, desk checking) to module-level testing (unit and stub testing) and finally to system-level testing (integration and system testing). Black box testing focuses on what the system does, while white box testing focuses on how the system does it. Together, they ensure that the software is both functionally correct and internally sound.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.