1.1 Purpose of software testing
① Software Testing is the process of executing a program in order to detect errors;
② test is to prove that the program is wrong, not to prove that the program is error-free;
③ A good test case is that it can find errors that have not been discovered so far;
④ A successful test is a test that finds errors that have not been found so far.
The purpose of testing is clear, but how to know the problem is the key, which requires the software personnel have a good knowledge and means.
1. 2 Methods of software Testing
People usually think that it is more difficult to develop a program than to design a test case, but in fact, designing a test case is a meticulous work that requires considerable skill, and a slight forgotten how. General software testing is divided into static test and dynamic test, and dynamic test is divided into white box test and black box test. Black-Box testing is also known as functional testing or data-driven testing, which tests to see if each function is normal without considering the internal structure and characteristics of the software at all. The tester tests the program interface and only checks that the program function is in accordance with the requirements specification. The black box testing methods mainly include equivalence class division, boundary value analysis, causality diagram, error inference, etc., which are mainly used for software validation testing. The black box test mainly checks for the following types of errors:
① whether there are errors or omissions in the function;
② interface is wrong, the input is correctly received, the output is correct;
③ whether there are data structures and external database access errors;
④ performance can be accepted;
⑤ whether there are initialization or termination errors.
The white box test is also called a structural test or a logic-driven test, which can be tested to determine whether the internal action of the product is normal according to the specification. According to the internal structure and logic of the program, the test cases are designed to verify that each route in the program works correctly according to the predetermined requirements. The main methods of white box testing are logic driver, path test, etc., which are mainly used for software verification. White box test method is a poor lift path test, the tester must check the internal structure of the program, starting from the logic of the inspection program, to obtain the test data. The number of independent paths through the program is a large order of magnitude. Even if each path is tested, there may still be errors. 1th, the exhaustive path test is impossible to detect that the program violates some design specifications, even if the program itself is a wrong program. 2nd, the exhaustive path test can not be found in the program due to missing paths and error. 3rd, the exhaustive path test may not find those data-related errors.
The principle of White box testing method:
All opposing paths in the ① program module are executed at least once;
② in all logical judgments, the two cases of "true" or "false" can be executed at least once;
③ each cycle should be executed once under the boundary conditions and the general conditions;
④ the validity of the internal data structure of the test program.
Black box test method or White box test method, because of the large number of tests, it is impossible to thoroughly test. Program testing can only prove the existence of errors, but it does not prove that the error does not exist.
The purpose and method of software testing