CN114741289A - Automatic generation method and system of test case for controller software storage function - Google Patents
Automatic generation method and system of test case for controller software storage function Download PDFInfo
- Publication number
- CN114741289A CN114741289A CN202210333567.5A CN202210333567A CN114741289A CN 114741289 A CN114741289 A CN 114741289A CN 202210333567 A CN202210333567 A CN 202210333567A CN 114741289 A CN114741289 A CN 114741289A
- Authority
- CN
- China
- Prior art keywords
- list
- signal
- stored
- application layer
- reading
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 30
- 238000000034 method Methods 0.000 title claims abstract description 26
- 230000002452 interceptive effect Effects 0.000 claims abstract description 13
- 230000003993 interaction Effects 0.000 claims abstract description 10
- 238000004140 cleaning Methods 0.000 claims abstract description 8
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3696—Methods or tools to render software testable
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention relates to an automatic generation method and system of a test case aiming at the storage function of controller software, wherein the method comprises the following steps: calling a bottom application layer interactive list; reading signals needing to be stored in an EEPROM list in a bottom application layer interaction list; finding out a corresponding calibration quantity in the input interface cleaning list through the name of a signal needing to be stored in the EEPROM list; setting the power-down and power-up processes of the controller; assigning the calibration quantity; reading a reading signal corresponding to a signal to be stored in an EEPROM list in a bottom application layer interaction list; and setting an expected result for the read signal according to the value assigned by the calibration quantity corresponding to the signal to be stored. The method and the device have the advantages that the generation efficiency and the quality of the test cases aiming at the storage function of the controller software are high.
Description
Technical Field
The invention belongs to the technical field of automobile controller testing, and particularly relates to an automatic generation technology of a test case for a software storage function of a controller.
Background
The method for testing the storage function of the controller software comprises the following steps: firstly, calibrating the interface signal value sent to the bottom layer by the application layer. And secondly, the bottom layer receives the relevant interface signal value, then the controller is powered off, and in the power-off process of the controller, the bottom layer stores the interface value into the EEPROM. And thirdly, after the storage is finished, the controller finishes powering off and sleeping. And fourthly, after the controller is powered on again, the bottom layer reads the value in the EEPROM and assigns the value to a relevant signal of an application layer, and whether the storage function is correct is confirmed by observing the display quantity at an interface of the application layer.
The design method of the test case comprises the following steps: firstly, a calibration quantity of a stored signal is found, and manual assignment is carried out according to the requirements of the signal such as the precision range and the like; secondly, finding the display quantity of the signals to be read; and finally, filling in an expected result of the value of the read signal to complete the design of the test case of the storage function of the controller software.
The method for designing the use case has the advantages that workload for searching the standard quantity of the signals to be stored and the display quantity of the signals to be read is large, mistakes are easy to find, and Bug leakage is caused by the fact that misjudgment is easy to occur during assignment.
Disclosure of Invention
The invention aims to provide a method and a system for automatically generating a test case aiming at the storage function of controller software, which solve the technical problems that: the workload of artificially carrying out signal assignment and then filling and writing an expected result is large, so that Bug leakage caused by misjudgment is easy to occur, and the test case is poor in design quality and low in efficiency.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a method for automatically generating a test case aiming at a storage function of controller software comprises the following steps:
s01: calling a bottom application layer interactive list;
s02: reading signals needing to be stored in an EEPROM list in the bottom application layer interactive list;
s03: finding out a corresponding calibration quantity in an input interface cleaning list according to the name of a signal needing to be stored in the EEPROM list;
s04: setting the power-down and power-up processes of the controller;
s05: assigning the calibration quantity;
s06: reading a reading signal corresponding to a signal to be stored in an EEPROM list in the bottom application layer interactive list;
s07: and setting an expected result for the read signal according to the value assigned by the calibration quantity corresponding to the signal needing to be stored.
Preferably, in the S05, the calibration quantity is assigned according to the precision and range in the bottom application layer.
The invention also provides an automatic generation system of the test case aiming at the storage function of the controller software, which comprises the following steps:
the calling module is used for calling a bottom application layer interactive list;
the first reading module is used for reading signals needing to be stored in an EEPROM list in the bottom application layer interaction list;
the searching module is used for finding the corresponding calibration quantity in the input interface cleaning list through the name of the signal needing to be stored in the EEPROM list;
the first setting module is used for setting the power-down and power-up processes of the controller;
the assignment module is used for assigning the calibration quantity;
the second reading module is used for reading a reading signal corresponding to a signal needing to be stored in an EEPROM list in the bottom application layer interaction list;
and the second setting module is used for setting an expected result for the read signal according to the value assigned by the calibration quantity corresponding to the signal to be stored.
Preferably, in the assignment module, the scalar quantity is assigned according to the precision and the range in the bottom application layer.
By adopting the technical scheme, the invention has the following beneficial technical effects: the invention can automatically find the calibration quantity of the storage signal and the display quantity of the reading signal, automatically carry out assignment according to the precision and the range of the storage signal, and fill in an expected result at the position of the response of the test case. The method can automatically generate the test case of the storage function of the controller software, and the generated test case of the storage function of the controller software can be directly used on a test tool, thereby improving the working efficiency of designing the test case of the storage function of the controller software and the working efficiency and the correctness when the test of the storage function of the controller software is carried out, and ensuring the accuracy of the test of the storage function of the controller software.
Drawings
FIG. 1 is a schematic flow chart of automatically searching for a storage signal and assigning a value;
fig. 2 is a schematic flow chart of automatically searching for a read signal and filling in a desired result.
Detailed Description
The invention will be further described with reference to the accompanying drawings.
The invention automatically generates the test case based on the script.
Step one, opening a test case to automatically generate a script.
And secondly, adding the local paths of the application layer bottom layer interaction list and the input interface cleaning list into the script, and determining the signal name of the stored signal, the signal name of the read signal, the precision and the range of the signal, and finding out the calibration quantity corresponding to the stored signal.
And thirdly, adding the path of the test case to be stored into the script.
And fourthly, automatically completing the processes of assigning values to the standard quantities of the stored signals and filling in expected results by the test case automatic generation script.
And fifthly, running the test case to automatically generate a script and automatically generating the test case of the storage function of the controller software.
And sixthly, automatically storing the test case to the set path.
The invention provides an automatic generation method of a test case aiming at the storage function of controller software based on the script, which comprises the following steps:
the first step is to call a bottom application layer interactive list.
And secondly, reading signals needing to be stored in an EEPROM list in the interactive list of the bottom application layer.
And thirdly, finding out the corresponding calibration quantity in the input interface cleaning list through the name of the signal needing to be stored in the EEPROM list.
And fourthly, setting the power-off and power-on processes of the controller.
And fifthly, assigning values to the standard quantities.
And sixthly, reading a reading signal corresponding to a signal needing to be stored in the EEPROM list in the bottom application layer interaction list.
And seventhly, setting an expected result for the read signal according to the value assigned by the calibration quantity corresponding to the signal required to be stored.
Specifically, in the fifth step, the scalar quantity is assigned according to the precision and scope in the underlying application layer.
Specifically, as shown in fig. 1, the method for automatically searching the calibration quantity of the storage signal and assigning the value includes the steps of: the first step is to call a bottom application layer interactive list. And secondly, reading the content of the EEPROM work in the interactive list of the bottom application layer. And thirdly, finding out the corresponding calibration quantity in the input interface cleaning list through the signal name required to be stored in the EEPROM. And fourthly, automatically assigning the nominal quantity according to the definition of precision, range and the like in the bottom application layer, and setting the power-off and power-on processes of the controller.
Specifically, as shown in fig. 2, the steps of the method for automatically searching the read signal and filling the read signal with the expected result are as follows: the first step is to call a bottom application layer interactive list. And secondly, reading the content in the EEPROM working page in the interactive list of the bottom application layer. And thirdly, finding out the corresponding read signal by storing the name of the signal. And fourthly, setting an expected result for the read signal according to the value assigned to the calibration quantity of the stored signal.
Claims (4)
1. A method for automatically generating a test case aiming at a storage function of controller software is characterized by comprising the following steps:
s01: calling a bottom application layer interactive list;
s02: reading signals needing to be stored in an EEPROM list in the bottom application layer interaction list;
s03: finding out a corresponding calibration quantity in an input interface cleaning list according to the name of a signal needing to be stored in the EEPROM list;
s04: setting the power-off and power-on processes of a controller;
s05: assigning the calibration quantity;
s06: reading a reading signal corresponding to a signal to be stored in an EEPROM list in the bottom application layer interaction list;
s07: and setting an expected result for the read signal according to the value assigned by the calibration quantity corresponding to the signal needing to be stored.
2. The method of claim 1, wherein in S05, the calibration quantity is assigned according to the precision and range in the underlying application layer.
3. An automatic generation system of a test case for a storage function of controller software, comprising:
the calling module is used for calling a bottom application layer interactive list;
the first reading module is used for reading signals needing to be stored in an EEPROM list in the bottom application layer interaction list;
the searching module is used for finding the corresponding calibration quantity in the input interface cleaning list through the name of the signal needing to be stored in the EEPROM list;
the first setting module is used for setting the power-down and power-up processes of the controller;
the assignment module is used for assigning the calibration quantity;
the second reading module is used for reading a reading signal corresponding to a signal to be stored in an EEPROM list in the bottom application layer interaction list;
and the second setting module is used for setting an expected result for the read signal according to the value assigned by the calibration quantity corresponding to the signal to be stored.
4. The method of claim 3, wherein the assignment module assigns the scalar according to the precision and scope of the underlying application layer.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210333567.5A CN114741289B (en) | 2022-03-31 | 2022-03-31 | Automatic generation method and system for test cases aiming at controller software storage function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210333567.5A CN114741289B (en) | 2022-03-31 | 2022-03-31 | Automatic generation method and system for test cases aiming at controller software storage function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114741289A true CN114741289A (en) | 2022-07-12 |
CN114741289B CN114741289B (en) | 2024-06-04 |
Family
ID=82280381
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210333567.5A Active CN114741289B (en) | 2022-03-31 | 2022-03-31 | Automatic generation method and system for test cases aiming at controller software storage function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114741289B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105373476A (en) * | 2015-11-17 | 2016-03-02 | 北京新能源汽车股份有限公司 | Method and system for generating automatic test case in automobile controller |
CN206002952U (en) * | 2016-08-16 | 2017-03-08 | 北京恒天鑫能新能源汽车软件有限公司 | Controller of new energy automobile hardware test platform |
CN108873867A (en) * | 2018-07-27 | 2018-11-23 | 南京越博动力***股份有限公司 | A kind of automation load and direct fault location test macro and control method |
CN110377004A (en) * | 2019-07-12 | 2019-10-25 | 北京祥远通达科技有限公司 | Automobile-used half virtual ECU test macro and its test method |
CN111104334A (en) * | 2019-12-24 | 2020-05-05 | 重庆长安新能源汽车科技有限公司 | Test method and device based on EEPROM module interface software and readable storage medium |
CN111831324A (en) * | 2020-05-31 | 2020-10-27 | 中车永济电机有限公司 | Rail transit control device parameter configuration method based on functional safety |
CN113934628A (en) * | 2021-09-30 | 2022-01-14 | 蜂巢能源科技有限公司 | Software model testing method and device and computer readable storage medium |
-
2022
- 2022-03-31 CN CN202210333567.5A patent/CN114741289B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105373476A (en) * | 2015-11-17 | 2016-03-02 | 北京新能源汽车股份有限公司 | Method and system for generating automatic test case in automobile controller |
CN206002952U (en) * | 2016-08-16 | 2017-03-08 | 北京恒天鑫能新能源汽车软件有限公司 | Controller of new energy automobile hardware test platform |
CN108873867A (en) * | 2018-07-27 | 2018-11-23 | 南京越博动力***股份有限公司 | A kind of automation load and direct fault location test macro and control method |
CN110377004A (en) * | 2019-07-12 | 2019-10-25 | 北京祥远通达科技有限公司 | Automobile-used half virtual ECU test macro and its test method |
CN111104334A (en) * | 2019-12-24 | 2020-05-05 | 重庆长安新能源汽车科技有限公司 | Test method and device based on EEPROM module interface software and readable storage medium |
CN111831324A (en) * | 2020-05-31 | 2020-10-27 | 中车永济电机有限公司 | Rail transit control device parameter configuration method based on functional safety |
CN113934628A (en) * | 2021-09-30 | 2022-01-14 | 蜂巢能源科技有限公司 | Software model testing method and device and computer readable storage medium |
Non-Patent Citations (2)
Title |
---|
横河测试测量: "汽车CAN总线测试应用(一):总线解码分析", pages 1 - 10, Retrieved from the Internet <URL:https://www.auto-testing.net/news/show-111348.html> * |
袁永军等: "自动化测试在硬件在环平台中的实现方案", 《汽车工程师》, no. 05, 25 May 2013 (2013-05-25), pages 53 - 56 * |
Also Published As
Publication number | Publication date |
---|---|
CN114741289B (en) | 2024-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8683456B2 (en) | Test partitioning for a non-volatile memory | |
CN102629206B (en) | A kind of method for updating embedded system software and system | |
CN112131829A (en) | Verification method, system and related device of chip register | |
CN108334365B (en) | Method for realizing instrument parameter interface dynamic configuration in automatic test system software | |
CN106158047A (en) | A kind of NAND FLASH method of testing | |
CN112181854B (en) | Method, device, equipment and storage medium for generating process automation script | |
CN110289039B (en) | Debugging method and device of eMMC | |
CN114117977B (en) | Method suitable for automatically verifying processor system scene | |
CN114896923A (en) | UVM-based storage modeling optimization method | |
CN114741289B (en) | Automatic generation method and system for test cases aiming at controller software storage function | |
CN100489780C (en) | Software installation method and apparatus thereof | |
CN110659197A (en) | Application test case generation method and device and software test system | |
CN116663489A (en) | RTL module resetting method and device, electronic equipment and storage medium | |
CN113900729B (en) | Tracking equipment parameter configuration method and device of SteamVR system | |
US20230185464A1 (en) | Method for determining a hard disk connection slot connected to a hard disk and terminal device | |
CN112527690B (en) | Off-line debugging method and device for aging test of semiconductor memory | |
CN109558327A (en) | Writing method and system of BMC log and related components | |
CN114936905A (en) | Flash memory screening method and device, storage medium and computer equipment | |
CN113672465A (en) | Method, system, medium, terminal and unmanned aerial vehicle for generating process log system by process name | |
CN101976219A (en) | Method and system for debugging automatic testing script and agent device | |
CN101908016A (en) | Method for managing debugging information and break point of multi-core embedded device | |
CN111382036B (en) | Method and system for automatically generating DDR chip test standard report | |
CN113342426A (en) | Application layer software component integration method and system | |
CN101996168A (en) | Method and device for formatting flash memory | |
CN116339797A (en) | Bootloader updating method, bootloader updating device, bootloader updating equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Country or region after: China Address after: 401133 room 208, 2 house, 39 Yonghe Road, Yu Zui Town, Jiangbei District, Chongqing Applicant after: Deep Blue Automotive Technology Co.,Ltd. Address before: 401133 room 208, 2 house, 39 Yonghe Road, Yu Zui Town, Jiangbei District, Chongqing Applicant before: CHONGQING CHANGAN NEW ENERGY AUTOMOBILE TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |