Smart test
Testing method and technology based on online analytical instrument
Abstract: Testing technology started late in the domestic analytical instrument industry, and its development is not yet mature. This article mainly introduces the basic testing theory, testing process and commonly used testing methods in the online analytical instrument industry, which can be applied in the R&D testing phase and the operation and maintenance testing phase.
Test document review and defect management are required during the testing phase, which can not only improve testing efficiency, but also in project management, the project manager can balance the relationship between product quality, project schedule and cost according to the trend of defect convergence. When designing test cases, you need to pay attention to the design of reverse test cases and reliability test cases, so that hidden defects in the product can be found more effectively, thereby improving product quality.
0 Preface
On-line analytical instrument, also known as process analytical instrument, refers to a type of instrument that is directly installed in the process flow to automatically and continuously analyze the composition or physical parameters of the measured medium. In order to expand the online analytical instrument market, some companies have begun to develop or improve corresponding online analytical instrument products.
If the newly developed or improved analytical instrument can be operated reliably on the user site for a long time, in addition to the pre-technology pre-research, design development and technical review and other methods to ensure, it is also necessary to pass product testing on the product's function, performance, and reliability. To verify the quality of the products. At present, the problems exposed by online analysis instruments at the user site are mainly software bugs, device failures, EMC problems, and measurement affected by ambient temperature. According to the Pareto principle, not all defects in the product can be found in the test. However, some of these problems, such as some software bugs and some deficiencies that are affected by the environment, can be discovered and improved during the testing phase through enhanced testing. This requires not only to strengthen the quality awareness of testers, but also to deepen the testers’ understanding of the theoretical knowledge of testing. And the mastery of testing technology.
1 Basic theory of testing
1.1 Test Responsibilities
The roles of online analytical instrument testers are divided into software testers, hardware testers, product testers, reliability testers, and testers according to the different types of product modules. Software testers are mainly responsible for software black box testing, and hardware testers are mainly responsible for hardware unit testing and hardware and software integration testing. Reliability testers are responsible for product reliability tests, including environmental testing and life testing, while testers are mainly responsible for product CMC, explosion-proof and other type test related test items. The main responsibility of product testers is to assist unit testing and integration testing, perform system testing, conformance testing and user testing, etc., and assist in analysis and resolution of test problems. Of course, the organizational structure of different companies will be different, and the division of responsibilities of testers will also be different. At present, software testing, hardware testing and reliability testing of most analytical instrument companies are mainly done by product testers.
1.2 Test definition
In "The Art of Software Testing", Glenford J. Myers gave a basic explanation of the definition and principles of testing from both psychology and economics. In this book, testing refers to the process of executing programs in order to find errors. .
Currently, different people describe the definition of a test slightly differently. In 1993, in the standard terminology of software engineering proposed by IEEE, software testing is defined as the process of using manual or automatic means to run or evaluate a certain system or system component, and its purpose is to verify whether it meets the specified requirements or to clarify The difference between expected results and actual results. Although different people have different definitions of testing, different definitions make it clear that testing should be a process with the goal of finding defects.
1.3 Test purpose
The purpose of testing is not only to find product defects, but also to help project managers improve some of the problems in the current development process by analyzing defect distribution characteristics and the causes of defects. At the same time, defect analysis can also help us design targeted test cases and improve test effectiveness. The ideal goal of testing is to achieve "zero product defects". Even if no defects are found in the testing process, the process of testing is also meaningful. Complete testing is an effective means to evaluate product quality.
1.4 Defect convergence
The theoretical research on defect management started relatively late and its development is far from mature. With reference to the specifications defined in CMM5 and the characteristics of the current online analytical instrument industry, product defects are divided into four levels according to their severity: fatal, serious, general and recommended.
The convergence trend of test defects can reflect the quality changes of the tested product, which can not only assist the project manager in making decisions, but also serve as an important reference for product release. An example diagram of test defect convergence evaluation is shown in Figure 1. Online analysis instrument The convergence of test defects can be evaluated from the following three aspects.
1) The cumulative number of defects found;
2) The number of defects submitted at each stage;
3) The number of remaining defects.
The cumulative number of defects found in the test tends to stabilize and the number of defects submitted in each stage approaches 0, indicating that the product quality is relatively stable, but it does not mean that the product quality is good. When the trend curve of the number of remaining defects drops, it indicates that the product quality has improved, and when the trend curve of the number of remaining defects gradually rises, it indicates that the quality of the product is continuously deteriorating. The closer the convergence trend curve of the number of remaining defects is to 0, the better the product quality.
2 Test method
According to the tester's understanding of the object under test, the test case design method can be divided into white box testing and black box testing.
White box testing: It is also called structural testing or logic-driven testing. It is necessary to know the internal working process of the software or product, and to check whether its internal operation is normal according to requirements and design through testing. Test cases can be selected through logical coverage, path coverage, etc., and test cases can be evaluated by test coverage. Online analytical instruments generally adopt white box testing methods for software testing and hardware testing in the unit testing stage, which mainly verify whether the software process and software algorithm meet the requirements and whether the hardware signal link is correct.
Black box testing: also known as data-driven testing or functional testing, which is to test the functional requirements of software or products. Through testing to detect whether each function meets the requirements, regardless of its internal logical structure. The following introduces several black box test methods commonly used in online analytical instrument testing.
2.1 Equivalence class division method
The functional testing related technology that testers should first understand and master is equivalence class division. It is very important to understand the usage of this technology, because it is the basis of many other software testing technologies and approaches. Equivalence class is a collection of certain input fields. In this collection, each input condition is equivalent. If one of the input conditions cannot find product or software defects, then other input conditions in the set will not be tested. Found defects. Equivalence classes are divided into valid equivalence classes and invalid equivalence classes. Effective equivalence classes are a collection of meaningful and reasonable input data for product specifications; invalid equivalence classes are unreasonable product specifications. It is a collection of non-meaningful or meaningless input data. When designing test cases, it is necessary to consider these two equivalence classes at the same time.
2.2 Boundary value analysis method
Knowing from long-term test work experience, a large number of failures often occur on the boundary of the input domain or output value domain, rather than inside it. To use the boundary value analysis method to design test cases, first determine the boundary conditions. The boundary between the input equivalence class and the output equivalence class is the boundary condition that should be tested. The basic idea of the boundary value analysis method is to select the value that is exactly equal to, just less than or just greater than the boundary as the test data, instead of selecting the typical value or any value in the equivalence class as the test data. In the testing process, the test cases that consider the boundary conditions have a higher test return rate than other test cases that do not consider the boundary conditions.
2.3 Causality Diagram
The test method of equivalence class division and boundary value analysis mainly considers a single input condition, but does not consider the mutual restriction relationship between various input conditions, and does not consider various combinations of input conditions. If you consider using a test method that is suitable for describing a combination of multiple input conditions and producing multiple corresponding actions, you can use a causality diagram. The causality diagram method is suitable for a combination of multiple conditions and correspondingly produce multiple results. In more complex situations, this test method can effectively help us check whether the output under a variety of conditions is correct, and design efficient, non-redundant test cases.
2.4 Wrong speculation method
Error speculation method, based on experience and intuition to speculate on various errors that may exist in the product, so as to design test cases in a targeted manner. The basic idea of the error speculation method is to speculate all possible errors in the product and special circumstances that are prone to errors based on previous work experience, and select test methods and design test cases based on them.
Of course, there are other test methods that can be used in the design of test cases, such as: orthogonal design method, special value method, process analysis method and combination design method. Various test methods have their own strengths, and appropriate test methods should be selected according to the specific needs of the product, and efficient test cases should be designed to effectively expose the hidden defects in the product.
3 Test process
According to the characteristics of the online analysis instrument and the sequence of the testing phases, the testing process mainly includes unit testing, integration testing, system testing, user testing, trial production testing and mass production testing. The testing flowchart is shown in Figure 2. Unit testing generally uses white Box testing, based on the detailed design documents of the unit module, tests the internal functions and logic of the development module. The integration test is based on the summary design documents of the subsystems at all levels, and tests the modules after the unit test. The tested content mainly includes the interface between the units, the functions after the unit integration, and the risk project test of the prototype. System testing is mainly based on product package requirements and product-related standards to verify that it satisfies the required functions, performance, compatibility, and reliability. User testing includes alpha test and beta test, which are mainly based on pre-determined technical agreements, and mainly verify installability, maintainability, main functions, main performance, etc., to ensure that the product is ready for delivery. Trial production test conducts small batch trial production of the developed products, and verifies the product's production material procurement, manufacturing, inspection and other process links to ensure that the products can be mass-produced smoothly. Mass production testing is conducted by the R&D testing department on mass production products, mainly for long-term testing items such as product stability and reliability, as well as tests on functions and performance items that have more defects in the previous stage.
The test process of the online analytical instrument at a certain stage can be carried out with reference to Figure 3. The tester first analyzes the test requirements and understands the instrument under test as soon as possible. Through the analysis of the test requirements to understand the test scale, complexity and possible risks, etc., the more detailed the test requirements, the more the testers will understand the tested product and the clearer the test tasks to be performed, so that they will be more confident in ensuring the quality And progress. Test requirements are the foundation and focus of a test plan. A test plan is a plan for testing a product. The test plan should include: product overview, test requirements description, test resource allocation, risk analysis, and test cycle.
The purpose of test case design is to specify system requirements, extract test requirements, and describe each function point through a testable method. The elements of the test case should be complete, including the case number, use case version, compiler, compilation date, test purpose, test resources, expected results, and test steps. When designing test cases, we must pay attention to the operability of the test steps and the specific quantitative indicators of the data.
In the online analytical instrument test link, avoid not writing test plans before executing the test and directly executing the test without reviewing the test plan, especially for long-period, high-cost and high-priority project testing. The test plan needs to reflect the test strategy, the number of test prototypes, test resources, test arrangements, and test cases. At present, the software testing of some company's products tends to be forward testing, so it is necessary to consider the design of reverse test cases when writing test plans. Before testing, it is necessary to arrange test resources, and analyze the measurement uncertainty and error of test tooling and equipment.
When performing the test, first test the instrument function, and then enter the performance test stage, and then perform the software test (can be started in advance), and perform the reliability test. A very important task in online analytical instrument testing is reliability testing. Reliability testing often exposes some fatal and serious design flaws in the product. In project development, the project delay rate continues to increase during this testing phase. There are many classification methods for reliability testing. The conventional classification methods mainly include five categories: environmental testing, life testing, screening testing, field use testing, and appraisal testing. At present, environmental testing and life testing are mainly used in the reliability testing of online analytical instruments, and the other three types of reliability testing are not in-depth enough. Environmental testing is to assess the adaptability of the product under various environmental conditions (temperature, vibration, shock, hot flashes, salt spray, low air pressure, etc.). Generally, the test will be carried out according to the requirements of the product package. Life test is a test method to study product life characteristics and failure laws. The product is placed under specific test conditions to investigate its failure characteristics over time. In some applications, online analytical instruments have harsh conditions. Not only are there high concentrations of dust and corrosive gases in the sample gas, but sometimes there are high-frequency vibrations at the installation location. In such a harsh application environment, it is especially necessary to pay attention to the reliability of the product.
Testing is generally the output document of the testing phase. A detailed test should contain sufficient information, such as defect statistics, remaining problem analysis, product quality evaluation, etc. There are more problems in the test: incomplete test items, insufficient analysis of defects, and insufficient concise and popular language. For long-term tests, you should write tests after each test phase is completed, so as not to miss important test details after a long time.
4 Conclusion
Online analytical instrument testing is a very important task to ensure product quality. Testers need to master a wealth of theoretical knowledge and testing techniques, and design test cases reasonably to effectively discover hidden defects in products, especially reverse test cases in software. And the design of product reliability test cases. In the actual work, it was discovered that during the test phase of the online analysis instrument system, the proportion of defects found through reverse test cases and reliability test cases was indeed very high. With the development of test technology, more and more test methods will be applied in the analytical instrument industry, which will effectively improve test efficiency and product quality. (Author: Liu Lifu)