1/32
Four Levels of Testing
1) Component (Unit) Testing, 2) Integration Testing, 3) System Testing, 4) Acceptance Testing.
Component (Unit) Testing
Testing of individual software programs, procedures, or components as they are written.
Integration Testing
Testing interfaces between modules to ensure they communicate and operate together as expected.
System Testing
Testing of completely integrated groups of programs / the entire system against specified requirements.
Acceptance Testing
Testing to verify system readiness for operational implementation or customer use.
Who performs Component Testing?
Usually performed by the programmer who wrote the code.
Objectives of Component Testing
1) Verify CSU satisfies requirements, 2) Verify algorithms are correct, 3) Verify internal structures and interfaces match design.
Informality of Component Testing
Often informal/ad-hoc; testing ends when the programmer 'feels comfortable' and fixes known deficiencies.
Stopping Criteria in Component Testing
Pre-defined criteria that specify when unit testing is officially complete.
Functional Testing (Black-Box)
Testing that software functions operate, inputs are accepted, and outputs are correct without using knowledge of internal program code.
Categories of Errors Found by Black-Box Testing
Incorrect/missing functions, interface errors, data structure/database access errors, performance errors, and initialization/termination errors.
Sources of Expected Results in Functional Testing
Algorithms from design documents, step-by-step code walkthroughs, or former equivalent software components.
Equivalence Partitioning (EP)
A black-box method that divides inputs into equivalence classes so that testing one representative value tests all values in that class.
Sampling Method
Similar to Equivalence Partitioning but more thorough; selects a certain number of multiple values within each class (avoiding random/non-reproducible values).
Boundary Value Analysis (BVA)
A refinement of EP that selects test cases at the extreme edges (boundaries) of equivalence classes (e.g., 0/1 and 10/11 for range 1..10).
Robustness Testing
Testing the outer bounds of equivalence classes with abnormal or invalid inputs (e.g., ESC key, invalid types) to ensure no catastrophic crashes occur.
Cause-Effect Graphing
A formal black-box technique representing specifications as a digital logic network (combinatorial circuit) to explore combinations of inputs and identify ambiguities.
Cause vs. Effect (in Graphing)
Cause = distinct input condition or equivalence class; Effect = output condition or system state transformation.
Cause-Effect Graphing Workflow
1) Identify causes & effects in spec, 2) Draw cause-effect graph, 3) Convert graph into a Decision Table, 4) Convert table columns into test cases.
Test Harness / Test Environment
Special supporting code (Drivers and Stubs) developed to execute and isolate a unit test.
Stub (Definition)
A dummy subprogram that replaces a module subordinate to (called by) the module under test, simulating its behavior or returning constant values.
Driver (Definition)
A 'main' calling procedure that accepts test inputs, calls the module under test, and receives/evaluates output results.
Structural Testing (White-Box)
Examining internal logic structures, control paths, conditions, loops, and data structures of a software unit.
Objectives of White-Box Testing
Guarantee all independent paths are exercised at least once, test true/false sides of all decisions, and execute loops within and at boundaries.
Flow Graph Components
Edges (arrows = flow of control), Nodes (circles = actions/statements), Regions (areas bounded by edges & nodes), Predicate Nodes (nodes with conditions/branching).
Predicate Node
A flow graph node containing a condition that has two or more outgoing edges.
Cyclomatic Complexity V(G) Formulas
1) V(G) = Edges - Nodes + 2, 2) V(G) = Predicate Nodes + 1, 3) V(G) = Regions + 1.
Meaning of Cyclomatic Number V(G)
Indicates the minimum number of independent execution paths that must be tested within a module.
Instruction Block (IB) Testing
A set of sequential instructions where running the first executes all; IB testing requires executing every instruction block at least once.
Decision-to-Decision Path (DDP) Testing
Begins at program start or a decision node and ends at program end or the next decision node; encompasses IB testing and requires executing all branches at least once.
Key Aspects of Integration Testing
1) Testing interfaces between software modules, 2) Testing the interface between the integrated assembly and its external environment.
Execution Mode of Integration Testing
Involves testing modules in executable combinations (e.g., compiled .exe assemblies) rather than isolated units.