Aiming at “How to do embedded system testing?”, I made a systematic thinking and combing for reference.
Different test subjects have some differences in their test focus, which can be called “specific elements”. I think the specific elements of embedded system testing include at least the following six types, namely: system timing control logic, individual component motion control logic, product reliability testing, sensor and detection technology, embedded operating system knowledge, and product testability. A brief description is given below:
Thinking and combing about embedded system testing
1. System timing control logic
Embedded systems often involve the motion control of mechanical components. Take the biochemical analyzer test when I was in Mindray as an example, including sample trays, reagent trays, sample needles and syringes, reagent needles and syringes, cleaning mechanisms, sample rack transmission mechanisms, Various pump valves, etc. For such a complex embedded system, it is necessary to adopt the architecture of “middle computer-lower computer”. The middle computer refers to the control unit, and the lower computer refers to the specific components. The middle computer decomposes the complex instructions into the sequential actions (parallel or serial) of each component, and the lower computer completes the action execution. The test needs to verify the instruction decomposition of the middle computer, the execution action of the lower computer, and the exception handling logic (such as firing pin handling).
2. Motion control logic of a single component
For each component, the system designer defines the motion control algorithm. For example, the movement process of the sample needle is “stationary-acceleration-uniform speed-deceleration-stop”. During the acceleration and deceleration process, the motor speed of the sample needle will show a step curve. This design is to avoid the sudden movement and stop causing the motor to lose step. . During the test, an oscilloscope should be used to sample the acceleration and deceleration step curve of the needle to verify whether it meets the requirements of the design scheme. Ordinary small oscilloscopes do not support this function, we used the American LeCroy (LeCroy) oscilloscope to complete the test.
There are two explanations here:
First, there are many motion scenes for each part, how to cover the verification? According to the boundary analysis method in test design, extreme scenarios can be used for testing. If the test of the shortest and longest motion path of the sample needle is correct, it can be logically considered that other scenes are also correct.
Second, the test of motion control logic consists of two levels. The first is to verify whether the actual movement of the components is consistent with the system design (Do things right), and the second is to verify whether the system design itself is reasonable and there are no abnormalities (Do right things).
3. Product reliability test
Embedded products are a combination of software and hardware, and their reliability includes software reliability and hardware reliability.
The simplest reliability test method is the burn-in test. That is, continue to operate and observe whether the product can meet certain reliability indicators, and then improve the design and process according to the failure mechanism of the problem to enhance the reliability of the product.
Professional reliability testing also needs to apply various environmental stresses (such as temperature, humidity, salt spray, electromagnetic, external force, etc.) during the aging test to detect the failure of products in various environments.
I have only done a simple burn-in test in this regard, and some software and hardware problems have been found during the test. Complete reliability testing is a specialized subject, involving knowledge of mathematics, physics, and quality engineering, and needs to be studied and practiced in depth.
4. Sensor detection technology
Embedded products usually use a variety of sensor detection technologies, so testers need to understand the principles and functions of sensors. For example, biochemical analyzers use many types of sensors, such as through-beam sensors, reflection sensors, and liquid level sensors. Testers want to simulate scenarios such as component calibration failures and sensor errors, and they need to perform simulation operations based on the working principle of the sensor, which is very interesting.
5. Knowledge of embedded operating system
The operating system is the basis for the operation of software and hardware, so testers must also be familiar with embedded operating systems. During the testing process, testers need to understand the installation, configuration, and operation of the program, and need to view the status, log, and performance indicators of the program, all of which are completed through interaction with the operating system.
There are many types of embedded operating systems, and with the rapid development, attention should be paid to the emerging Huawei HarmonyOS and Google Fuchsia OS. I recently checked some technical materials of HarmonyOS, and I have some understanding of the system’s layered architecture, multi-core design, distributed task management and other technologies.
6. Product testability
Any system test must pay attention to testability, but testability is more important in embedded system testing. Testability refers to the ease with which testers can test programs, including attributes such as operable, observable, controllable, and decomposable. Embedded systems may not have graphical interfaces like web applications and mobile applications, and can only be tested by observing component actions. So, can the test be performed on a motherboard without components? Does the program’s running status information provide real-time logs? Whether the performance indicators of the program are easy to obtain… These points should be considered and realized in the product demand analysis and program design.
The above points are the specific elements that I think of embedded system testing that needs to be paid attention to.
In addition, embedded system testing should also pay attention to the general elements of test activities, such as: product business requirement analysis, design plan analysis, test plan and use case design, test strategy and test execution, function/performance/stability testing, business feature special items Testing, automated testing, etc., will not be discussed here.