Introduction to Software Testing

J.E.D.I 6 Software Testing Software is tested to detect defects or faults before they are given to the end-users. It is a known fact that it is very difficult to correct a fault once the software is in use. In this chapter, the methods and techniques to develop test cases will be discussed. Software testing strategies are also presented to help us understand the steps needed to plan a series of steps that will result in the successful construction of the software.

6.1 Introduction to Software Testing

Software is tested to demonstrate the existence of a fault or defect because the goal of software testing is to discover them. In a sense, a test is successful only when a fault is detected or is a result of the failure of the testing procedure. Fault Identification is the process of identifying the cause of failure; they may be several. Fault Correction and Removal is the process of making changes to the software and system to remove the fault. Software testing encompasses a set of activities with the primary goal of discovering faults and defects. Specifically, it has the following objectives: • To design a test case with high probability of finding as-yet undiscovered bugs • To execute the program with the intent of finding bugs Software Testing Principles 1. All tests should be traceable to the requirements. 2. Test should be planned long before testing begins. 3. The Pareto Principle applies to software testing. The Pareto Principle states that 80 of all errors uncovered during testing will likely be traceable to 20 of all program modules or classes. 4. Testing should begin “in small” and progress toward testing “in the large”. 5. Exhaustive testing is not possible but there are testing strategies that allow us to have good chance of constructing software that is less likely to fail. 6. To be most effective, an independent third party normally, a software testing group should conduct the test. Software Testing Strategies integrate software test case design methods into a well- planned series of steps that result in the successful implementation of the software. It is a road map that helps the end-users, software developers and quality assurance group conduct software testing. It has goals of ensuring that the software constructed implements a specific function verification, and that the software is constructed traceable to a customer requirements validation. Software testing is performed by a variety of people. Software developers are responsible for testing individual program units before they perform the integration of these program units. However, they may have vested interest of demonstrating that the code is error-free. The Quality Assurance group may be tasked to perform the test. Their main goal is to uncover as many errors as possible. They ask the software developers to correct any errors that they have discovered. Software testing begins from a single component using white-box and black-box Software Engineering 268 J.E.D.I techniques to derive test cases. For object-oriented software development, building block of software is the class. Once the class is tested, integration of the class through communication and collaboration with other tested classes is tested. There may be instances that a subset of a test will be performed again to ensure that corrects of the fault does not generate additional or new errors. Finally, the software is tested as a whole system. In order to have an organized way of testing the software, a test specification needs to be developed, normally, by the leader of the quality assurance group. If there is no quality assurance group, the project leader should formulate one. A Test Specification is an overall strategy that defines the specific tests that should be conducted. It also includes the procedures on how to conduct the test. It can be used to track the progress of the development team, and define a set of project milestones. 6.2 Software Engineering 269 J.E.D.I

6.3 Software Test Case Design Methods