Featured

Software Testing

Software testing is a simple way to avoid the significant expenses, customer inconvenience and potential lost business associated with repairing software after it has been released into production. In a software development project, errors can be introduced at any stage during development. Though errors are detected after each phase by techniques like inspections, some errors remain undetected.
Ultimately, these remaining errors are reflected in the code. Hence, the final code is likely to have some requirements errors and design errors, in addition to errors introduced during the coding activity. To ensure quality of the final delivered software, these defects will have to be removed. There are two types of approaches for identifying defects in the software : static and dynamic.
  1. In static analysis. The code is not executed but is evaluated through some process or some tools for locating defects. Code inspections, which we discussed in the previous chapter, is one static approach. Another is static analysis of code through the use of tools.
  2. In dynamic analysis. The code is executed, and the execution is used for determining defects. Testing is the most common dynamic technique that is employed. Indeed, testing is the most commonly used technique for detecting defects, and performs a very critical role for ensuring quality.
A strategy for software testing must accommodate low-level tests that are necessary to verify that a small source-code segment has been correctly implemented as well as high-level tests that validate major system functions against customer requirements. A strategy must provide guidance for the practitioner and a set of milestones for the manager. Because the steps of the test strategy occur at a time when deadline pressure begins to rise, progress must be measurable and problems must surface as early as possible. Software testing has been defined as:
  • The process of analyzing a software item to detect the differences between existing and required conditions (i.e., bugs) and to evaluate the features of the software items.
  • The process of analyzing a program with the intent of finding errors OR Testing is the process of executing a program with the intent of finding errors.
The basic goal of the software development process is to produce software that has no errors or very few errors. Testing is a quality control activity which focuses on identifying defects (which are then removed). We have seen that different levels of testing are needed to detect the defects injected during the various tasks in the project. Overall, testing in a project is a complex task which also consumes the maximum effort.

Levels of Testing

Testing is usually relied upon to detect the faults remaining from earlier stages, in addition to the faults introduced during coding itself. Due to this, different levels of testing are used in the testing process; each level of testing aims to test different aspects of the system.

Figure st.01 Levels of Testing


There are three levels of testing, i.e., three individual modules in the entire software system are unit testing, integration testing, and system testing. These different levels of testing attempt to detect different types of faults. The relation of the faults introduced in different phases, and the different levels of testing are shown in Figure st.01.

Unit Testing

Unit testing is essentially for verification of the code produced by individual programmers, and is typically done by the programmer of the module. Generally, a module is offered by a programmer for integration and use by others only after it has been unit tested satisfactorily. In unit testing individual components are tested to ensure that they operate correctly. It focuses on verification effort. On the smallest unit of software design, each component is tested independently without other system components. There are a number of reasons to do unit testing rather than testing the entire product:
  • The size of a single module is small enough that we can locate an error fairly easily.
  • The module is small enough that we can attempt to test it in some demonstrably exhaustive fashion.
  • Confusing interactions of multiple errors in widely different parts of the software are eliminated.
Unit testing is simplified when a component with high cohesion is designed. When only one function is addressed by a component, the number of test cases is reduced and errors can be more easily predicted and uncovered.

www.CodeNirvana.in

Copyright © Computer Science | Blogger Templates | Designed By Code Nirvana