Electro Hydraulic Crane,Manual Anchor Windlass,Electro-Hydraulic Crane,Hydraulic Crane TAIXING HAITAI GLOBAL TRADE CO.,LTD , https://www.jiangsuhaitship.com
Embedded system is based on computer technology, application-centric, and software and hardware can be tailored to the application system's special computer system with strict requirements on functions, reliability, cost, size, and power consumption.
Embedded software is software based on embedded system design. It is a kind of computer software. It is also composed of programs and documents and can be subdivided into system software, support software, and application software. Embedded software is widely used in the home, industrial, commercial, communications and defense fields. China currently has advantages in embedded application software. In the embedded system, the workload of the software accounts for about 80% of the total workload, and the workload of testing and verification accounts for 70% of the software workload.
1.1 Features and Testing Difficulty of Embedded Software
Embedded system development has its own characteristics. Generally, in embedded system software, the boundaries of underlying drivers, operating systems, and applications are unclear, and sometimes even mixed together. This is mainly due to the dependence of software on hardware in embedded systems. Due to the dependency of embedded software on hardware, software testing must simulate the actual operating environment of the software under test to ensure the reliability of the test. The unclear boundaries between underlying programs and applications increase the difficulty of testing. During the test, the application program can be tested only when it is confirmed that the embedded system platform and the underlying program are correct, and when the system is tested, it is difficult to locate the error. Software specificity is also an important feature of embedded software. Since the embedded software design is based on a certain target hardware platform and is based on fixed tasks, the functions must be completely determined once they are loaded on the target system. This characteristic determines the inheritance of the embedded application software is poor, prolongs the test time of the system, increases the test cost. Another important feature of embedded software is real-time, which is considered from the perspective of software execution, that is to say, the implementation of embedded software must meet certain time constraints. In embedded systems, the complexity of the application software's own algorithm and the scheduling of operating system tasks determine the allocation and consumption of system resources. Therefore, when testing the real-time performance of the system, it is necessary to use a certain test tool to analyze and test the complexity of the application algorithm and the task scheduling of the operating system.
1.2 Embedded Software Testing Methods
Software testing is an important part of software development, and embedded software is no exception. Figure 1 shows the general flow of embedded software testing. According to different indicators, software testing methods [1] have different ways of dividing. According to the different stages of the software development process, the testing can be divided into module testing, integration testing and system testing; according to whether the need for running target code is divided into dynamic testing and static testing; according to the visibility of the target code can be divided into white box testing ( Structural tests) and black box tests (functional tests). In software testing, each test method is not isolated. In order to achieve the most economical and effective test purpose, various test methods are often nested within each other. For example, in the unit testing phase of software, dynamic tests can be performed using the black box test and the white box test, respectively. In the system testing phase, tests can only be performed using the black box test method.
In order to test the system of embedded software more effectively, the design scheme of the simulation system with interactive error detection and positioning in embedded software system testing is proposed. Using this simulation system can not only assist the system test according to the first test method [2] and the second test method [3], but also can use the interactive learning function of the simulation system to continuously accumulate wrong location experience and implement error detection. Positioning, saving time for testers and developers. This is not available in other test methods.
2 Simulation System Structure Design
Most of the embedded software's hardware carrier is a dedicated computer device, and usually no peripheral device is used for monitoring or observation during the test. Some embedded software also has interactive operations. After the tested software is transplanted to the actual hardware environment on the target machine, due to merging with the embedded system platform and the underlying program, when the system is tested in a black box, the error positioning becomes very difficult. Therefore, according to the characteristics of embedded software, a simulation system structure model with interactive error detection and positioning function is proposed. Figure 2 shows the hierarchical structure of the simulation system. The simulation system adopts a hierarchical structure, a hierarchical design, and a layered implementation in the design, and each layer is internally transparent to other layers.
The simulation system is composed of hardware drive, interactive operation module, drive module, pile module, analysis module and human-machine interface. The functions of each module are described below.
(1) The hardware driver is responsible for driving the hardware and provides the underlying hardware operation interface to the upper layer. The simulation system provides the corresponding communication interface for the embedded software through the hardware driver, which is used for the data exchange between the embedded software and the simulation system. The communication interface is implemented based on the interface design of the specific embedded software, which is generally a variety of communication protocols. The communication protocol modules are loosely coupled and extensible, ensuring that changes to the hardware interface will not affect the implementation of the upper layer functions.
(2) The interactive operation module is responsible for the interactive operation with the embedded software. This section can be tailored, depending on whether or not the embedded software requires interactive operation. Its main function needs to be implemented according to a specific software design.
(3) The driver module is responsible for encapsulating the processing logic related to the test data of the simulation system, and providing the man-machine interface with an operation interface independent of the architecture. In addition to normal function and performance tests, the system test phase should perform unexpected tests and destructive tests, that is, test activity and man-made destructive tests that should not occur under normal test system conditions to further verify system performance. The driver module transmits various test data in the test case to the embedded software under test.
(4) The stub module provides the necessary input data for the embedded software. The normal operation of embedded software requires the necessary external input data to complete the normal operation and interaction of the system. Regardless of how these input data are provided, the stub module should emulate various input data for embedded software. For system testing, input data should also include both normal data and illegal data.
(5) The analysis module includes three parts: test result, expected result and fault model. The test result is the result of the test software executed after the test case is executed; the expected result is the expected result input by the tester for different test cases before the test starts; the fault model includes the location of various faults. Fault Model After a test is completed, the accumulated error location model can be exported through an external interface. It can be used as a fault model for other test systems, or it can be exported as a Word or Excel file for developers to analyze and summarize.
After the analysis module gets the test results, it first compares with the expected results. If they are the same, the test passes; otherwise, search for the corresponding fault in the fault model and locate the fault. If there is no corresponding error location in the fault model, the analysis module directly feeds back test results and test cases that have not passed the test to the tester, and the tester conducts positioning. After the error is located, the tester modifies the fault model based on the test instance to increase the error judgment event. Through continuous circulation, various fault locations in the fault model section gradually increase, and the simulation system achieves error positioning during continuous learning.
(6) Man-machine interface is used for input and display of various data and results, and manual input interface for interactive operation.
3 Railway Microcomputer Interlock System Testing
The measured railway microcomputer interlocked 2 by 2 takes 2 systems running on the CPU (486DX), which is a typical embedded software. The logic diagram is shown in Figure 3.
The embedded software under test runs in the CPUs of Series A and B in Figure 3, and receives the interlock commands issued manually by Ethernet. After processing, it is transmitted to the output module through the DP protocol network to control the field devices. In A and B systems, only one system can be used as the main system. The switching between master and slave systems can be achieved by manual switching or automatic switching.
3.1 Test implementation
Before the test is implemented, test cases are firstly compiled, and the expected results and possible errors and corresponding fault location are given for each test case. Put these data into the analysis model of the simulation system to prepare for the upcoming test work.
In the test implementation process, the simulation system is first used to perform tests according to the first type of test method. It is verified that the railway interlocked 2 by 2 taken 2 system test software is 'work', that is, the function of the software is performed in accordance with the pre-designed of. Then test according to the second type of test method to verify that the software is not working.
Using simulation systems to design and implement many test cases that are not possible in the actual software and hardware environment. Examples are as follows:
(1) Input of illegal data. In a normally operating system, an operator cannot send an incorrect interlock command to the software under test, and the input module cannot generate all kinds of illegal input data required for the test. Using the driver module and stub module of the simulation system, it is very easy to send any combination of illegal data to test the safety of the railway interlocked 2 by 2 taken 2 system software under test. Combined with the use of the analysis module, the specific implementation process is:
Through the man-machine interface, input illegal test data of excessive length 6,244,244,80,0,17,1,0,80,0,255,255,255,0,1,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0 To the tested software, the expected result is no test result data return, that is, the embedded software will filter out illegal data without any operation. The simulation system prompts the test to pass through the man-machine interface. The actual situation is indeed that the microcomputer interlocking system has not performed any operation, and it will filter long illegal data. Invalid test data input fixed code through man-machine interface 170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170 , 170, 170, 170, 170, 170, The expected result is no test data return, that is, the embedded software filters illegal data without any operation. The simulation system prompts the test to pass through the man-machine interface, and the actual situation is that the microcomputer interlocking unit has crashed. In response to this situation, the expected result is modified to "No test data returned and normal communication with the application under test", and "No communication with the tested application software" was added to the fault model to correct the error of the simulation system. Positioned as a computer interlock unit crashes. In the same way, we must also modify the expected result of the long illegal test data and the contents of the fault model. In this way, the analysis model of the simulation system is also constantly improving.
(2) Communication capacity test. Railway Interlock 2 by 2 takes 2 systems The basic functions in the tested software include the total number of system communication I/O modules is 100. In the normal testing process, it is generally impossible to build a hardware testing environment of such a large scale for the test. Even if it can be built, this test will not be implemented because of the low cost performance. Using the simulation system, 100 I/O module traffic can be easily achieved through the stub module and the driver module, while the cost of purchasing I/O hardware modules can be saved.
(3) The railway interlocking system software needs to meet the requirements of SIL4 in IEC61508 standard [4]. By repeatedly sending the interlock command through the simulation software driver module, it can be easily tested whether the software in the railway interlocked 2 by 2 taken 2 system satisfies the requirements of SIL 4, and these tests can not be realized if the test is simply performed with manual input. The interactive operation module can complete the necessary software and human interaction function during the test process.
After the first test of the tested software is completed, the developer modifies the BUG in the software according to the error location of the simulation system, and submits the first regression test. After the continuous improvement of the human-computer interaction in the first test, the analysis model of the simulation system tends to be mature. It can quickly locate errors during the regression testing process, saving a lot of time for the test and development personnel and shortening the software development cycle.
3.2 Test results
By using the simulation system to test the railway interlocked 2 by 2 taken 2 system test software, a total of 10 fatal and serious problems related to software failure security principles were discovered, and 5 fatal and serious issues related to software vulnerability security were involved. There were six fatal and serious problems with unimplemented functions, one fatal problem involving reliability, and 30 general and prompt problems.
Aiming at the characteristics of embedded software, the simulation system architecture model with interactive error detection and positioning function can realize the detection of positioning software errors during the system testing process, and solve the embedded software system testing process, due to the tested program and embedded The system platform is integrated with the underlying program, and errors are not easily located. Through the application of the railway computer interlocking measurement system test project, a number of key issues were discovered, and a great deal of time was saved for testers and developers, and the progress of the test was accelerated, especially in the regression testing stage. The facts show that this simulation system architecture model can be applied not only to system testing of embedded software, but also to black box testing of non-embedded software. In the future research, the learning theory of the artificial intelligence subject will be applied to realize the automatic learning function of the simulation system analysis module so as to automatically locate the software error in the test process without human intervention.
1 Embedded System Overview