Author: Fan Zhihua Source: TianjiAs the cost of computer hardware keeps decreasing, software accounts for an increasing proportion of the cost of the entire computer system. How to improve the software quality is a major topic in the entire computer software industry. Software testing, as an important part of software development, has received increasing attention. To identify program errors as much as possible and produce high-quality software products, it is particularly important to strengthen the organization and management of testing work.
1.
Software lifecycle
A software life cycle starts from the plan and ends with the discard. Generally, the software life cycle includes three stages: planning, development, and operation. Each period can be divided into several smaller stages. The main task in the planning period is to analyze user requirements, analyze the main objectives of the new system, and develop the feasibility of the system. During the development period, the design and implementation tasks must be completed. It can be divided into requirement analysis, outline design, detailed design, coding, and testing. Coding and testing are the last two phases of software development. The running period is the last period of the software life cycle. During this period, software personnel mainly perform software maintenance.
Statistics show that more than 40% of the effort to develop large-scale software is spent on testing. Even experienced programmers will inevitably make mistakes in coding. What's more, some write errors have long been rooted in the design and even analysis stages. Whether it is an early latent error or a newly introduced error in the Code, if it is not promptly ruled out, it can reduce the software reliability, severe cases lead to failure of the entire system. It is necessary to emphasize the importance of software testing to prevent potential problems.
2.
Test process and method
2.1 purpose of testing
In the classic book Software Testing Techniques of G. J. Myers, the definition of testing is given: "program testing is a process of executing programs to discover errors ". The purpose of the test is to find errors in the program to prove that the program is wrong, rather than to prove that the program is not wrong. In the process of software development, analysis, design, coding, and other work are constructive, but testing is "destructive ", testing can be considered as a "final review" in three phases of analysis, design, and coding, and plays an important role in software quality assurance. In order to ensure the quality of software, the ideal practice should be to strictly review the software development process based on the results of each stage of software engineering. 2.2. After the design work is completed, the test preparation should be started. Generally, a designer familiar with the whole system design should compile the test outline, define the test content and the Criteria for passing the test, and design a complete and reasonable test case so that the system can complete the test after implementation.
After the programs developed by the Implementation Group are verified, they are submitted to the test group, and the test owner organizes the tests. Generally, the tests can be organized as follows:
(1) first, testers should carefully read the relevant materials, including specifications, design documents, user guides, test outlines, test content, and guidelines for passing tests during the design process, be familiar with the system, write test plans, design test cases, and prepare for the test.
(2) to ensure the quality of the test, the test process is divided into several stages: Code Review, unit test, integration test and acceptance test.
(3) code review:
Code review is a process in which a group of people conduct Static Analysis of programs through reading, discussing, and disputes. The review team is headed by two teams ~ Consists of three program designers, testers, and programmers. The review team should hold a code review meeting on the basis of fully reading the documents of pending procedures, control flowcharts, relevant requirements and specifications. The programmers will explain the logic of the program one by one, and hold heated discussions and even disputes, to reveal the key to errors. Practice shows that programmers can discover many mistakes they have not found during the explanation process, while discussions and disputes further lead to the exposure of problems. For example, the discussion on the modification method of a local small problem may find that the problems related to it may even involve the module's function description, inter-module interface, and the overall system structure, this results in redefinition and re-design verification of requirement definitions, greatly improving the quality of software.
(4) unit test:
Unit Tests focus on checking the minimum unit-module of the software design. Through tests, it is found that the actual function of the module and the function of the module defined indicate the non-conformity and the Encoding Error. Because the module is small in size, with a single function and simple logic, the tester may clearly understand the I/O conditions of the module and the logical structure of the module through the module specification and source program, use Case of structure test (white box method) to achieve thorough test as much as possible, and then add it to the use case of function test (black box method, it can identify and respond to any reasonable or unreasonable input. A high-reliability module is a solid foundation for building a reliable system.
(5) integration test:
Integration testing is to assemble modules according to design requirements for simultaneous testing. The main goal is to discover problems related to interfaces. For example, data may be lost when it passes through the interface. One module and the other module may have harmful effects due to negligence. Combining sub-functions may not generate the expected main functions; some seemingly acceptable errors may accumulate to an unacceptable level, and the full data structure may have errors.
(6) acceptance test:
The purpose of the acceptance test is to indicate to future users that the system can work as required. After integration testing, all modules have been assembled into a complete software system according to the design, and interface errors have been basically ruled out. Then, the effectiveness of the software should be further verified, this is the task of acceptance testing, that is, the functions and performance of the software are as reasonably expected by the user.
After the software is tested in the above test process, the software basically meets the development requirements, and the test ends. After acceptance, the software is submitted to the user. . Testing Methods Analysis integration testing and subsequent testing stages, generally using the black box method.
(1) Use edge Value Analysis Method and (or) equivalent classification method to propose basic test cases;
(2) supplement new test cases with the method of speculation;
(3) If the function description of the program contains a combination of input conditions, use the causal method at the beginning, and then perform the preceding steps (1) and (2.
The design strategies for unit tests are slightly different. When designing program cases for the module, you can directly refer to the module's source program. Therefore, the unit test strategy always applies the white box and black box methods. There are two specific methods:
A. Follow the above steps and use the black box method to propose a set of basic test cases, and then use the white box method for verification. If the test cases generated by the black box method fail to meet the required coverage standards, the white box method is used to add new test cases to meet them. The coverage criteria should be determined based on the specific circumstances of the module. For modules with high reliability requirements, it is usually necessary to meet the combination of conditions or path coverage standards.
B. Use the white box method to analyze the logic structure of the module, propose a batch of test cases, and then use the black box method to supplement the functions of the module.
3.
Tester Organization
People are the most valuable and important resources in testing. Without a qualified and active testing team, testing is impossible. To complete testing tasks with high quality and efficiency, good test engineers should have the following capabilities: 3.1. Communication Skills
An ideal Tester must be able to communicate with everyone involved in the test, and be able to communicate with technical (developer) and non-technical (customer, management) personnel. We need to be able to talk to users and be able to speak with developers. Unfortunately, these two types of people do not have a common language. The focus of talking to users must be on what the system can correctly handle and what it cannot handle. When talking with developers about the same information, these activities must be re-organized in another way, and members of the test team must be able to communicate with users and developers in the same way. 3.2 Technical capability
In general, developers have a contemptuous attitude towards those who do not understand the technology. Once a member of the test team makes a wrong decision, their credibility will be immediately promoted. A tester must understand the concept of the tested software system and use the tools in the project. More than a few years of programming experience is required to achieve this. The early development experience can help you to have a deeper understanding of the software development process and correctly evaluate testers from the perspective of developers, simplify the learning curve of automated testing tool programming. 3.3. self-confidence
It is common for developers to accuse testers of making mistakes. testers must have sufficient self-confidence in their opinions. If you allow others to point themselves to the east, you cannot do anything more. 3.4 diplomatic capability
When you tell someone that he has made a mistake, you must use some diplomatic methods. Skillful and sophisticated diplomacy helps maintain collaboration with developers. When a tester tells a developer that his software has a mistake, he also needs a certain level of diplomacy. If the method is too strong, for testers, the cooperation with the Development Department in the future is equivalent to "Winning the war but losing the battle ". 3.5. Sense of humor
A humorous criticism will be very helpful in the case of sophistry. 3.6. Strong memory
An ideal tester should be able to mine from memory similar errors that have been encountered before, and the value of this ability in the testing process cannot be measured. Because many new problems are similar to the ones we have found. 3.7. Suspicion
It is expected that developers will do their best to interpret all the errors. The tester must listen to everyone's instructions, but he must be skeptical until he has read it. 3.8 self-supervision
Testing can easily make you lazy. Only those with self-supervision ability can work normally on a daily basis. 3.9 insights
A good test engineer has the view that "testing is to destroy", the ability to capture user opinions, strong quality pursuit, and the ability to focus on details. The judgment capability of the application's high-risk zone allows the Limited Test to be targeted at key links. In short, testing is a key stage in the software life cycle and one of the important activities to ensure the software quality. Regardless of the importance of software testing and its impact on software reliability, given the increasing scale of software development and complexity, the organization and management of software testing should be highly valued to mention software quality.