After decades of software testing, the testing community has put forward a lot of basic principles of software testing, providing testing guidelines for test managers and testers. Software testing principles are important, and testers should conduct test activities under the guidance of test principles.
the basic principles of software testing help testers perform high-quality tests, identify defects as early as possible, and be responsible for tracking and analyzing problems in the software, questioning and improving existing problems and deficiencies, and continuously improving the testing process.
Principle 1: Testing shows the existence of defects
testing can show the existence of defects, but it does not prove that the system is not defective. Testing can reduce the likelihood of defects in the software, but even if the test does not detect any defects, it does not prove that the software or system is completely correct, or that there is no defect.
Principle 2: Exhaustive testing is not possible
exhaustive testing is not possible, and testing should be terminated when certain test export criteria are met. Considering all possible input values and their combinations, and combining all the different test preconditions, this is an astronomical one, and we are not likely to do exhaustive testing. During the actual testing process, the tester was unable to perform the "astronomical" number of test cases. So every test is just a sample test. Therefore, the test effort must be controlled based on the risk and priority of the test, balancing the cost of testing, profitability and risk.
principle 3: Early intervention in testing
According to statistics, errors introduced early in the software development life cycle represent the 50%~60% of the number of errors (including eventual defects) that occurred during the software process. In addition, a study by IBM showed that there was a magnified trend in defects. An error in the requirements phase can lead to n design errors, so the more late the test, the greater the cost of repairing the defect. Therefore, software testers should test the software as early as possible to improve the quality of software and reduce the cost of software development.
principle 4: Clustering of defects
The Pareto principle indicates that "80% of errors are concentrated in 20% of the program modules". Practical experience also proves this, and often, most defects are only a small fraction of the number of objects that are being tested. Defects are not average but cluster-distributed. Therefore, if a lot of defects are found in one place, more defects can often be found in this module. Therefore, the test process should pay attention to the error cluster phenomenon, to find more errors in the program segment or software modules, should be repeated in-depth testing.
principle 5: Pesticide Paradox
pesticides are used more, pests have immunity, pesticides do not work. In testing, the same test cases are reused over and over again, and the ability to find defects becomes worse. The main reason for this phenomenon is that the testers do not update the test cases in time, and are too familiar with the test cases and the test objects to form a mindset.
to overcome this, test cases need to be reviewed and modified frequently, adding new and different test cases to test different parts of the software or system, ensuring that the test case is always up-to-date, which includes updates to the last program code or documentation. In this way, parts that have not been tested in the software, or previously unused input combinations, are re-executed to uncover more flaws. At the same time, as a professional tester, to have exploratory thinking and reverse thinking, and not just to do the output and expected results compared.
Principle 6: Test activity relies on test content
Project test-related activities depend on the content of the test object. For each software system, such as test strategy, test technology, testing tools, testing phase and test export criteria, and so on, the choice is not the same. At the same time, the test activity must be associated with the operating environment of the application and the risks that may exist in use. Therefore, no two systems can be tested in exactly the same way. For example, testing a security-focused e-commerce system is not the same as the focus of general commercial software testing, and it focuses more on security testing and performance testing.
Principle 7: No expiration does not mean that the system is available
the quality characteristics of the system are not only functional requirements, but also include many other requirements such as stability, usability, compatibility and so on. If the system is not available, or the system does not fulfill the customer's needs and expectations, then the development of this system is a failure. It is also meaningless to find and modify defects in the system.
early intervention and contact with the prototype system during the development process is a preventative measure to avoid such problems. Sometimes, the test results of the product may be perfect, but the final customer does not buy the account. Because, this development angle perfect product may not be the product that the customer really wants.
principle 8: The criteria for testing are the needs of the user
The purpose of providing software is to help users to complete the scheduled tasks and meet the needs of users. Users here are not specifically referring to the final software test consumer. For example, we can assume that system testers are customers of system requirements analysis and design. One of the most important purposes of software testing is to identify defects, so testers should be able to see the problem from different users at different stages of testing, and the most serious problem in the system is those that cannot meet the user's needs.
principle 9: Early definition of product quality standards
only by establishing the quality standards, the quality of the products can be analyzed and evaluated according to the test results. Similarly, the test case should determine the expected output results. If the test expects the result cannot be determined, it cannot be verified. Must use the pre-accurate input data and output results to check whether the current output is correct, to be targeted.
Principle 10: Testing throughout the life cycle
due to the complexity and abstraction of software, errors can occur at all stages of the software life cycle, the preparation and design of the test must begin before coding, and in order to ensure the final quality, the quality of the process product must be ensured at every stage of the development process. Therefore, software testing should not be considered only as an independent phase of software development, and testing should be carried out throughout the entire life cycle.
As soon as software projects are started, software testing should be involved, rather than waiting for software development to complete. After the project is started, testers should participate in the appropriate activities at each stage. Or at each development stage, the tests should check and validate the output of this phase. For example, in the requirements phase, testers need to participate in the review of requirements documentation.
principle 11: Third-party or independent testing team
because of psychological factors, people subconsciously do not want to find their own mistakes. Based on this mindset, it is difficult for people to find their own mistakes. Therefore, the test will be more objective and impartial by the strict independent testing department or the third party testing organization, and the testing activities will achieve better results.
software developers should try to avoid testing their own products, should be tested by a third party, of course, developers need to carry out the relevant self-test before delivery. Testing is a disruptive activity, and the mental state of a developer can affect the effectiveness of the test. At the same time, it is difficult for developers to find out the mistakes of the requirements specification.
However, the principle of a third party or independent Test team is not to assume that all tests are done entirely by them. A certain degree of independent testing (which avoids the developer's preference for their own code) can be more efficient in discovering software defects and software failures. But independent testing is not a complete substitute, as developers can efficiently find many flaws in their code. In the early days of software development, developers were careful to test their work products, which was one of the responsibilities of developers.
Fundamentals of Software Testing