White Box Testing
Lecture 39 introduces White-Box (structural / glass-box) testing, where test cases are derived from the internal procedural logic and source code of software components. The lecture details the construction of Control Flow Graphs (CFG), mapping code blocks to nodes and control transfers to directed edges. Students master McCabe's Cyclomatic Complexity metric V(G) = E - N + 2P, which determines the number of linearly independent paths through a routine and sets the upper bound on test cases required for full coverage. The curriculum evaluates test coverage criteria: Statement Coverage (ensuring every line executes at least once), Branch/Decision Coverage (exercising both true and false outcomes for every decision), and Basis Path Testing (guaranteeing execution of all basis paths). Coupling classifications, spanning content, common, control, stamp, and data coupling, are critically evaluated to eliminate structural dependencies. Cohesion levels, from coincidental and logical to communicational and functional cohesion, provide objective criteria for evaluating module quality. Object-oriented analysis using the Coad and Yourdon methodology illustrates identifying classes, responsibilities, attributes, and services. Structural relationships, including Generalization-Specialization inheritance hierarchies and Whole-Part aggregation assemblies, are modeled with precision. Dynamic interaction modeling demonstrates sequence diagrams, object lifelines, activation bars, and synchronous versus asynchronous message exchanges. Software architecture frameworks explore Kruchten's 4+1 view model, connecting logical, process, development, and physical architectural perspectives. Architectural styles, including layered hierarchies, repository patterns, client-server structures, and pipe-and-filter pipelines, are contrasted. Design pattern principles demonstrate how Gang of Four solutions, such as the Observer pattern, decouple subjects from observers to handle state changes. Professional coding style standards detail clear identifier naming, consistent indentation, layout structure, and self-documenting code conventions. Defensive programming practices illustrate safe file handling, resource leak prevention, and robust input validation in C++ and Java environments. Exception handling mechanisms demonstrate try-catch-finally blocks, structured error propagation, and eliminating silent runtime failures. Software portability guidelines detail isolating hardware-dependent logic, handling endianness, and standardizing primitive data type representations. Verification and validation activities contrast static software inspections and walkthroughs with dynamic code execution testing techniques.
No questions available yet.
There are currently no examination questions published for White Box Testing. Explore other curriculum units or build a custom quiz with the practice builder.