Software testing requires creativity and intelligence. Developing correct and effective tests is not easy. The testing principles below are general guidelines for testing.
1. Testing shows defects
Testing can show the presence of defects in the program, but not prove their absence. However, it is important to create test cases that will find as many bugs as possible. Thus, with proper test coverage, testing can reduce the likelihood of software defects. At the same time, even if defects were not found during the testing process, it cannot be argued that they do not exist.
2. Exhaustive testing is not possible
It is not possible to conduct exhaustive testing that covers all combinations of user input and system states, except in very primitive cases. Instead, it is necessary to use a risk analysis and prioritization to better allocate software quality efforts.
3. Early testing
Testing should begin as early as possible in the software development lifecycle, and its efforts should be focused on specific goals.
4. Accumulation of defects
Different modules of the system may contain a different number of defects – that is, the density of defects accumulation in different elements of the program may differ. Testing efforts are distributed in proportion to the actual density of defects. Most critical defects are detected in a limited number of modules. This is a manifestation of the Pareto principle: 80% of the problems are contained in 20% of the modules.
5. The pesticide paradox
When you run the same tests over and over again, you will see that they find fewer and fewer new errors. As the system evolves, many of the previously found defects are fixed and old test cases no longer work.
To overcome this paradox, it is necessary to periodically make changes to the used test suites, review and adjust them so that they correspond to the new state of the system, and allow finding as many defects as possible.
6. Testing is context-sensitive
The choice of methodology, technique, and type of testing will directly depend on the nature of the program itself. For example, medical software requires much more rigorous and thorough testing than, say, a computer game. For the same reasons, a high-traffic site must go through extensive performance testing to demonstrate its ability to operate under high load conditions.
7. Misconception about the absence of errors
The fact that testing has not found any defects does not mean that the program is ready for release. Finding and fixing defects will not be important if the system is inconvenient to use and does not meet the expectations and needs of the user.
A few more important principles: