CN-122019377-A - Method and system for testing embedded computer software
Abstract
The invention relates to the technical field of software testing, in particular to an embedded computer software testing method and system. The method comprises the steps of obtaining software data to be tested and test code data, carrying out software initial test on the software data to be tested by utilizing the test code data to obtain a test initial result, carrying out quantitative analysis on the test initial result to determine test integrity, comparing the test integrity with preset integrity to obtain an integrity comparison result, determining a test strategy scheme based on the integrity comparison result, the software data to be tested and a preset test strategy model, and carrying out test on the software data to be tested by utilizing the test code data and the test strategy scheme to obtain a test result. According to the invention, the software data to be tested is tested, so that the accuracy and the effectiveness of the test are improved, and the quality and the efficiency of the test are finally improved.
Inventors
- ZHANG XUEGANG
- LI QIANWEN
- LI CHENGPING
Assignees
- 广东食品药品职业学院
- 广州市真志电子科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260127
Claims (10)
- 1. An embedded computer software testing method, comprising: Acquiring software data to be tested and test code data; Performing software initial test on the software data to be tested by using the test code data to obtain a test initial result; performing quantitative analysis on the initial test result to determine the test integrity; comparing the test integrity with a preset integrity to obtain an integrity comparison result; Determining a test strategy scheme based on the integrity comparison result, the software data to be tested and a preset test strategy model; and testing the software data to be tested by using the test code data and the test strategy scheme to obtain a test result.
- 2. The embedded computer software testing method of claim 1, wherein the step of obtaining software data under test and test code data comprises: Acquiring software data to be tested; after the data type of the software data to be tested is judged, determining a hardware test platform matched with the software data to be tested; and acquiring test code data from a preset test database based on the hardware test platform and the software data to be tested.
- 3. The method for testing software of an embedded computer according to claim 1, wherein the step of performing a software initial test on the software data to be tested using the test code data to obtain a test initial result comprises: grouping the test code data to obtain each group of code sub-data; And respectively carrying out software initial test on the software data to be tested by utilizing each group of code sub-data to obtain a test initial result.
- 4. The method for testing software of embedded computer according to claim 3, wherein after the step of performing the software initial test on the software data to be tested by using each group of code sub-data to obtain the initial test result, further comprising: determining each group of test results in the test initial results; carrying out state judgment on each group of test results to obtain test state results; if the test state result indicates that the test fails, the corresponding group of code sub-data in the test code data is replaced and then retested.
- 5. The embedded computer software testing method of claim 1, wherein the step of quantitatively analyzing the initial test results to determine test integrity comprises: determining all quantization indexes including code coverage, defect density, execution passing rate and demand coverage based on the test initial result; carrying out quantization analysis on each quantization index to determine the integrity of each index and the weight of each index; And comprehensively processing each index integrity and each index weight to determine the test integrity.
- 6. The embedded computer software testing method of claim 5, wherein after the step of performing a quantization analysis on each quantization index to determine each index integrity and each index weight, further comprising: Determining an index difference rate between each index integrity and a corresponding preset index integrity; Performing abnormal index judgment on the index difference rate, and determining an abnormal index result; if the indicator integrity in the abnormal indicator results is not qualified, the software initial test is carried out on the software data to be tested by utilizing the re-acquired test code data after the test code data are re-acquired.
- 7. The method of testing embedded computer software according to claim 1, wherein comparing the test integrity with a predetermined integrity to obtain an integrity comparison result comprises: comparing the test integrity with a preset integrity to obtain an integrity difference; and after confirming the absolute value of the integrity difference value, obtaining an integrity comparison result.
- 8. The embedded computer software testing method of claim 1, wherein the step of determining a test strategy scheme based on the integrity comparison result, the software data to be tested, and a preset test strategy model comprises: determining a software type and a software data amount based on the software data to be detected; And carrying out scheme matching in a preset test strategy model by using a software type, a software data amount and an integrity comparison result, and determining a test strategy scheme.
- 9. The embedded computer software testing method of claim 8, wherein the step of determining the test strategy scheme is followed by performing scheme matching in a preset test strategy model using the comparison result of the software type, the software data amount and the integrity degree: Performing verification judgment on the test strategy scheme to determine a scheme judgment result; If the verification is not qualified in the scheme judging result, a scheme confirmation abnormal prompt is sent out.
- 10. An embedded computer software testing system for application to the embedded computer software testing method of any one of claims 1 to 9, comprising: The data acquisition module is used for acquiring software data to be tested and test code data; the initial test module is used for carrying out software initial test on the software data to be tested by utilizing the test code data to obtain a test initial result; the quantitative analysis module is used for quantitatively analyzing the initial test result and determining the test integrity; The result comparison module is used for comparing the test integrity with a preset integrity to obtain an integrity comparison result; the scheme determining module is used for determining a test strategy scheme based on the integrity comparison result, the software data to be tested and a preset test strategy model; and the result testing module is used for testing the software data to be tested by utilizing the test code data and the test strategy scheme to obtain a test result.
Description
Method and system for testing embedded computer software Technical Field The invention relates to the technical field of software testing, in particular to an embedded computer software testing method and system. Background The embedded computer software is an operating system and development tool software embedded in hardware, and is inseparable from the embedded system, and is typically composed of an embedded microprocessor, peripheral hardware devices, an embedded operating system, and application programs of a user . The embedded software is based on an embedded system design, and is composed of programs and documents thereof, and is used for realizing functions such as control, monitoring or management of other devices. The embedded computer software test is a key link for ensuring the functions, performance and safety of the embedded system, and at present, the method for testing the embedded computer product software mainly adopts a static test method and an embedded software test under a digital simulation environment. However, in the software testing process, the static detection method has low coverage rate of the embedded computer software, is difficult to analyze the condition of the code in actual running, is required to be deeply integrated with a specific hardware platform (such as a microprocessor, a sensor and an actuator) in the digital simulation environment, is difficult to cover boundary conditions, has low defect detection rate, and is difficult to effectively test the embedded computer software by the existing test method, so that the test efficiency and the test accuracy are low. Disclosure of Invention The invention aims to provide a method and a system for testing embedded computer software, which solve the problems that the existing testing method is difficult to effectively test the embedded computer software, and the testing efficiency and the testing accuracy are low. In order to achieve the above object, the present invention provides a method for testing embedded computer software, comprising: Acquiring software data to be tested and test code data; Performing software initial test on the software data to be tested by using the test code data to obtain a test initial result; performing quantitative analysis on the initial test result to determine the test integrity; comparing the test integrity with a preset integrity to obtain an integrity comparison result; Determining a test strategy scheme based on the integrity comparison result, the software data to be tested and a preset test strategy model; and testing the software data to be tested by using the test code data and the test strategy scheme to obtain a test result. The step of obtaining the software data to be tested and the test code data comprises the following steps: Acquiring software data to be tested; after the data type of the software data to be tested is judged, determining a hardware test platform matched with the software data to be tested; and acquiring test code data from a preset test database based on the hardware test platform and the software data to be tested. The method for testing the software data to be tested by using the test code data comprises the following steps of: grouping the test code data to obtain each group of code sub-data; And respectively carrying out software initial test on the software data to be tested by utilizing each group of code sub-data to obtain a test initial result. The method comprises the steps of respectively carrying out software initial test on software data to be tested by utilizing each group of code sub-data to obtain a test initial result, and further comprises the following steps: determining each group of test results in the test initial results; carrying out state judgment on each group of test results to obtain test state results; if the test state result indicates that the test fails, the corresponding group of code sub-data in the test code data is replaced and then retested. The step of quantitatively analyzing the initial test result and determining the test integrity comprises the following steps: determining all quantization indexes including code coverage, defect density, execution passing rate and demand coverage based on the test initial result; carrying out quantization analysis on each quantization index to determine the integrity of each index and the weight of each index; And comprehensively processing each index integrity and each index weight to determine the test integrity. The method further comprises the following steps after the step of carrying out quantization analysis on each quantization index and determining the integrity of each index and the weight of each index: Determining an index difference rate between each index integrity and a corresponding preset index integrity; Performing abnormal index judgment on the index difference rate, and determining an abnormal index result; if the indicator integrity in the abnormal indicator r