Reliability testing method and system for embedded software

Through the methods of equivalent class division and circular traversal, the input magnitude of embedded software is segmented and combined, which solves the problem of insufficient input coverage in the existing test methods, and achieves the improvement of full coverage and defect detection.

CN116010231BActive Publication Date: 2025-08-15CRRC ZHUZHOU ELECTRIC LOCOMOTIVE RESEARCH INSTITUTE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111229515.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-08-15
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

Existing embedded software testing methods fail to effectively cover inputs outside the software requirements, resulting in potential defects escaping during the testing process, which may lead to serious consequences.

Method used

The input magnitude value is segmented by the equivalent class division method, the specific input magnitude value is obtained, and the input combination is cyclically traversed to determine whether there are unanticipated events in the output result are analyzed using the software failure mode and fault tree analysis method.

Benefits of technology

It achieves full coverage of embedded software input, reduces manual workload, improves defect detection rate, and ensures the comprehensiveness of software reliability testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116010231B_ABST
    Figure CN116010231B_ABST
Patent Text Reader

Abstract

The present application provides a reliability testing method and system for embedded software. The method includes: obtaining all input quantities and input quantity values of the embedded software; numerically segmenting the input quantity values of each input quantity based on the impact of the input quantity on the working state of the embedded software, and determining the specific input quantity values contained in each input quantity by using equivalence class partitioning; then looping through each specific input value contained in each input quantity, combining the specific input value in each input quantity with the specific input value in each of the remaining input quantities to obtain an input combination; inputting the input combination into the embedded software to obtain an output result; and determining whether any unexpected event occurs in the output result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of embedded software reliability testing, and in particular to a reliability testing method and system for embedded software. Background Art

[0002] During embedded software testing, assessing software reliability is crucial. In certain scenarios, rapid and comprehensive testing is required to identify potential defects. Defects can affect the software's operational state. While some defects simply slow down the software, more severe defects, such as system crashes, can render the software completely inoperable, leading to serious consequences. For example, a fire detection software crash could prevent a fire hazard from being detected in a timely manner.

[0003] Traditional embedded software testing primarily focuses on the software's requirements description and performs corresponding checks. This approach can prevent unmet requirements. However, if the requirements document is insufficient, the software has hidden flaws due to design issues, or user errors occur, there may be no corresponding test cases to verify the software's operation in these situations. This can allow hidden problems in the code to escape during testing, resulting in serious consequences on-site. Summary of the Invention

[0004] In view of this, the purpose of this application is to propose a reliability testing method and system for embedded software.

[0005] Based on the above objectives, this application provides an embedded software reliability testing method, including:

[0006] Obtaining the working status of the embedded software;

[0007] According to the influence of the input quantity of the embedded software on the working state of the embedded software, after numerical segmenting the input quantity value of each input quantity, using equivalence class division to determine the specific input quantity value included in each input quantity;

[0008] Looping through each of the specific input quantity values included in each of the input quantities, combining the specific input quantity value in each of the input quantities with the specific input quantity values in the remaining input quantities to obtain an input combination;

[0009] Inputting the input combination into the embedded software to obtain an output result;

[0010] It is determined whether an unexpected event occurs in the output result, wherein the unexpected event is obtained by analyzing the working process of the embedded software.

[0011] Optionally, the process of determining the specific input value is:

[0012] According to the influence of the input quantity of the embedded software on the working state of the embedded software, the input quantity value of each input quantity is numerically segmented to obtain multiple input quantity values contained in each input quantity;

[0013] Taking any one value in each segment of the multiple input value values in each of the input quantities, any one value in each segment of the input value constitutes the specific input value contained in each of the input quantities.

[0014] Optionally, the unexpected event is obtained by analyzing the working process of the embedded software using a software failure mode and effects analysis method SFMEA and a software fault tree analysis method SFTA.

[0015] Optionally, the embedded software is a fan controller;

[0016] The step of obtaining all input quantities of the embedded software is: obtaining an enabling switch voltage signal and a temperature sensor current signal;

[0017] The acquiring of all input values of the embedded software comprises: acquiring the input value of the enabling switch voltage signal and acquiring the input value of the temperature sensor current signal;

[0018] Acquiring the working status of the embedded software includes: acquiring the working status of the fan controller;

[0019] According to the influence of the input quantity of the embedded software on the working state of the embedded software, after the input quantity value is numerically segmented, the specific input quantity value contained in each input quantity is determined by using equivalence class division:

[0020] After numerically segmenting the enable switch voltage signal and the temperature sensor current signal based on the influence of the input quantity of the fan controller on the working state of the fan controller, specific input quantity values respectively included in the enable switch voltage signal and the temperature sensor current signal are determined by using equivalence class partitioning;

[0021] The looping through each of the specific input quantity values respectively included in each of the input quantities comprises: looping through each of the specific input quantity values respectively included in the enable switch voltage signal and the temperature sensor current signal respectively and sequentially at the same time;

[0022] The step of combining the specific input quantity value in each of the input quantities with the specific input quantity values in all other input quantities to obtain the input combination comprises: combining a single specific input quantity value in the enable switch voltage signal with a single specific input quantity value in the temperature sensor current signal to obtain the input combination;

[0023] The inputting the input combination into the embedded software to obtain an output result is as follows: inputting the input combination into the fan controller to obtain an output result;

[0024] Determine whether the unexpected event occurs in the output result, and the unexpected event is obtained by analyzing the working process of the embedded software: Determine whether the unexpected event occurs in the output result, and the unexpected event is obtained by analyzing the fan controller.

[0025] Optionally, the unexpected events include:

[0026] When the computer is frozen and the current signal of the temperature sensor is greater than the fan 2 starting value of the temperature sensor current signal, at least one of the fan 1 and the fan 2 is not turned on.

[0027] Optionally, the process of determining specific input values respectively included in the enabling switch voltage signal and the temperature sensor current signal includes:

[0028] The obtaining of the input value of the enabling switch voltage signal includes: obtaining a switch-on value of the enabling switch voltage signal and a switch-off value of the enabling switch voltage signal;

[0029] Acquiring an input value of the temperature sensor current signal, including: a value set from a minimum value of the temperature sensor current signal to a maximum value of the temperature sensor current signal;

[0030] According to the influence of the input quantity of the fan controller on the working state of the fan controller, the switch-on value and the switch-off value of the enable switch voltage signal are numerically segmented to obtain multiple segments of the enable switch voltage signal, including:

[0031] a switch-on value of the enabling switch voltage signal;

[0032] a switch-off value of the enabling switch voltage signal;

[0033] According to the influence of the input quantity of the fan controller on the working state of the fan controller, a set of values from the minimum value to the maximum value of the temperature sensor current signal is numerically segmented to obtain multiple segments of the temperature sensor current signal, including:

[0034] a fan-start value that is greater than or equal to the minimum value of the temperature sensor current signal and less than the fan-start value of the temperature sensor current signal;

[0035] Fan-on value of the temperature sensor current signal;

[0036] A fan 1 startup value greater than the temperature sensor current signal and a fan 2 startup value less than the temperature sensor current signal;

[0037] Fan 2 startup value of the temperature sensor current signal;

[0038] is greater than the fan 2 start value of the temperature sensor current signal and is less than or equal to the maximum value of the temperature sensor current signal;

[0039] Determining the specific input value of the enabling switch voltage signal by utilizing equivalence class partitioning includes:

[0040] Determine that the switch-on value of the enabling switch voltage signal is a specific input value of the enabling switch voltage signal;

[0041] Determine that the switch-off value of the enabling switch voltage signal is a specific input value of the enabling switch voltage signal;

[0042] Determining the specific input value of the temperature sensor current signal by utilizing equivalence class partitioning includes:

[0043] Using equivalence class division, a value is selected within the range of being greater than or equal to the minimum value of the temperature sensor current signal and less than a fan-start value of the temperature sensor current signal, as the first input value of the temperature sensor current signal;

[0044] Using a fan-start value of the temperature sensor current signal as a second input value of the temperature sensor current signal;

[0045] Using equivalence class division, a value is selected within the range of the fan 1 startup value greater than the temperature sensor current signal and the fan 2 startup value less than the temperature sensor current signal as the third input value of the temperature sensor current signal;

[0046] using the fan 2 startup value of the temperature sensor current signal as the fourth input value of the temperature sensor current signal;

[0047] By utilizing equivalence class partitioning, a value is selected within a range that is greater than the fan 2 startup value of the temperature sensor current signal and less than the maximum value of the temperature sensor current signal as the fifth input value of the temperature sensor current signal.

[0048] Optionally, the specific input values of the enabling switch voltage signal and the temperature sensor current signal include:

[0049] The specific input value of the enabling switch voltage signal includes:

[0050] Enable switch voltage signal switch on value; Enable switch voltage signal switch off value;

[0051] The specific input value of the temperature sensor current signal includes:

[0052] a first input value of a current signal of a temperature sensor;

[0053] a second input value of a current signal from a temperature sensor;

[0054] a third input value of a current signal of a temperature sensor;

[0055] a fourth input value of a current signal of a temperature sensor;

[0056] The fifth input value of the temperature sensor current signal.

[0057] Based on the same inventive concept, the present disclosure also provides an embedded software reliability testing system, comprising:

[0058] Main control computer module, input control module and output detection module;

[0059] The main control computer module obtains all input quantities and input quantity values of the embedded software, obtains the working state of the embedded software, and numerically segments the input quantity value of each input quantity according to the influence of the input quantity of the embedded software on the working state of the embedded software, and determines the specific input quantity value contained in each input quantity by using equivalence class division;

[0060] The main control computer module configures the input control module to simultaneously loop through each of the specific input values included in each of the input quantities, and combines a single specific input value in each of the input quantities with a single specific input value in each of the remaining input quantities to obtain an input combination;

[0061] After the input combination is input into the embedded software, the output control module collects the output result of the embedded software and sends the output result to the main control computer module;

[0062] The main control computer module records and analyzes the output results and determines whether any unexpected events occur in the output results.

[0063] Optionally, the connection between the main control computer module and the input control module or the output control module includes: peripheral component interface connection PCI, serial binary data exchange interface connection between data terminal equipment DTE and data communication equipment DCE RS-232, universal serial bus connection USB and Ethernet connection;

[0064] The main control computer module includes functions such as test scripts, input control, recording output results and analyzing output results.

[0065] Optionally, each of the input control modules corresponds to one of the input quantities;

[0066] Each of the input control modules correspondingly outputs each of the specific input quantity values included in the corresponding input quantity;

[0067] The running process of the test script includes:

[0068] Starting the embedded software reliability testing system;

[0069] The main control computer module obtains the input quantity and the input quantity value of the embedded software, obtains the working state of the embedded software, numerically segments the input quantity value of each input quantity according to the influence of the input quantity of the embedded software on the working state of the embedded software, and determines the specific input quantity value included in each input quantity by using equivalence class division;

[0070] Initializing the input control module and the output detection module;

[0071] Starting the embedded software;

[0072] Configuring the input control module to output the input combination;

[0073] inputting the input combination into the embedded software;

[0074] Configuring the output detection module to collect the output result output by the embedded software;

[0075] Configuring the main control computer module to record and analyze the output results;

[0076] If the cyclic traversal process in the input control module is not completed, the embedded software is closed and then restarted;

[0077] reconfiguring the input control module to output another input combination;

[0078] inputting the another input combination into the embedded software;

[0079] Configuring the output detection module to collect the other output result output by the embedded software;

[0080] configuring the main control computer module to record and analyze the other output result;

[0081] If the loop traversal process in the input control module is completed, the test script is terminated.

[0082] From the above description, it can be seen that the present application provides a reliability testing method and system for embedded software, which uses equivalence class partitioning to obtain specific input values, and then loops through each specific input value contained in each input quantity to obtain an input combination, inputs the input combination into the embedded software, and obtains an output result. The reliability of the embedded software is tested by judging whether there are unexpected events or other unexpected serious events in the output results.

[0083] This method segments the input value of each input quantity based on its impact on the software's working state, dividing the input value of each input quantity into multiple ranges. The input values in each range correspond to the same output result. Extracting a specific input value from each equivalence class can represent its corresponding range. Then, multiple specific input values can represent the input value range of the entire input quantity corresponding to it, achieving full coverage of the input values of all input quantities. The practice of replacing large-scale data with a small amount of data also effectively reduces the workload. In addition, this method uses the embedded software reliability test system to automatically loop through each specific input value contained in each input quantity. The final input combination encompasses all possible permutations and combinations of the specific input values of the input quantities and the specific input values of other input quantities, further achieving full coverage of software inputs and reducing a large amount of manual repetitive work in the process.

[0084] In summary, this embedded software reliability testing method and system can reduce manual repetitive work while also fully covering software inputs, effectively meeting the inspection of important software defects and improving the defect detection rate during software testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0085] In order to more clearly illustrate the technical solutions in this application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are merely embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0086] Figure 1 This is a flow chart of the embedded software reliability testing method according to an embodiment of the present application.

[0087] Figure 2 This is the embedded software reliability testing system structure of an embodiment of the present application.

[0088] Figure 3 This is a script flow chart of the embedded software reliability testing system according to an embodiment of the present application. DETAILED DESCRIPTION

[0089] In order to make the objectives, technical solutions and advantages of this application more clear, this application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0090] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the usual meanings understood by people with ordinary skills in the field to which this application belongs. The "first", "second" and similar words used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0091] As described in the background technology section, the embedded software reliability testing methods in related technologies usually perform corresponding testing work based on the software requirement description, but ignore possible inputs other than the software requirement inputs, resulting in blind spots when testing the embedded software reliability, causing problems hidden in the code to escape during the testing process, resulting in unpredictable serious consequences during use after the software is put into use.

[0092] Based on the above considerations, the present invention proposes a reliability testing method and system for embedded software. Based on the embedded software reliability testing system, the present invention automates the embedded software testing process. This application not only reduces manual repetitive work but also improves the defect detection rate during the software testing process.

[0093] The technical solutions of the embodiments of the present application are described in detail below through specific examples.

[0094] refer to Figure 1 The reliability testing method of embedded software according to one embodiment of the present application, taking a fan controller as an example, includes the following steps:

[0095] Step S101: Acquire all input quantities and input quantity values of the embedded software.

[0096] In this embodiment, the embedded software is a fan controller, and all of its inputs are an enable switch voltage signal and a temperature sensor current signal. The input values corresponding to the enable switch voltage signal are 20 volts (the switch-on value of the enable switch voltage signal) and 0 volts (the switch-off value of the enable switch voltage signal). The input value corresponding to the temperature sensor current signal is the set of values from the minimum value of the temperature sensor current signal to the maximum value of the temperature sensor current signal, which is [4, 20], expressed in milliamperes.

[0097] Step S102: Acquire the working status of the embedded software.

[0098] In this embodiment, obtaining the working status of the fan controller includes:

[0099] When the enable switch voltage signal is 0 volts, Fan 1 and Fan 2 will not start regardless of the value of the temperature sensor current signal;

[0100] When the enable switch voltage signal is 20 volts and the temperature sensor current signal is less than 10 mA and greater than 0 mA, both fan 1 and fan 2 are not started; when the temperature sensor current signal is greater than or equal to 10 mA and less than 15 mA, fan 1 is started; when the temperature sensor current signal is greater than or equal to 15 mA, both fan 1 and fan 2 are started;

[0101] Step S103, dividing the input value of each input quantity into numerical segments according to the influence of the input quantity of the embedded software on the working state of the embedded software, and determining the specific input value included in each input quantity by using equivalence class division;

[0102] In this embodiment, the input value of each fan controller is first segmented based on its impact on the operating state of the fan controller software, thereby obtaining multiple input value segments for each input. Equivalence class partitioning is then used to select any value from each of the multiple input value segments for each input, with each value from each segment constituting the specific input value for each input.

[0103] Taking a single embedded software input as an example, the input values corresponding to the input are segmented based on their impact on the embedded software's operating state. Each segment of input values represents a type of input to the embedded software. Furthermore, all input values within the same segment of input values, when input into the embedded software, produce the same type of output result. Therefore, this embodiment extracts a specific input value from a segment of input values to represent the segment of input values.

[0104] The same applies to the remaining input values of the remaining input quantities. A specific input value is taken as a representative. Finally, the input value of an input quantity changes from a range value to multiple segment values, and then to multiple point values. Each point value can represent the input value of the segment corresponding to the point value, and the combination can represent all the input values of the input quantity.

[0105] In addition, the equivalence class division method will not limit the actual input range and effectively reduce the workload.

[0106] In this embodiment, the embedded software is a fan controller, and this step is specifically embodied as follows:

[0107] According to the influence of the input of the fan controller on the working state of the fan controller, the input value of the enable switch voltage signal is numerically segmented to obtain the switch-on value 20 volts of the enable switch voltage signal and the switch-off value 0 volt of the enable switch voltage signal.

[0108] The switch-on value of the enable switch voltage signal is obtained by taking any value within the switch-on value range of the enable switch voltage signal, which is 20 volts.

[0109] The switch-off value of the enabling switch voltage signal is obtained by taking any value within the switch-off value range of the enabling switch voltage signal, which is 0 volt.

[0110] The specific input values of the enabling switch voltage signal are 0V and 20V.

[0111] According to the influence of the input quantity of the fan controller on the working state of the fan controller, the input value of the temperature sensor current signal is segmented to obtain:

[0112] A value set greater than or equal to the minimum value of the temperature sensor current signal and less than the fan start value of the temperature sensor current signal: [4, 10), unit: milliampere;

[0113] In this input value range, when the voltage signal of the fan controller's enable switch is 20 volts, the fan controller outputs fan 1 and fan 2 not starting;

[0114] Fan start value of temperature sensor current signal: 10 mA;

[0115] In this input value range, when the voltage signal of the fan controller's enable switch is 20 volts, the fan controller output is that fan 1 is started and fan 2 is not started;

[0116] Greater than the fan 1 start value of the temperature sensor current signal and less than the fan 2 start value of the temperature sensor current signal: (10, 15) Unit: mA;

[0117] In this input value range, when the fan controller's enable switch voltage signal is 20 volts, the fan controller output is that only fan 1 is started, and fan 2 is not started;

[0118] The fan 2 startup value of the temperature sensor current signal is 15 mA;

[0119] In this input value range, when the voltage signal of the fan controller's enable switch is 20 volts, the fan controller output is that fan one starts and fan two starts just right;

[0120] Greater than the fan 2 startup value of the temperature sensor current signal and less than or equal to the maximum value of the temperature sensor current signal: (15, 20], unit: mA;

[0121] Within this input value range, when the fan controller's enable switch voltage signal is 20 volts, the fan controller outputs both fan 1 and fan 2 as being started.

[0122] Using the equivalence class partitioning in the range [4, 10), the unit is milliampere, and any value is taken in the range to obtain the first input value of the temperature sensor current signal. In this embodiment, 4 milliamperes is taken.

[0123] Take any value within the range of "10 mA" to obtain the second input value of the temperature sensor current signal. In this embodiment, 10 mA is taken;

[0124] Using the equivalence class division in the range (10, 15) units: milliamperes, take any value to obtain the third input value of the temperature sensor current signal. In this embodiment, 12 milliamperes is taken;

[0125] Take any value within the range of "15 mA" to obtain the fourth input value of the temperature sensor current signal. In this embodiment, 15 mA is taken;

[0126] Using equivalence class division, take any value in the range of (15, 20], unit: mA, to obtain the fifth input value of the temperature sensor current signal. In this embodiment, 20 mA is taken.

[0127] In this embodiment, specific input values of the current signal of the temperature sensor are 4 mA, 10 mA, 12 mA, 15 mA, and 20 mA.

[0128] Step S104 , looping through each of the specific input quantity values contained in each of the input quantities, combining the specific input quantity value in each of the input quantities with the specific input quantity values in the remaining input quantities to obtain an input combination.

[0129] In this embodiment, the specific input values of the enable switch voltage signal are looped through, and the specific input values of the temperature sensor current signal are looped through. In one loop, one of the specific input values of the enable switch voltage signal is combined with one of the specific input values of the temperature sensor current signal. This combination is one of all input combinations. Taking the specific input value of the enable switch voltage signal as looped to 0 volts and the specific input value of the temperature sensor current signal as looped to 4 milliamperes as an example, the input combination composed of the two is (0 volts, 4 milliamperes).

[0130] All input combinations in this embodiment are: (0 V, 4 mA), (0 V, 10 mA), (0 V, 12 mA), (0 V, 15 mA), (0 V, 20 mA), (20 V, 4 mA), (20 V, 10 mA), (20 V, 12 mA), (20 V, 15 mA), (20 V, 20 mA).

[0131] Step S105: input the input combination into the embedded software to obtain an output result.

[0132] In this embodiment, in one cycle, an input combination formed by combining the two specific input values of the two input quantities in step S103 is input into the fan controller to obtain the corresponding on or off status of fan 1 and fan 2.

[0133] Step S106 , determining whether any unexpected event occurs in the output result, wherein the unexpected event is obtained by analyzing the working process of the embedded software.

[0134] In this embodiment, it is determined whether an unexpected event occurs in the output result obtained after the combination input fan controller in the above step S104 is input. The unexpected events in this embodiment include a freeze and when the temperature sensor current signal is greater than the fan 2 start value of the temperature sensor current signal, at least one of the fan 1 and the fan 2 does not turn on.

[0135] This unexpected event was obtained by analyzing the working process of the fan controller using the software failure mode and effects analysis method SFMEA and the software fault tree analysis method SFTA.

[0136] The working process of the fan controller is as follows: when the enable switch voltage signal is 0 volts, no matter what the temperature sensor current signal is, fan 1 and fan 2 will not start;

[0137] When the enable switch voltage signal is 20 volts and the temperature sensor current signal is less than 10 mA and greater than or equal to 4 mA, both fan 1 and fan 2 are not started; when the temperature sensor current signal is greater than or equal to 10 mA and less than 15 mA, fan 1 is started and fan 2 is not started; when the temperature sensor current signal is greater than or equal to 15 mA, both fan 1 and fan 2 are started.

[0138] This embodiment implements a reliability test for a fan controller. First, the influence of each input quantity on the working state of the fan controller is analyzed, and the input values of the enable switch voltage signal and the temperature sensor current signal of the fan controller are numerically segmented to obtain multiple input value ranges. Then, equivalence class division is used to extract a specific input value from each input value range of the enable switch voltage signal to represent its corresponding input value range. The input value of the temperature sensor current signal is processed in the same manner as above. Each specific input value extracted here corresponds to an input value range, and the output results of the input values in each input value range when input into the fan controller are the same.

[0139] In the past testing process, technical personnel in this field usually obtain specific input values in the general use process of embedded software based on the requirements description of the software, and then input them one by one into the software to be tested, obtain the output results and then analyze them. The specific input values obtained by this method generally cannot represent all the input ranges of the embedded software to be tested, and it is easy to ignore possible inputs outside the software requirements input, resulting in blind spots when detecting the reliability of the embedded software, causing problems hidden in the code to escape during the testing process, and unpredictable serious consequences may occur during use. However, the present application uses multiple specific input values to represent the range of input values of the corresponding entire input quantity. It replaces large-scale data with a small amount of data, which can effectively reduce the workload, and the set of all input value ranges is the input value. Therefore, it also achieves full coverage of the input values of all input quantities, meets the inspection of important software defects, and improves the detection rate of defects in the software testing process.

[0140] After obtaining the specific input values, the embedded software reliability testing system automatically cycles through the specific input values of the enable switch voltage signal and the temperature sensor current signal, outputting them and combining them into input combinations. After multiple cycles, the input combinations can traverse all possible permutations of the specific input values of the enable switch voltage signal and the specific input values of the temperature sensor current signal. In the past, this process of embedded software reliability testing was mostly done manually, with the corresponding test data being manually entered into the software under test. This system fully automates this process, effectively reducing the manual workload.

[0141] In summary, this embedded software reliability testing method and system can reduce manual repetitive work while achieving full coverage of software inputs, thereby satisfying the inspection of important software defects and improving the defect detection rate during software testing.

[0142] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a reliability testing system for embedded software.

[0143] like Figure 2 As shown, the reliability testing system of embedded software includes a main control computer module S201, an input control module S202 and an output detection module S203;

[0144] The main control computer module S201 obtains all input quantities and input quantity values of the embedded software, obtains the working status of the embedded software, and numerically segments the input quantity value of each input quantity according to the impact of the input quantity of the embedded software on the working status of the embedded software. Then, the specific input quantity value contained in each input quantity is determined by using equivalence class division.

[0145] In this embodiment, the main control computer module obtains the input quantity and input value of the fan controller, obtains the working status of the fan controller, and numerically segments the input value of each input quantity according to the impact of the input quantity of the fan controller on the working status of the fan controller. Then, the specific input value contained in each input quantity is determined by using equivalence class division.

[0146] The main control computer module S201 configures the input control module S202 to simultaneously loop through each of the specific input values contained in each of the input quantities, and combines a single specific input value in each of the input quantities with a single specific input value in each of the remaining input quantities to obtain an input combination.

[0147] In this embodiment, the input control module S202 includes an enabling switch voltage signal input control module and a temperature sensor current signal input control module. The enabling switch voltage signal input control module outputs two specific input values of 0V and 20V in sequence and in a cycle. The temperature sensor current signal input control module outputs five specific input values of 4 mA, 10 mA, 12 mA, 15 mA and 20 mA in sequence and in a cycle. A voltage signal output by the enabling switch voltage signal input control module and a voltage signal output by the temperature sensor current signal input control module constitute an input combination.

[0148] After the input combination formed above is input into the embedded software, the output control module S202 collects the output result of the embedded software and sends the output result to the main control computer module S201.

[0149] In this embodiment, after the input combination formed above is input into the fan controller, the output control module S202 collects the output result of the fan controller and sends the output result to the main control computer module S201.

[0150] The main control computer module S201 records and analyzes the output results and determines whether any unexpected events occur in the output results.

[0151] In this embodiment, the main control computer module S201 is connected to the fan controller via serial communication. The main control computer module S201 sends a time query instruction in a 5-second period. Under normal circumstances, the main control computer module S201 will obtain feedback within 2 seconds.

[0152] In this embodiment, unexpected events include a freeze and when the temperature sensor current signal is greater than the fan 2 start value of the temperature sensor current signal, at least one of the fan 1 and the fan 2 does not turn on, and the freeze is when the time point of the time query instruction and the time point of obtaining feedback exceed 2 seconds.

[0153] Optionally, the connection between the main control computer module and the input control module or the output control module includes: peripheral component interface connection PCI, serial binary data exchange interface connection between data terminal equipment DTE and data communication equipment DCE RS-232, universal serial bus connection USB and Ethernet connection;

[0154] The main control computer module includes the following functions: testing scripts, input control, recording output results and analyzing output results;

[0155] Optionally, each of the input control modules corresponds to one of the input quantities;

[0156] Each of the input control modules correspondingly outputs each of the specific input quantity values included in the corresponding input quantity;

[0157] like Figure 3 As shown, the running process of the test script includes:

[0158] Step S301: start the embedded software reliability testing system.

[0159] In this step, the main control computer module obtains the input quantity and the input quantity value of the embedded software, obtains the working status of the embedded software, and numerically segments the input quantity value of each input quantity according to the impact of the input quantity of the embedded software on the working status of the embedded software. Then, the specific input quantity value contained in each input quantity is determined by using equivalence class division.

[0160] Step S302: Initialize the input control module and the output detection module.

[0161] In this embodiment, the input control module includes an enable switch voltage signal input control module and a temperature sensor current signal input control module.

[0162] Step S303: Start the embedded software.

[0163] In this embodiment, starting the embedded software is starting the fan controller.

[0164] Step S304: configure input combination.

[0165] In this step, the main control computer module configures the input control module to output specific input values to form an input combination.

[0166] In this embodiment, the main control computer module is configured to enable the switch voltage signal input control module to output one of the specific input values of the enable switch voltage signal, and is configured to configure the temperature sensor current signal input control module to output one of the specific input values of the temperature sensor current signal. The specific input values of the two input quantities are combined into a group of input combinations.

[0167] Step S305: input the input combination into the embedded software.

[0168] In this embodiment, the input combination formed in step S304 is input into the fan controller.

[0169] Step S306: Collect and output results.

[0170] In this step, the main control computer module configures the output detection module to collect the output results of the embedded software.

[0171] In this embodiment, the main control computer module is configured with an output detection module to collect output results of the fan controller.

[0172] Step S307: record the input combination and the analysis output result.

[0173] In this step, the main control computer module records the input combination formed in step S304, and records and analyzes the output result of the embedded software collected by the output detection module in step S306.

[0174] Step S308: Check the input combination cycle.

[0175] In this step, the main control computer checks whether the input combinations recorded in step S307 have traversed all possible permutations and combinations of the specific input value of each input quantity and the specific input value of other input quantities.

[0176] If the input combination cycle in step S308 is completed, the process proceeds to step S310; if the cycle is not completed, the process proceeds to step S309.

[0177] After continuing to step S309, the next loop will be entered, starting from step S303 and proceeding to step S308 to perform the next check on the input combination loop.

[0178] Step S309: close the embedded software.

[0179] In this step, the purpose is to reset the embedded software and clear the cache to facilitate the next cycle test.

[0180] In this embodiment, the fan controller is turned off.

[0181] Step S310, end.

[0182] It is understandable that the above script is only one way to implement the above steps. In actual applications, this process can also be implemented through other hardware or software methods. It is only presented here in the form of a script as one of many specific embodiments.

[0183] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. Within the scope of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.

[0184] In addition, for simplicity of description and discussion, and in order not to make the embodiment of the application difficult to understand, the known power supply / ground connection with integrated circuit (IC) chip and other components may or may not be shown in the accompanying drawings provided. In addition, the device can be shown in the form of a block diagram to avoid making the embodiment of the application difficult to understand, and this also takes into account the following fact, that is, the details of the embodiment of these block diagram devices are highly dependent on the platform to be implemented in the embodiment of the application (that is, these details should be fully within the scope of understanding of those skilled in the art). When specific details (for example, circuit) are set forth to describe exemplary embodiments of the application, it will be apparent to those skilled in the art that the embodiment of the application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.

[0185] Although the present invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may utilize the embodiments discussed.

[0186] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of this application.

Claims

1. A method for testing the reliability of embedded software, comprising: Obtaining all input quantities and input quantity values of the embedded software; Obtaining the working status of the embedded software; According to the influence of the input quantity of the embedded software on the working state of the embedded software, after numerical segmenting the input quantity value of each input quantity, using equivalence class division to determine the specific input quantity value included in each input quantity; Looping through each of the specific input quantity values included in each of the input quantities, combining the specific input quantity value in each of the input quantities with the specific input quantity values in the remaining input quantities to obtain an input combination; Inputting the input combination into the embedded software to obtain an output result; Determining whether an unexpected event occurs in the output result, wherein the unexpected event is obtained by analyzing the working process of the embedded software; The specific input value is determined as follows: According to the influence of the input quantity of the embedded software on the working state of the embedded software, the input quantity value of each input quantity is numerically segmented to obtain multiple input quantity values contained in each input quantity; Taking any one value in each segment of the multiple input value values in each of the input quantities, any one value in each segment of the input value constitutes the specific input value contained in each of the input quantities.

2. The method according to claim 1, characterized in that The unexpected events are obtained by analyzing the working process of the embedded software using the software failure mode and effects analysis method SFMEA and the software fault tree analysis method SFTA.

3. The method according to claim 1, characterized in that The embedded software is a fan controller; The step of obtaining all input quantities of the embedded software is: obtaining an enabling switch voltage signal and a temperature sensor current signal; The acquiring of all input values of the embedded software comprises: acquiring the input value of the enabling switch voltage signal and acquiring the input value of the temperature sensor current signal; Acquiring the working status of the embedded software includes: acquiring the working status of the fan controller; According to the influence of the input quantity of the embedded software on the working state of the embedded software, after the input quantity value is numerically segmented, the specific input quantity value contained in each input quantity is determined by using equivalence class division: After numerically segmenting the enable switch voltage signal and the temperature sensor current signal based on the influence of the input quantity of the fan controller on the working state of the fan controller, specific input quantity values respectively included in the enable switch voltage signal and the temperature sensor current signal are determined by using equivalence class partitioning; The looping through each of the specific input quantity values respectively included in each of the input quantities comprises: looping through each of the specific input quantity values respectively included in the enable switch voltage signal and the temperature sensor current signal respectively; The step of combining the specific input quantity value in each of the input quantities with the specific input quantity values in all other input quantities to obtain the input combination comprises: combining a single specific input quantity value in the enable switch voltage signal with a single specific input quantity value in the temperature sensor current signal to obtain the input combination; The inputting the input combination into the embedded software to obtain an output result is as follows: inputting the input combination into the fan controller to obtain an output result; Determine whether the unexpected event occurs in the output result, and the unexpected event is obtained by analyzing the working process of the embedded software: Determine whether the unexpected event occurs in the output result, and the unexpected event is obtained by analyzing the fan controller.

4. The method according to claim 3, characterized in that The undesirable events include: When the computer is frozen and the current signal of the temperature sensor is greater than the fan 2 starting value of the temperature sensor current signal, at least one of the fan 1 and the fan 2 is not turned on.

5. The method according to claim 3, characterized in that The process of determining the specific input values respectively included in the enabling switch voltage signal and the temperature sensor current signal includes: Acquiring the input value of the enabling switch voltage signal includes: acquiring a switch-on value of the enabling switch voltage signal and a switch-off value of the enabling switch voltage signal; Acquiring the input value of the temperature sensor current signal, including: acquiring a value set from the minimum value of the temperature sensor current signal to the maximum value of the temperature sensor current signal; According to the influence of the input quantity of the fan controller on the working state of the fan controller, the switch-on value and the switch-off value of the enable switch voltage signal are numerically segmented to obtain multiple segments of the enable switch voltage signal, including: a switch-on value of the enabling switch voltage signal; a switch-off value of the enabling switch voltage signal; According to the influence of the input quantity of the fan controller on the working state of the embedded software, a set of values from the minimum value to the maximum value of the temperature sensor current signal is numerically segmented to obtain multiple segments of the temperature sensor current signal, including: a fan-start value that is greater than or equal to the minimum value of the temperature sensor current signal and less than the fan-start value of the temperature sensor current signal; Fan-on value of the temperature sensor current signal; A fan 1 startup value greater than the temperature sensor current signal and a fan 2 startup value less than the temperature sensor current signal; Fan 2 startup value of the temperature sensor current signal; is greater than the fan 2 start value of the temperature sensor current signal and is less than or equal to the maximum value of the temperature sensor current signal; Determining the specific input value of the enabling switch voltage signal by utilizing equivalence class partitioning includes: Determining, by equivalence class partitioning, that the switch-on value of the enabling switch voltage signal is a specific input value of the enabling switch voltage signal; Determining, by using equivalence class partitioning, that the switch-off value of the enabling switch voltage signal is a specific input value of the enabling switch voltage signal; Determining the specific input value of the temperature sensor current signal by utilizing equivalence class partitioning includes: Using equivalence class division, a value is selected within the range of being greater than or equal to the minimum value of the temperature sensor current signal and less than a fan-start value of the temperature sensor current signal, as the first input value of the temperature sensor current signal; Using equivalence class partitioning to take a fan-start value of the temperature sensor current signal as a second input value of the temperature sensor current signal; Using equivalence class division, a value is selected within the range of the fan 1 startup value greater than the temperature sensor current signal and the fan 2 startup value less than the temperature sensor current signal as the third input value of the temperature sensor current signal; Using equivalence class partitioning to take the fan 2 startup value of the temperature sensor current signal as the fourth input value of the temperature sensor current signal; By utilizing equivalence class partitioning, a value is selected within a range that is greater than the fan 2 startup value of the temperature sensor current signal and less than the maximum value of the temperature sensor current signal as the fifth input value of the temperature sensor current signal.

6. The method according to claim 3, characterized in that The specific input values of the enabling switch voltage signal and the temperature sensor current signal include: The specific input value of the enabling switch voltage signal includes: Enable switch voltage signal switch on value; Enable switch voltage signal switch off value; The specific input value of the temperature sensor current signal includes: a first input value of a current signal of a temperature sensor; a second input value of a current signal from a temperature sensor; a third input value of a current signal of a temperature sensor; a fourth input value of a current signal from a temperature sensor; The fifth input value of the temperature sensor current signal.

7. An embedded software reliability testing system comprising: Main control computer module, input control module and output detection module; The main control computer module obtains all input quantities and input quantity values of the embedded software, obtains the working state of the embedded software, and numerically segments the input quantity value of each input quantity according to the influence of the input quantity of the embedded software on the working state of the embedded software, and determines the specific input quantity value contained in each input quantity by using equivalence class division; The main control computer module configures the input control module to simultaneously loop through each of the specific input values included in each of the input quantities, and combines a single specific input value in each of the input quantities with a single specific input value in each of the remaining input quantities to obtain an input combination; After the input combination is input into the embedded software, the output control module collects the output result of the embedded software and sends the output result to the main control computer module; The main control computer module records and analyzes the output results and determines whether any unexpected events occur in the output results; The specific input value is determined as follows: According to the influence of the input quantity of the embedded software on the working state of the embedded software, the input quantity value of each input quantity is numerically segmented to obtain multiple input quantity values contained in each input quantity; Taking any one value in each segment of the multiple input value values in each of the input quantities, any one value in each segment of the input value constitutes the specific input value contained in each of the input quantities.

8. The system according to claim 7, characterized in that The connection between the main control computer module and the input control module or the output control module includes: peripheral component interface connection PCI, serial binary data exchange interface connection between data terminal equipment DTE and data communication equipment DCE RS-232, universal serial bus connection USB and Ethernet connection; The main control computer module includes functions such as test scripts, input control, recording output results and analyzing output results.

9. The system according to claim 8, characterized in that Each of the input control modules corresponds to one of the input quantities; Each of the input control modules correspondingly outputs each of the specific input quantity values included in the corresponding input quantity; The running process of the test script includes: Starting the embedded software reliability testing system; The main control computer module obtains the input quantity and the input quantity value of the embedded software, obtains the working state of the embedded software, numerically segments the input quantity value of each input quantity according to the influence of the input quantity of the embedded software on the working state of the embedded software, and determines the specific input quantity value included in each input quantity by using equivalence class division; Initializing the input control module and the output detection module; Starting the embedded software; Configuring the input control module to output the input combination; inputting the input combination into the embedded software; Configuring the output detection module to collect the output result output by the embedded software; Configuring the main control computer module to record the input combination and record and analyze the output result; If the cyclic traversal process in the input control module is not completed, the embedded software is closed and then restarted; reconfiguring the input control module to output another input combination; inputting the another input combination into the embedded software; Configuring the output detection module to collect another output result output by the embedded software; Configuring the main control computer module to record the other input combination and record and analyze the other output result; If the loop traversal process in the input control module is completed, the test script is terminated.

Citation Information

Patent Citations

  • Automatic experimental device and method for reliability growth test of embedded software

    CN102402484A

  • Test case processing method and device

    CN109491917A