Comprehensive Study Guide on Software Testing Strategies and Tactics

Strategic Approach to Software Testing

Software testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user. Software is systematically tested to uncover errors that were made inadvertently during its design and construction phases. When testing is conducted carelessly, substantial development time is wasted, unnecessary engineering effort is expended, and undetected errors sneak through to production environments. To prevent these failures, a systematic testing strategy must be established through the combined efforts of project managers, software engineers, and testing specialists. The fundamental motivation behind program testing is to affirm software quality through methods that can be economically and effectively applied across both large-scale and small-scale software systems.

The primary deliverable produced during the strategic planning phase is the Test Specification. This work product describes an overall testing strategy and establishes a concrete procedure that defines specific testing steps and outlines the precise types of tests to be conducted throughout the project lifecycle. A comprehensive testing strategy provides a road map detailing what steps are to be undertaken, when they must be planned and executed, and the exact quantum of effort, time, and computational resources required. A robust testing strategy must encompass test planning, test-case design, test execution, and resultant data collection and evaluation.

An effective testing strategy must remain sufficiently flexible to promote a customized approach tailored to unique project characteristics, while simultaneously maintaining enough rigidity to facilitate reasonable planning and disciplined managerial tracking as development progresses. The testing continuum must accommodate low-level tests necessary to verify that small source code segments have been correctly implemented, as well as high-level tests that validate major system functions against customer requirements. It provides operational guidance for the technical practitioner and establishes measurable milestones for the project manager. This dual structure is critical because testing frequently occurs under mounting deadline pressures, where progress must be quantifiably demonstrable and problems must surface as early as possible.

Spiral model of software testing

The software testing process can be conceptualized as a spiral or pyramid that mirrors the software engineering workflow in reverse. The process begins at the vortex of the spiral with unit testing, which focuses directly on the source code. As testing moves outward, it progresses through integration testing, which evaluates software design and architectural interfaces. Continuing outward, validation testing assesses the software against formal customer requirements. Finally, testing culminates in system testing, which exercises the entire software package in conjunction with system engineering principles and broader computer-based system components.

Software testing direction pyramid

Verification and Validation

Software testing forms part of a broader engineering discipline known as verification and validation (V&V). Verification addresses the foundational question: "Are we building the product right?" Validation addresses the complementary question: "Are we building the right product?" Specifically, verification refers to the comprehensive set of tasks that ensure software correctly implements a specific technical function. Validation refers to a distinct set of tasks that ensure the software that has been constructed is directly traceable to customer requirements and expectations.

Verification and validation encompass a comprehensive array of Software Quality Assurance (SQA) activities that extend far beyond test execution alone. These activities include formal technical reviews, quality and configuration audits, performance monitoring, simulation studies, feasibility studies, documentation reviews, database schema reviews, algorithm analyses, development testing, usability testing, qualification testing, formal acceptance testing, and post-deployment installation testing.

Within the organizational hierarchy of testing responsibilities, the software developer is always directly responsible for testing individual program units or components. The developer ensures that each module performs the dedicated function or exhibits the exact operational behavior for which it was originally designed. An independent test group (ITG) becomes involved in the verification and validation process only after the software architecture is fully complete and component integration is underway.

Unit Testing Strategy and Test Harness Design

Unit testing focuses verification effort directly on the smallest unit of software design: the software component or module. The unit test specifically targets the internal processing logic and local data structures contained entirely within the structural boundaries of a component. Multiple software components can be tested simultaneously in parallel. The relative complexity of the tests and the scope of errors uncovered are naturally constrained by the bounded scope established for unit testing.

Unit test focus areas

Unit test cases are systematically designed to target five critical structural areas within a component. First, the module interface is tested to ensure that information properly flows into and out of the program unit under test. Second, local data structures are examined to ensure that data stored temporarily maintains its integrity throughout all steps of algorithmic execution. Third, all independent paths through the control structure are exercised to guarantee that every executable statement in the module is traversed at least once. Fourth, boundary conditions are tested to guarantee that the module operates properly at the extreme limits established to restrict or constrain processing. Fifth, all error-handling paths are systematically evaluated.

When evaluating error-handling paths during unit testing, test cases are designed to uncover five specific failure modes: (1) error descriptions that are unintelligible to the user; (2) reported errors that fail to correspond to the actual error encountered; (3) error conditions that trigger operating system intervention before application error handling can intercept them; (4) exception-condition processing that is functionally incorrect; and (5) error descriptions that fail to provide sufficient diagnostic information to assist in pinpointing the root cause of the error.

The design of unit tests can occur either before source coding begins or after the source code has been generated. Reviewing design documentation provides essential guidance for creating test cases that have a high probability of uncovering errors, with each test case strictly paired with a predetermined set of expected results. Because an isolated software component is not a stand-alone executable program, specialized harness software comprising drivers and stubs must be constructed.

Unit test environment with driver and stubs

A driver is a control program that functions as a main program, accepting test case input data, passing that data directly to the component undergoing testing, and printing or logging the resultant output. Conversely, a stub, or dummy subprogram, serves as a surrogate for modules that are subordinate to (invoked by) the component being tested. A stub utilizes the subordinate module's interface, performs minimal data manipulation, prints verification confirming its invocation, and immediately returns control to the module under test. Both drivers and stubs represent testing software that must be written by developers but is never delivered with the final software product. If drivers and stubs are kept structurally simple, development overhead remains low. Furthermore, unit testing is greatly simplified when software components are designed with high functional cohesion.

Integration Testing Strategies for Conventional Software

Integration testing addresses the challenges of assembling individual software components into a unified architecture. When individual components are connected, several interfacing problems can emerge: data may be lost across an interface; one module may inadvertently produce adverse side effects in another; subfunctions, when combined, may fail to produce the intended macro-level functionality; individually acceptable computational imprecisions may compound into unacceptable errors; and global data structures can introduce unanticipated corruption. Integration testing is a systematic technique for constructing the software architecture while concurrently conducting tests to uncover errors associated with interfacing.

Software teams navigate between two extremes of integration. One extreme involves waiting until the entire system is constructed and running tests on the monolithic whole. While superficially appealing, this big-bang approach invariably produces buggy software that disappoints stakeholders because error isolation is exceptionally difficult. The opposite extreme involves conducting daily integration tests whenever any new code segment is built. Most engineering teams adopt an incremental integration approach, beginning with individual program units, transitioning to structured integration tests, and culminating in full-system testing.

Top-down integration testing constructs the program hierarchy by moving downward through the control structure, beginning with the main control module. Directly and indirectly subordinate modules are incorporated into the structure using either a depth-first or breadth-first strategy. Depth-first integration incorporates all components on a major control path first, which allows major control or decision points to be verified early in the testing lifecycle and enables early functional demonstration of core capabilities. Breadth-first integration incorporates all components directly subordinate at each horizontal level before descending to lower structural tiers.

Top-down integration hierarchy

Top-down integration is executed via a rigorous five-step procedure: (1) The main control module serves as a test driver, and stubs are substituted for all components directly subordinate to it; (2) Subordinate stubs are replaced one at a time with actual components according to the selected depth-first or breadth-first plan; (3) Tests are conducted as each individual component is integrated; (4) Upon completing each test sequence, another stub is replaced with its corresponding real component; (5) Regression testing is performed to ensure that no new interface errors or unintended side effects have been introduced. This cycle repeats until the complete structural hierarchy is assembled.

Although logically straightforward, top-down integration encounters logistical problems when testing upper-level modules that require complex data processing from lower-level modules. Because low-level modules are initially represented by simple stubs, meaningful data cannot flow upward. Testers are left with three choices: delay high-level tests until stubs are replaced with actual components, develop elaborate stubs that simulate real lower-level behavior, or integrate from the bottom up. Delaying tests undermines the clean correspondence between specific tests and modules, while building complex stubs incurs prohibitive engineering overhead.

Bottom-up integration hierarchy with clusters and drivers

Bottom-up integration testing resolves this dilemma by initiating construction and testing with atomic modules at the lowest architectural levels. Because modules are integrated from the bottom upward, the operational processing of subordinate components is always available, completely eliminating the need for stubs. Bottom-up integration follows four procedural steps: (1) Low-level components are combined into clusters, often termed builds, that perform a specific software subfunction; (2) A driver is written to coordinate test case inputs and outputs for the cluster; (3) The cluster is thoroughly tested; (4) Drivers are removed, and clusters are combined moving upward through the program hierarchy.

While bottom-up integration simplifies test case design and avoids stub overhead, it carries the distinct disadvantage that the program as an integrated entity does not exist until the very last module is added. To balance trade-offs, engineering teams frequently employ sandwich testing, a hybrid approach that utilizes top-down testing for upper architectural levels alongside bottom-up testing for subordinate processing levels.

Regression Testing and Smoke Testing

Each time a new module is incorporated during integration testing, the software changes: new data flow paths are opened, new input and output interactions occur, and new control logic is invoked. Furthermore, whenever software defects are corrected, modifications are made to the software configuration, including source code, system documentation, and supporting data structures. These changes can introduce unexpected side effects that compromise functionality that previously operated flawlessly. Regression testing is the re-execution of a specific subset of previously conducted tests to guarantee that code modifications have not propagated unintended defects.

Regression testing can be conducted manually by executing a designated subset of test cases, or through automated capture and playback tools that record test cases and baseline results for continuous playback and programmatic comparison. A regression test suite comprises three distinct classes of test cases: (1) a representative sample of tests that exercise all major software functions; (2) additional focused tests that target software functions likely to be impacted by the specific changes made; and (3) specialized tests that concentrate directly on the software components that were altered. A regression test suite is designed to sample classes of errors across major functions rather than redundantly executing every historical test case, which is economically impractical.

Smoke testing is an integration testing approach frequently utilized in rapid, time-critical product development cycles. Smoke testing serves as an operational pacing mechanism that enables software teams to assess project health on a daily basis. The smoke testing process comprises three core steps: (1) Software components that have been translated into code are integrated into a daily build containing all data files, shared libraries, reusable modules, and engineered components necessary to implement target product functions; (2) A battery of tests is designed to expose severe showstopper errors that could halt system execution or throw project schedules off track; (3) The build is merged with existing builds, and the entire product is smoke tested daily using either top-down or bottom-up integration techniques.

A smoke test exercises the entire system end-to-end. While it is not designed to be exhaustive, it must be rigorous enough that passing the test confirms the build is sufficiently stable to undergo deeper, more specialized testing. Smoke testing provides four primary engineering benefits: (1) Integration risk is minimized because daily testing exposes incompatibilities and fatal showstoppers early; (2) End-product quality is enhanced through early detection of architectural, functional, and component-level design defects; (3) Error diagnosis and correction are simplified because newly identified bugs are almost always tied directly to the new software increment added to that specific build; and (4) Project progress is easily tracked, which boosts team morale and provides management with clear, empirical evidence of progress.

Validation Testing and User Acceptance

Validation testing commences immediately following the conclusion of integration testing, at which point individual modules have been exercised, the software is fully assembled into an operational package, and interface errors have been resolved. Validation testing focuses on user-visible actions and user-recognizable system outputs. Validation succeeds when the software functions in a manner that can be reasonably expected by the customer, establishing the formal validation test criteria.

Software validation is conducted through a structured testing regime demonstrating full compliance with documented requirements. A formal test plan establishes the broad classes of tests to be executed, while a test procedure details the specific test cases designed to confirm that all functional requirements are satisfied, behavioral characteristics are achieved, content is accurate and properly formatted, performance thresholds are attained, documentation is complete and correct, and usability, portability, compatibility, error recovery, and maintainability requirements are fulfilled.

Every validation test case yields one of two possible outcomes: either the function or performance characteristic conforms strictly to specification and is accepted, or a deviation from specification is uncovered, resulting in the creation of a deficiency list. Because defects uncovered at this advanced stage can rarely be corrected prior to scheduled delivery dates without disrupting commitments, engineering teams negotiate with the customer to establish an agreed-upon method and timeline for resolving deficiencies. Concurrent with validation testing, a configuration review must be conducted to verify that all elements of the software configuration—including executable code, support tools, and documentation—are cataloged and contain the operational detail necessary to support ongoing software maintenance.

Acceptance testing enables end users to validate system requirements directly, addressing the reality that software developers cannot fully anticipate how customers will operate a system in real-world environments. In field conditions, written instructions may be misinterpreted, unusual combinations of data may be entered, and outputs that seemed self-evident to developers may prove unintelligible to actual users. Acceptance testing ranges from informal test drives to structured, multi-week evaluations that uncover cumulative errors that degrade system performance over time.

Acceptance testing is primarily conducted via alpha and beta testing. Alpha testing is performed at the developer's site by a representative sample of end users in a controlled environment. The software is utilized in a natural setting while developers observe over the user's shoulder, recording runtime errors and usability friction points. Alpha tests occur as the product approaches the end of formal verification testing. Beta testing is conducted at one or more end-user sites without developers being physically present. The customer operates the software in a live operational environment and periodically reports all encountered problems—both real and perceived—back to the development team. Developers implement corrections based on beta feedback before authorizing release to the broader market. When custom software is developed under a commercial contract, customer acceptance testing is performed at a single customer installation where formal contractual test cases are executed before final acceptance is granted.

System Testing: Recovery, Security, Stress, and Performance

Software represents only one component of a broader computer-based system that integrates hardware, human operators, and shared databases. System testing exercises the complete, integrated system to ensure all elements collaborate correctly. System testing often exposes organizational friction, as failures can trigger finger-pointing between software developers, hardware engineers, and systems specialists. Such disputes are minimized by establishing defensive error-handling paths that rigorously validate all data arriving across system interfaces.

Recovery testing verifies that computer-based systems can recover from hardware or software failures and resume normal operation with minimal downtime. Certain systems are engineered to be fault-tolerant, meaning internal operational faults must never cause overall system functionality to cease. In other systems, processing failures must be resolved within a specified time limit to avoid severe economic damage. Recovery testing forces software to fail under diverse conditions to confirm that recovery routines operate correctly. Common simulated failures include network interruptions, power outages, unreachable external servers, unresponsive servers, missing dynamic link library (.dll) files, database overload, abruptly halted operating system services, environmental hardware faults, unresponsive peripheral devices, and wireless signal loss. If automated recovery is implemented, reinitialization routines, checkpointing mechanisms, data restoration routines, and system restarts are evaluated for correctness. When online backup mechanisms are utilized, tests verify that data can be retrieved rapidly without introducing security vulnerabilities.

Security testing confirms that protective mechanisms built into a system safeguard it against improper or illegal penetration. Systems that store sensitive data or control critical assets are prime targets for unauthorized penetration by recreational hackers, disgruntled employees seeking revenge, or criminal actors pursuing illicit financial gain. During security testing, the tester adopts the mindset of an attacker, attempting to acquire access credentials through clerical subterfuge, utilizing custom exploits to bypass firewalls and authentication defenses, overwhelming the system to induce denial of service, forcing abnormal operational crashes to breach security barriers during recovery, or browsing unencrypted storage to locate access keys. The primary design objective in software security is to ensure that the cost of penetration exceeds the ultimate value of the information an intruder could obtain.

Stress testing confronts software with abnormal resource demands, addressing the operational question: "How high can we crank this system up before it fails?" Stress testing executes software under abnormal quantities, frequencies, and volumes of data. Representative stress test cases include generating 1010 interrupts per second when normal operations average only 11 or 22; increasing input data arrival rates by an order of magnitude; allocating maximum physical memory and peripheral resources; crafting test cases that provoke thrashing in virtual operating systems; and generating queries that trigger excessive disk seeking for resident data. A specialized variation is sensitivity testing, which examines mathematical algorithms using data combinations within valid input boundaries that nonetheless provoke computational instability or profound performance degradation.

Performance testing evaluates the real-time operational performance of software within an integrated system under specified workloads. It assesses runtime stability, operational speed, scalability, and responsiveness. Key performance indicators measured during testing include output processing speed, data transfer velocity, network bandwidth consumption, maximum concurrent user load, memory utilization efficiency, workload throughput, and command response latency. Performance testing is frequently paired with stress testing and requires extensive hardware and software instrumentation to log execution intervals, monitor system interrupts, and sample internal machine states continuously.

Software Testing Tactics: Black-Box and White-Box Foundations

Software testing tactics provide formal techniques for designing test cases that maximize the likelihood of uncovering defects. Engineered software products can be examined through two fundamental paradigms: black-box testing and white-box testing.

Black-box testing, also referred to as behavioral or functional testing, takes an external view of the software. It examines fundamental functionality with little regard for internal procedural logic or control structures. Black-box testing derives input conditions that fully exercise the functional requirements of the program. It is typically applied during later testing phases and targets five categories of defects: (1) incorrect or missing functions; (2) interface errors; (3) errors in data structures or external database access; (4) behavioral or performance defects; and (5) initialization and termination errors. Black-box testing tactics address core operational questions: How is functional validity confirmed? How are system behavior and performance evaluated? What classes of input yield optimal test cases? Is the system sensitive to specific input values? How are the boundaries of data classes isolated? What data volumes can the system sustain? What effect do specific combinations of data have on operations?

White-box testing, also called glass-box or structural testing, takes an internal view of the system. It uses component-level design to examine procedural details, execution paths, and module collaborations. White-box testing enables the engineer to design test cases that: (1) guarantee that all independent paths within a module are executed at least once; (2) exercise all logical decisions on both their true and false branches; (3) execute all loops at their boundaries and within their operational bounds; and (4) exercise internal data structures to ensure validity. White-box testing comprises basis path testing and control structure testing, the latter evaluating relational and arithmetic expressions across conditional statements to confirm execution order.

Equivalence Partitioning

Equivalence partitioning is a black-box testing method that divides the input domain of a program into discrete equivalence classes of data from which test cases are derived. An equivalence class represents a set of valid or invalid operational states for an input condition. By evaluating symmetric, transitive, and reflexive relationships among input parameters, testers can partition a large input range into representative subsets, reducing the total number of test cases required while maintaining comprehensive coverage.

Equivalence classes are defined according to four structural input rules:

If an input condition specifies a range of values, one valid equivalence class and two invalid equivalence classes are defined (one below the minimum threshold and one above the maximum threshold).

If an input condition requires a specific numeric value, one valid equivalence class and two invalid equivalence classes are defined (one value below and one value above).

If an input condition specifies a member of a discrete set, one valid equivalence class (representing set members) and one invalid equivalence class (representing non-members) are defined.

If an input condition is a Boolean value, one valid equivalence class and one invalid equivalence class are defined.

Once equivalence classes are established, test cases are developed to exercise the maximum number of attributes across each class concurrently.

Consider a login form containing a username field. Applying equivalence partitioning yields the following classes based on expected system behavior: a valid username class consisting of alphanumeric strings between 55 and 1515 characters in length; an invalid username class consisting of strings containing special characters or exceeding 1515 characters; and an empty username class where the input field is left blank. The five-step implementation process involves: (1) identifying the target input field; (2) categorizing input values into distinct equivalence classes representing common operational behaviors; (3) determining representative values from each class, ensuring boundary values and critical scenarios are included; (4) creating formal test cases for each equivalence class; and (5) executing the test cases, observing system responses, and documenting discrepancies.

Basis Path Testing and Flow Graph Notation

Basis path testing is a white-box testing technique that enables a test designer to measure the logical complexity of a procedural design and utilize that metric to define a basis set of execution paths. Test cases designed to exercise this basis set guarantee that every operational statement within the program is executed at least once during testing.

Control flow is represented using flow graph notation. In a flow graph, a node (represented as a circle) corresponds to one or more nonbranching procedural code statements. A single node can represent a sequence of process boxes or an individual decision condition. Directed lines connecting nodes are called edges or links; they represent the flow of control and correspond directly to flowchart arrows. Every edge must terminate at a node, even if that node represents no procedural action. Areas bounded by edges and nodes are designated as regions, with the external unbounded space surrounding the graph counted as an additional region.

Structured programming constructs in flow graph form

Standard structured programming constructs translate into predictable flow graph structures. A sequence translates into a linear chain of nodes connected by edges. An IF-THEN-ELSE construct translates into a decision node splitting into two distinct paths that converge at a common exit node. A WHILE loop features a condition node with an edge leading through the loop body that cycles back to the condition node, along with an exit edge bypassing the loop. An UNTIL loop flows through the process body to a decision node that either cycles back or exits. A CASE construct branches from a central selection node into multiple distinct paths that eventually merge.

Mapping flowchart to flow graph with nodes edges and regions

A node that contains a conditional statement is designated as a predicate node and is characterized by having two or more edges emanating from it. When compound conditions containing Boolean operators such as AND, OR, NAND, or NOR appear in procedural logic, each condition must be decomposed into a separate predicate node.

Predicate node representation for compound conditions

In a compound conditional statement such as IF a OR b THEN procedure x ELSE procedure y ENDIF, distinct predicate nodes are generated for condition aa and condition bb. If condition aa evaluates to true, control branches directly to procedure xx; if condition aa is false, condition bb is evaluated. If condition bb evaluates to true, control branches to procedure xx; otherwise, it branches to procedure yy. Both execution paths subsequently converge at a common terminal node.

Cyclomatic Complexity and Deriving Basis Path Test Cases

Cyclomatic complexity is a software metric that provides a quantitative measurement of the logical complexity of a program. The value computed for cyclomatic complexity defines the exact number of linearly independent paths comprising the basis set of a program. This value establishes an upper bound on the number of test cases that must be designed and executed to guarantee that every source statement is executed at least once.

Cyclomatic complexity, denoted as V(G)V(G) for a flow graph GG, can be calculated using three mathematically equivalent methods:

Method 1: V(G)V(G) equals the total number of enclosed and open regions within the flow graph:

V(G)=Number of regionsV(G) = \text{Number of regions}

Method 2: For a flow graph with EE edges and NN nodes, V(G)V(G) is computed as:

V(G)=E−N+2V(G) = E - N + 2

Method 3: For a flow graph containing PP predicate nodes, V(G)V(G) is computed as:

V(G)=P+1V(G) = P + 1

Deriving basis path test cases follows a structured four-step procedure: (1) construct a flow graph using design models or source code statements, numbering nonbranching statement blocks to establish nodes; (2) compute the cyclomatic complexity V(G)V(G) of the flow graph; (3) identify a basis set of linearly independent paths through the control structure; and (4) generate test case data designed to force execution along each identified path, comparing runtime results against expected values.

Procedure average PDL code with mapped flow graph nodes

This methodology is demonstrated on PROCEDURE average, an algorithm that computes the average of 100100 or fewer numbers lying between specified minimum and maximum bounds, while tracking the total number of inputs and valid values. The procedural statements map to flow graph nodes as follows: Node 1 represents initialization (i = 1; total.input = total.valid = 0; sum = 0;). Node 2 evaluates the first loop condition (DO WHILE value[i] <> -999). Node 3 evaluates the second loop condition (AND total.input < 100). Node 4 increments the input counter (increment total.input by 1;). Node 5 evaluates the lower bound condition (IF value[i] >= minimum). Node 6 evaluates the upper bound condition (AND value[i] <= maximum). Node 7 executes the valid tally branch (increment total.valid by 1; sum = sum + value[i];). Node 8 represents the ELSE skip and ENDIF boundary along with pointer advancement (increment i by 1;). Node 9 represents ENDDO, directing control back to Node 2. Node 10 evaluates post-loop validity (IF total.valid > 0). Node 11 computes the average (average = sum / total.valid;). Node 12 handles the error branch (average = -999;). Node 13 represents the terminal ENDIF and procedure termination.

Flow graph of PROCEDURE average

Applying the three cyclomatic complexity formulas to the flow graph for PROCEDURE average confirms the number of independent execution paths:

Evaluating by regions, the graph contains 55 bounded internal regions and 11 unbounded external region, yielding:

V(G)=6V(G) = 6

Evaluating by edges and nodes, the graph contains E=17E = 17 edges and N=13N = 13 nodes:

V(G)=17−13+2=6V(G) = 17 - 13 + 2 = 6

Evaluating by predicate nodes, nodes 2, 3, 5, 6, and 10 each have two emanating edges, giving P=5P = 5 predicate nodes:

V(G)=5+1=6V(G) = 5 + 1 = 6

The computed cyclomatic complexity of 66 establishes that the basis set consists of six linearly independent paths:

Path 1: 1→2→10→11→131 \rightarrow 2 \rightarrow 10 \rightarrow 11 \rightarrow 13

Path 2: 1→2→10→12→131 \rightarrow 2 \rightarrow 10 \rightarrow 12 \rightarrow 13

Path 3: 1→2→3→10→11→131 \rightarrow 2 \rightarrow 3 \rightarrow 10 \rightarrow 11 \rightarrow 13

Path 4: 1→2→3→4→5→8→9→2…1 \rightarrow 2 \rightarrow 3 \rightarrow 4 \rightarrow 5 \rightarrow 8 \rightarrow 9 \rightarrow 2 \dots

Path 5: 1→2→3→4→5→6→8→9→2…1 \rightarrow 2 \rightarrow 3 \rightarrow 4 \rightarrow 5 \rightarrow 6 \rightarrow 8 \rightarrow 9 \rightarrow 2 \dots

Path 6: 1→2→3→4→5→6→7→8→9→2…1 \rightarrow 2 \rightarrow 3 \rightarrow 4 \rightarrow 5 \rightarrow 6 \rightarrow 7 \rightarrow 8 \rightarrow 9 \rightarrow 2 \dots

Test cases must be constructed with input values that set the exact logical conditions at predicate nodes required to traverse each path. While executing all six paths ensures every statement in the module is executed at least once, certain independent paths cannot be executed in isolation. For example, Path 1 represents immediate termination of the DO WHILE loop where total.valid > 0 remains true, a condition that cannot be achieved during standard initialization without prior loop execution. In such situations, dependent paths are validated as integral components of broader composite path tests.