Software development is not a precise science, and humans being as error prone as they are, software development must be accompanied by quality assurance activities. It is typical for developers to spend around 40% of the total project time on testing. For life critical software (e.g. flight control, reactor monitoring), testing can cost 3 to 5 times as much as all other activities combined.
The destructive nature of testing requires that the developer discard preconceived notions of the correctness of his/her developed software. This means that testing must be done from an entirely different perspective that of a developer.
In software development project, errors can be come in at any stage during development. The main causes of errors are:
1. not obtaining the right requirements,
2. not getting the requirements right
3. not translating the requirements in a clear and understandable manner so that programmers implement them properly.
Table of Contents
There are techniques available for detecting and eliminating errors that originate in various stages. However, no technique is perfect.
1. Fundamentals of Software Testing
Testing is basically a process to detect errors in the software product. Before going into the details of testing techniques one should know what errors are. In day-to-day life we say whenever something goes wrong there is an error. This definition is quite vast. When we apply this concept to software products then we say whenever there is difference between what is expected out of software and what is being achieved, there is an error.
For the output of the system, if it differs from what was required, it is due to an error. This output can be some numeric or alphabetic value, some formatted report, or some specific behavior from the system. In case of an error there may be change in the format of out, some unexpected behavior from system, or some value different from the expected is obtained. These errors can due to wrong analysis, wrong design, or some fault on developer’s part.
All these errors need to be discovered before the system is implemented at the customer’s site. Because having a system that does not perform as desired be of no use. All the effort put in to build it goes waste. So testing is done. And it is equally important and crucial as any other stage of system development. For different types of errors there are different types of testing techniques. In the section that follows we’ll try to understand those techniques.
2. Objectives of Testing:
First of all the objective of the testing should be clear. We can define testing as a process of executing a program with the aim of finding errors. To perform testing, test cases are designed. A test case is a particular made up artificial situation upon which a program is exposed so as to find errors. So a good test case is one that finds undiscovered errors. If testing is done properly, it uncovers errors and after fixing those errors we have software that is being developed according to specifications.
3. Test Information Flow
Testing is a complete process. For testing we need two types of inputs. First is software configuration. It includes software requirement specification, design specifications and source code of program. Second is test configuration. It is basically test plan and procedure.
Software configuration is required so that the testers know what is to be expected and tested whereas test configuration is testing plan that is, the way how the testing will be conducted on the system. It specifies the test cases and their expected value. It also specifies if any tools for testing are to be used.
Test cases are required to know what specific situations need to be tested. When tests are evaluated, test results are compared with actual results and if there is some error, then debugging is done to correct the error. Testing is a way to know about quality and reliability. Error rate that is the occurrence of errors is evaluated. This data can be used to predict the occurrence of errors in future.
4. Test Case Design
We now know, test cases are an integral part of testing. So we need to know more about test cases and how these test cases are designed. The most desired or obvious expectation from a test case is that it should be able to find most errors with the least amount of time and effort. A software product can be tested in two ways. In the first approach only the overall functioning of the product is tested. Inputs are given and outputs are checked This approach is called black box testing. It does not care about the internal functioning of the product.
The other approach is called white box testing. Here the internal functionin of the product is tested. Each procedure is tested for its accuracy. It is more intense than black box testing. But for the overall product both these techniques are cruc There should be sufficient number of tests in both categories to test the over product.