SOFTWARE TESTING STRATEGIES A strategy for software testing integrates software test case design methods into a wellplanned

series of steps that result in the successful construction of software. Therefore any testing strategy must be incorporate test planning, test case design, test execution, and resultant data collection and evaluation. CHARACTERISTICS OF SOFTWARE TESTING STRATEGIES 1. It should be flexible enough to promote a customized testing approach. 2. At the same time, it should be rigid enough to promote reasonable planning and management tracking as the project progresses. STRATEGIC APPROACH TO SOFTWARE TESTING Testing is a set of activities that can be planned in advance and conducted systematically. For this reason a template for software testing-a set of steps into which we can place specific test case design techniques and testing methods-should be defined for the software process. A strategy must provide guidance for the practitioner and a set of milestones for the manager. Because the steps strategy occurs at the time when deadline pressure begins to rise, progress must be measurable and problems must surface as early as possible. STRATEGIC ISSUES The following issues must be addressed if a successful testing strategy is to be implemented. 1. Specific project requirement in a quantifiable manner long before testing commences: Although the overriding objective of testing is to find errors, a good testing strategy also assesses other quality characteristics such as portability, maintainability, and usability. These should be specified in a way that is measurable so that testing results are unambiguous. 2. State testing objectives explicitly: The specific objectives of testing should be stated in measurable terms, such as mean time to failure, the cost to find and fix defects, test effectiveness, test coverage, etc. 3. Understand the users of the software and develop a profile for each user category: Use-case that describes the interaction scenario for each class of user can reduce overall testing effort by focusing testing on actual use of the product. 4. Develop a testing plan that emphasizes “rapid cycle testing:

• The local data structure is examined to ensure that data stored temporarily maintains its integrity during all steps in an algorithm’s execution. the design should accommodate automated testing and regression testing. Build “robust” software that is designed to test itself: The software should be capable of diagnosing certain classes of errors. Conduct formal technical reviews to assess the test strategy and test cases themselves: Formal technical reviews can uncover inconsistencies. 6. • Finally. and the step can be conducted in parallel for multiple components. all error handling paths are tested. • Boundary conditions are tested to ensure that the module operates properly at boundaries established to limit or restrict processing. omission. 8. In addition. Use effective formal technical reviews as a filter prior to testing: Formal technical reviews can be effective in uncovering errors. This saves time and also improves product quality. The unit test is white-box oriented. • All independent paths through the control structure are exercised to ensure that all statements in a module have been executed at least once. Develop a continuous improvement approach for the testing process: The test strategy should be measured. For this reason. The metrics collected during testing should be used as part of a statistical process control approach for software testing. reviews can reduce the amount of testing effort required to produce high-quality software. and outright errors in the testing approach. 7. UNIT TEST CONSIDERATIONS The tests that occur as part of unit tests are as under: • The module interface is tested to ensure that information properly flows into and out of the program unit under test. .5. UNIT TESTING Unit testing focuses verification effort on the smallest unit of software design-the software component or module.

Since a set of errors are encountered which are difficult to locate and modify. INTEGRATION TESTING In Unit Testing the modules are tested individually and there is always a doubt that they may not work properly when put together. Interfaces are more likely to be tested completely and a systematic test approach may be applied.e. . Error noted does not correspond to error encountered. interfacing. 5. Integration Testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing.Module ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~~~~~~~ ~ Interface Local data structure Boundary conditions Independent paths Error handling paths Test Cases Among the potential errors that should be tested when error handling is evaluated are: 1. to construct the entire program at a time. Error description does not provide enough information to assist in the location of the cause of the error. Error description is unintelligible. Error condition causes system intervention prior to error handling. There is often a tendency to attempt non-incremental integration that is. In incremental integration the program is constructed and tested in small increments. This is because of the basic problem of putting them together in apt manner i. where errors are easy to isolate and correct. All components are combined in advance and the entire program is tested as a whole which results in a chaos. Exception-condition processing is incorrect. 2. 3. The objective is to take unit tested components and build a program structure that has been dictated by design. 4.

another stub is replaced with the real component. Top-down Integration 2. Regression Testing. Tests are conducted as each component is integrated. Depending on the integration approach selected.VARIOUS INCREMENTAL INTEGRATION STRATEGIES The various incremental integration strategies are: 1. 3. Bottom-up Integration 3. 2. subordinate stubs are replaced one at a time with actual components. On completion of each set of tests. 4. beginning with the main control module (main program). Modules subordinate to the main module are incorporated into the structure in either a depth-first or breadth-first manner. M1 M2 M3 M4 M5 M6 M7 M8 The integration process is performed in a series of five steps which are as follows: 1. . They could be explained as under: • Top-down Integration: Top-down integration testing is an incremental approach to construction program structure. Modules are integrated by moving downward through the control hierarchy. The main control module is used as a test driver and stubs are substituted for all components directly subordinate to the main control module.

that is. • Regression Testing: Each time a new module is added as part of integration testing. New data flow paths are established. . the software changes. In simple words validation succeeds when software functions in a manner that can be reasonably expected by a customer. Drivers are removed and clusters are combined moving upward in the program structure. and new control logic is invoked. the number of drivers can be reduced substantially and integration of clusters is greatly simplified. Regression testing may be conducted to ensure that new errors have not been introduced. • Bottom-up Integration: Bottom-up integration testing begins construction and testing with atomic modules. The cluster is tested. new I/O may occur. interfacing errors have been uncovered and corrected. regression testing is the re-execution of some subset of tests that have already been conducted to ensure that changes have not propagated unintended side effects. 4. In fact. and a final series of software testing is to be done. In the context of an integration test strategy. components at the lowest levels in the program structure. Reasonable expectations of the customer are defined in the System Requirements Specification (SRS)-a document that describes all user visible attributes of the software. 3. A control program for testing (drivers) is written to co-ordinate test case input and output. the need for separate test drivers lessens.5. Information contained in that section forms the basis for a validation testing approach. As integration moves upward. These changes may cause problems with functions that previously worked flawlessly. The specification contains a section called Validation Criteria. Low-level components are combined into clusters that perform a specific software sub-function. 2. A bottom-up integration strategy may be implemented with the following steps: 1. Regression test is the activity that helps to ensure that changes do not introduce unintended behavior or additional errors. VALIDATION TESTING Validation testing begins when the software is completely assembled as a package. The process continues from step 2 until the entire program structure is built. if the top two levels of program structure are integrated top down.

ALPHA AND BETA TESTING It is virtually impossible for a software developer to foresee how the customer will really use a program. System testing is actually a series of different tests whose primary purpose is to fully exercise the computer-based system. Although each test has a different purpose. Thus the process called “alpha and beta” testing is used to uncover errors that only the end user seems able to find. The software is used in a natural setting with the developer by user and recording errors and usage problems. • Conduct a series of tests that simulate bad data or other potential errors at the software interface. On discovering an error the developers should do the following: • Design error-handling paths that test all information coming from the other parts of the system. all work to verify that system elements have been properly integrated and perform allocated functions. Acceptance tests are conducted by the end user and can be either an informal “test drive” or a planned and systematically executed series of tests. Stress tests are designed to confront programs with abnormal . • Participate in design and planning of the system tests to ensure that the software is adequately tested. Alpha tests are conducted in a controlled environment. STRESS TESTING The earlier testing techniques resulted in thorough evaluation of normal program functions and performance. While conducting this test the developer is not present and therefore it is a live application of the software in an environment that cannot be controlled by the developer. The beta test is conducted at one or more customer sites by the end user of the software. • Record the results of tests. SYSTEM TESTING Software is incorporated with system elements and a series of system integration and validation tests are conducted. Therefore acceptance testing is conducted to uncover cumulative errors that might degrade the system over time. The alpha test is conducted at the developer’s site by a customer. Thus when custom software is built for a customer. If the software is developed as a product to be used by many customers it is impractical to perform formal acceptance tests with each one. a series of acceptance tests are conducted to enable the customer to validate all requirements. These tests fall outside the scope of the software process and are not conducted by the software engineers. As a result of problems reported during beta tests software engineers make modifications and then prepare for the release of the software product to the entire customer base. The customer records all the problems that are encountered and reports these to the developer at regular intervals.

when a test case uncovers an error. PERFORMANCE TESTING Performance testing is designed to test the run-time performance of software within the context of an integrated system. and luck. Backtracking 3. Brute Force 2. In essence. The objective is realized by a combination of systematic evaluation. DEBUGGING APPROACHES Regardless of the approach that is taken. In it the sub parts of the system are randomly operated in order to locate the error. three categories for debugging approaches may be proposed: 1. Data related to the error occurrence are organized to . debugging has one overriding objective: to find and correct the cause of a software error. it is not until all system elements are fully integrated that the true performance of a system can be ascertained. Cause Elimination. Performance tests are often coupled with stress testing and usually require both hardware and software instrumentation. the tester attempts to break the program. Backtracking is a fairly common debugging approach that can be used successfully in small programs. The brute force category of debugging is the most common and least efficient method for isolating the cause of a software error. or volume. intuition. I n other words. frequency. the tester who performs stress testing asks “how high can we crank this up before it fails?” Stress testing executes a system in a manner that demands resources in abnormal quantity.situations. The cause elimination approach is manifested by induction or deduction and introduces the concept of binary partitioning. it is often necessary to measure resource utilization in an exacting fashion. debugging is the process that results in the removal of the error. Performance testing occurs throughout all steps in the testing process. However. the source code is traced backward until the site of the cause is found. That is. That is. In general. Beginning at the site where a symptom has been uncovered. THE ART OF DEBUGGING Debugging occurs as a consequence of successful testing.

The objective of software testing is to uncover errors. Beginning with a symptomatic indication of a problem. Each test step is accomplished through a series of systematic test techniques that assist in the design of the test cases. a series of test steps are planned and executed which consist of unit. the debugging activity must track down the cause of an error. The requirement for higher quality software demands a more systematic approach to testing. integration and system tests. the most valuable is the counsel of other members of the software engineering staff. Of the many resources available during debugging. Debugging is viewed as an art. A “cause hypothesis” is devised and the aforementioned data are used to prove or disprove the hypothesis. To fulfill this objective. the level of abstraction with which software is considered is broadened. With each testing step. SUMMARY • • • • Software testing accounts for the largest percentage of technical effort in the software process.isolate potential causes. • .