CN110543300A - automatic generation method and tool for automatic test script of automobile instrument - Google Patents
automatic generation method and tool for automatic test script of automobile instrument Download PDFInfo
- Publication number
- CN110543300A CN110543300A CN201910767755.7A CN201910767755A CN110543300A CN 110543300 A CN110543300 A CN 110543300A CN 201910767755 A CN201910767755 A CN 201910767755A CN 110543300 A CN110543300 A CN 110543300A
- Authority
- CN
- China
- Prior art keywords
- tested
- file
- test script
- information
- module
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
-
- 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
-
- 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
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Testing Or Calibration Of Command Recording Devices (AREA)
- Testing Electric Properties And Detecting Electric Faults (AREA)
Abstract
The invention relates to an automatic generation method and a tool for an automobile instrument automatic test script, and belongs to the technical field of automobile electronic tests. The method comprises the steps of importing and analyzing a DBC file of the instrument to be tested, selecting a functional module to be tested and a working mechanism thereof, setting message information and signal information of the corresponding functional module, and generating a corresponding automatic test script according to each selected set information. The test script automatically generated by the method can be used by an automatic test platform, and the functions of conventional test, abnormal voltage and recovery test, signal loss and recovery test, power mode switching test and the like of the function test of the automobile instrument can be realized. The automatic generation method and the tool of the automatic test script have transportability and universality, and solve the problems of non-standard compiling format of the test case, incomplete coverage rate of test points, overlong development period of the test case and the like caused by the working habits of testers.
Description
Technical Field
the invention relates to the technical field of automatic testing, in particular to an automatic generating method and tool for an automobile instrument function automatic testing script.
Background
with the development of the times, automobiles are increasingly used, and each automobile has no automobile instrument for displaying the automobile state, so that a series of tests must be carried out in the instrument development stage in order to ensure the correct indication of the instrument in actual use, and the functional test is the most important. When the function test is carried out, the test script is the most important test basis, and the logic relation designed by the test script and the covered test points directly influence the test result of the instrument. Along with the popularization of the automatic test platform, the compiling of the test script is different from the traditional manual test script, and the test script has quite high requirements on the format, the up-down logic relation, specific keywords and the like of the test script. Therefore, the writing of the automatic test script is very important, wherein the automatic generation of the script is a key technology for the writing of the automatic script.
The current common script writing modes include the following:
1) Manual writing: the tester writes and designs a corresponding test script according to the understanding of the project requirement file and the self test capability and knowledge storage. In the method, because the working habits and the capacities of each person are different, the test scripts can be written along with the habits when being written, and the problems of inconsistent format specifications of the test scripts, inconsistent upper and lower logic relations of the test scripts, incomplete coverage of test points and overlong development period of the test scripts are easily caused.
2) Automatic generation tool of script developed by C # language: namely, a script automatic generation tool developed by a tester by using the C # programming language. Due to the early development time, the functions are not enough to meet the design requirements of the current instrument function test scripts, and the tool also requires the user to have enough instrument function test capability.
disclosure of Invention
the invention aims to overcome the defects in the prior art and provides the automatic generation method and the tool for the automobile instrument automatic test script, which do not need external equipment, are simple to operate, have uniform format and high coverage rate, can be quickly generated by one key and can be used for an automatic test platform.
In order to achieve the above object, the present invention adopts a technical solution that an automatic test script generation method for an automobile instrument includes importing and analyzing a DBC file of an instrument to be tested, selecting a function module to be tested of the instrument to be tested and a working mechanism thereof, setting message information and signal information of the function module to be tested, and generating a corresponding automatic test script file according to each selected set information.
as an improvement of the present invention, the importing and analyzing a DBC file of an instrument to be tested specifically is to analyze the imported DBC file according to its inherent format, obtain all message messages in the DBC file, all signals included in each message, and a transmission cycle of each message, and form a tree list file for display.
As an improvement of the present invention, the selecting of the functional module to be tested of the instrument to be tested and the working mechanism thereof are specifically to select the functional unit module to be tested and the working mechanisms such as the working power mode, the working voltage, the abnormal voltage, the recovery voltage and the like corresponding to the functional unit module from the plurality of functional unit modules of the instrument to be tested.
As an improvement of the present invention, the setting of the message information and the signal information of the function module to be tested specifically selects the message, the signal and the message sending period corresponding to the item to be tested related in the function module to be tested from the tree list file, and sets the signal value and the state corresponding to each signal value, the loss of the signal and the recovery time.
As an improvement of the present invention, the corresponding automated test script file is generated according to the selected and set items of information, specifically, each item of information is taken as a parameter variable, the number of script lines of each item to be tested in the test script is determined according to the parameter variables, and an automated test script file with a fixed format for the automated test platform is automatically generated.
As an improvement of the invention, the automated test script file is an EXCEL file.
A tool for automatically generating an automatic test script, which is realized based on LABVIEW platform development, comprises
The DBC file analysis module: the system comprises a DBC file, a tree list file and a database, wherein the DBC file is used for importing a to-be-tested instrument and analyzing the DBC file into a message and signal information tree list file;
A signal configuration module: various items of relevant information for selecting configuration signals;
The script generation module: and the automatic test script file is generated according to the signal information of the selected configuration.
As an improvement of the present invention, the DBC file parsing module: the method comprises the steps of importing a DBC file of an instrument to be tested, analyzing the DBC file into a tree list file of messages and signal information, and selecting the messages, signals and message sending periods corresponding to items to be tested from the listed message information and signal information tree list file, so that the problem that a generated test script cannot be used due to incomplete information caused by manual information input is solved.
As an improvement of the present invention, the signal configuration module: the method comprises the steps of selecting a function module to be tested from a plurality of function unit modules of an instrument to be tested, selecting an item to be tested from the function module to be tested, inputting the name of the item to be tested, selecting a working power mode, a working voltage, an abnormal voltage and a recovery voltage of the item to be tested, and configuring each signal value and a corresponding working state, loss and recovery time of the signal.
As an improvement of the present invention, the script generation module: determining the script line number of each functional test item in a test script to be generated according to various information selected and configured for the item to be tested, and generating an automatic test script file with an Excel file as a carrier by one-key triggering.
Compared with the prior art, the automatic generation method of the automatic test script and the tool provided by the invention have the advantages of ingenious overall structural design, simple and reasonable logic, no need of expensive external equipment, simple and quick interface operation, lower requirement on the capability of a user and stable and reliable performance; the format of the generated automatic test script file is uniform and standard, and the coverage rate of test points is high; and the portability and the universality of the tool are higher, different instrument test items can be used, and the tool is not required to be separately designed, so that the development cost is reduced.
drawings
Fig. 1 is an operation flowchart of a method for automatically generating an auto meter function automation test script according to the present invention.
fig. 2 is a schematic structural diagram of a script automatic generation tool developed based on the concept of the method of the present invention.
Detailed Description
For a better understanding and appreciation of the invention, it is further described and illustrated below in connection with the accompanying drawings.
As shown in fig. 1, the method for automatically generating an auto meter automation test script provided by the present invention includes importing and analyzing a DBC file of a meter to be tested, selecting a function module to be tested and a working mechanism thereof, setting message information and signal information of a corresponding function module, and generating a corresponding automation test script according to each selected set information.
The method comprises the steps of importing and analyzing a DBC file of an instrument to be tested, specifically analyzing the imported DBC file according to the inherent format of the DBC file, acquiring all messages, signals and message sending periods in the DBC file, and forming a tree list file for displaying.
The selection of the functional module to be tested and the working mechanism thereof of the instrument to be tested is specifically to select the functional unit module to be tested from the multiple functional unit modules of the instrument to be tested and the working mechanisms such as the working power mode, the working voltage, the abnormal voltage, the recovery voltage and the like corresponding to the functional unit module to be tested.
the method comprises the steps of setting message information and signal information of a function module to be tested, specifically selecting a message, a signal and a message sending period corresponding to an item to be tested related in the function module to be tested from a tree list file, and setting signal values and states corresponding to the signal values and loss and recovery time of the signals.
and generating a corresponding automatic test script file according to each item of information selected and set, specifically, taking each item of information as a parameter variable, determining the number of script lines of each item to be tested in the test script according to the parameter variables, and automatically generating the automatic test script file which can be used by an automatic test platform and takes the EXCEL file as a carrier.
Fig. 2 shows an automatic script generation tool developed based on the concept of the automatic test script generation method, where the tool is developed and implemented by an LABVIEW platform, and includes a DBC file parsing module, a signal configuration module, and a script generation module, where the DBC file parsing module is used to import a DBC file of an instrument to be tested and parse the DBC file into a tree list file of messages and signal information; the signal configuration module is used for selecting various relevant information of the configuration signal; and the script generation module is used for generating an automatic test script file according to the signal information of the selected configuration.
further, the DBC file parsing module: the method comprises the steps of importing a DBC file of an instrument to be tested, analyzing the DBC file into a tree list file of messages and signal information, and selecting the messages, signals and message sending periods corresponding to items to be tested from the listed message information and signal information tree list file, so that the problem that a generated test script cannot be used due to incomplete information caused by manual information input is solved.
the signal configuration module: the method comprises the steps of selecting a function module to be tested from a plurality of function unit modules of an instrument to be tested, selecting an item to be tested from the function module to be tested, inputting the name of the item to be tested, selecting a working power mode, a working voltage, an abnormal voltage and a recovery voltage of the item to be tested, and configuring each signal value and a corresponding working state, loss and recovery time of the signal.
The script generation module: determining the script line number of each functional test item in a test script to be generated according to various information selected and configured for the item to be tested, and generating an automatic test script file with an Excel file as a carrier by one-key triggering.
Further, the specific implementation of the tool comprises the following steps:
1) The DBC file analysis module is developed and established through an LABVIEW platform, and specifically comprises the following steps:
(11) and opening and reading the DBC file of the instrument to be tested, and displaying the content of the DBC file by using a two-dimensional array.
(12) And extracting all message messages, all signals contained in each message and the sending period of each message in the DBC file by judging the elements in the two-dimensional array and taking the keywords of the DBC file as a judgment basis, and displaying the three groups of information in a form of a tree list file.
2) the signal configuration module is developed and established through an LABVIEW platform, and specifically comprises the following steps:
(21) Selecting a functional unit module to which an item to be tested belongs, and inputting the name of the item to be tested;
(22) Selecting a message and a signal name corresponding to the item to be tested from the tree list file;
(23) Selecting a working power supply mode and a working voltage of the item to be tested;
(24) Selecting the abnormal voltage and the recovery voltage of the item to be tested;
(25) Configuring the signal value and the working state of the item to be tested;
(26) Configuring the signal loss and recovery time of the item to be tested;
All of these optional configuration items are a single parameter variable.
3) The method for creating the script generation module through LABVIEW platform development specifically comprises the following steps:
(31) Judging whether the functional unit module to be verified of the item to be tested is an LCD (liquid crystal display), an LED (light emitting diode), an HMI (human machine interface) or a GUAGE (secure object);
(32) judging the number of scripts of each function test item according to the selected working power supply mode, the input signal value and the working state corresponding to the signal value;
(33) Setting different working scenes according to the selected message, the signal name, the working power supply mode, the working voltage, the abnormal voltage, the recovery voltage, the signal value, the corresponding working state, the signal loss and the recovery time and other parameter variables so as to verify the function of the item to be tested;
(34) After all the configuration items are set, pressing a BUILD key to automatically generate an automatic test script;
(35) The generated automatic test script is stored in a two-dimensional array, then the EXCEL file is opened and read, the currently empty row index is judged, and then the automatic test script generated in the two-dimensional array is sequentially written into the EXCEL file from the index row;
(36) And closing the EXCEL file after the program saves the automatic test script, wherein the generated EXCEL file is the automatic test script file which can be used by the automatic test platform.
The technical means disclosed in the invention scheme are not limited to the technical means disclosed in the above embodiments, but also include the technical scheme formed by any combination of the above technical features. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and such improvements and modifications are also considered to be within the scope of the present invention.
Claims (10)
1. An automatic generation method of an automatic test script of an automobile instrument is characterized by comprising the following steps: the method comprises the steps of importing and analyzing a DBC file of the instrument to be tested, selecting a functional module to be tested of the instrument to be tested and a working mechanism thereof, setting message information and signal information of the functional module to be tested, and generating a corresponding automatic test script file according to the selected and set information.
2. The method for automatically generating the auto meter automatic test script according to claim 1, wherein the DBC file of the meter to be tested is imported and analyzed, specifically, the imported DBC file is analyzed according to the inherent format thereof, all message messages in the DBC file, all signals included in each message, and the transmission period of each message are obtained, and a tree list file is formed for display.
3. The method according to claim 2, wherein the selecting of the functional module to be tested and the operating mechanism thereof is to select the functional unit module to be tested and the operating power mode, operating voltage, abnormal voltage and recovery voltage corresponding to the functional unit module to be tested from the plurality of functional unit modules of the instrument to be tested.
4. The method according to claim 3, wherein the setting of the message information and the signal information of the function module to be tested is performed by selecting a message, a signal and a message transmission period corresponding to an item to be tested related to the function module to be tested from a tree list file, and setting a signal value, a state corresponding to each signal value, and a loss and recovery time of the signal.
5. the method for automatically generating auto meter automatic test script according to claim 4, wherein the corresponding automatic test script file is generated according to each item of information selected and set, specifically, each item of information is taken as a parameter variable, the number of script lines of each item to be tested in the test script is determined according to the parameter variables, and an automatic test script file with a fixed format for the automatic test platform is automatically generated.
6. The method of automatic generation of automotive instrument automation test scripts of claim 5, wherein the automation test script file is an EXCEL file.
7. the automatic generation tool of the script developed based on the idea of the automatic generation method of the test script according to any one of claims 2 to 6, wherein the tool is developed and implemented by a LABVIEW platform, and comprises a DBC file parsing module, a signal configuration module and a script generation module, wherein the DBC file parsing module is used for importing a DBC file of the instrument to be tested and parsing the DBC file into a tree list file of messages and signal information; the signal configuration module is used for selecting various relevant information of the configuration signal; and the script generation module is used for generating an automatic test script file according to the signal information of the selected configuration.
8. The method and tool for automatically generating the auto meter automation test script of claim 7, wherein the DBC file parsing module: the method comprises the steps of importing a DBC file of an instrument to be tested, analyzing the DBC file into a tree list file of messages and signal information, and selecting the messages, signals and message sending periods corresponding to items to be tested from the listed message information and signal information tree list file, so that the problem that a generated test script cannot be used due to incomplete information caused by manual information input is solved.
9. the method and tool for automatically generating the auto meter automation test script of claim 8, wherein the signal configuration module: the method comprises the steps of selecting a function module to be tested from a plurality of function unit modules of an instrument to be tested, selecting an item to be tested from the function module to be tested, inputting the name of the item to be tested, selecting a working power mode, a working voltage, an abnormal voltage and a recovery voltage of the item to be tested, and configuring each signal value and a corresponding working state, loss and recovery time of the signal.
10. The method and tool for automatically generating the auto meter automation test script of claim 9, wherein the script generation module: determining the script line number of each functional test item in a test script to be generated according to various information selected and configured for the item to be tested, and generating an automatic test script file with an Excel file as a carrier by one-key triggering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910767755.7A CN110543300B (en) | 2019-08-20 | 2019-08-20 | Automatic generation method and tool for automatic test script of automobile instrument |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910767755.7A CN110543300B (en) | 2019-08-20 | 2019-08-20 | Automatic generation method and tool for automatic test script of automobile instrument |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110543300A true CN110543300A (en) | 2019-12-06 |
CN110543300B CN110543300B (en) | 2023-08-22 |
Family
ID=68711728
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910767755.7A Active CN110543300B (en) | 2019-08-20 | 2019-08-20 | Automatic generation method and tool for automatic test script of automobile instrument |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110543300B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111510355A (en) * | 2020-04-28 | 2020-08-07 | 扬州亚星客车股份有限公司 | Automatic sequence test system and method for CAN communication of whole vehicle |
CN111736815A (en) * | 2020-06-28 | 2020-10-02 | 武汉精立电子技术有限公司 | Test file script modular development tool, system and method |
CN111897736A (en) * | 2020-08-17 | 2020-11-06 | 深圳信息通信研究院 | Cloud architecture-based automatic testing method and system for Internet of things information products |
CN112908357A (en) * | 2021-01-19 | 2021-06-04 | 广州橙行智动汽车科技有限公司 | Instrument sound testing method and device, testing equipment and storage medium |
CN113077735A (en) * | 2020-01-06 | 2021-07-06 | 广州汽车集团股份有限公司 | Method, device and system for testing vehicle-mounted display equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040107415A1 (en) * | 2002-12-03 | 2004-06-03 | Konstantin Melamed | Web-interactive software testing management method and computer system including an integrated test case authoring tool |
US20130205172A1 (en) * | 2006-03-15 | 2013-08-08 | Morrisha Hudgons | Integrated System and Method for Validating the Functionality and Performance of Software Applications |
CN106850372A (en) * | 2017-02-22 | 2017-06-13 | 重庆长安汽车股份有限公司 | A kind of method of testing and system of controller CAN signal |
CN107256014A (en) * | 2017-06-13 | 2017-10-17 | 华晨汽车集团控股有限公司 | A kind of vehicle automated diagnostic tester system based on automatic editor's cycle tests |
-
2019
- 2019-08-20 CN CN201910767755.7A patent/CN110543300B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040107415A1 (en) * | 2002-12-03 | 2004-06-03 | Konstantin Melamed | Web-interactive software testing management method and computer system including an integrated test case authoring tool |
US20130205172A1 (en) * | 2006-03-15 | 2013-08-08 | Morrisha Hudgons | Integrated System and Method for Validating the Functionality and Performance of Software Applications |
CN106850372A (en) * | 2017-02-22 | 2017-06-13 | 重庆长安汽车股份有限公司 | A kind of method of testing and system of controller CAN signal |
CN107256014A (en) * | 2017-06-13 | 2017-10-17 | 华晨汽车集团控股有限公司 | A kind of vehicle automated diagnostic tester system based on automatic editor's cycle tests |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113077735A (en) * | 2020-01-06 | 2021-07-06 | 广州汽车集团股份有限公司 | Method, device and system for testing vehicle-mounted display equipment |
CN113077735B (en) * | 2020-01-06 | 2023-11-17 | 广州汽车集团股份有限公司 | Test method, device and system of vehicle-mounted display equipment |
CN111510355A (en) * | 2020-04-28 | 2020-08-07 | 扬州亚星客车股份有限公司 | Automatic sequence test system and method for CAN communication of whole vehicle |
CN111736815A (en) * | 2020-06-28 | 2020-10-02 | 武汉精立电子技术有限公司 | Test file script modular development tool, system and method |
CN111897736A (en) * | 2020-08-17 | 2020-11-06 | 深圳信息通信研究院 | Cloud architecture-based automatic testing method and system for Internet of things information products |
CN111897736B (en) * | 2020-08-17 | 2023-08-04 | 深圳信息通信研究院 | Automatic testing method and system for Internet of things information product based on cloud architecture |
CN112908357A (en) * | 2021-01-19 | 2021-06-04 | 广州橙行智动汽车科技有限公司 | Instrument sound testing method and device, testing equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110543300B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110543300B (en) | Automatic generation method and tool for automatic test script of automobile instrument | |
CN110232024B (en) | Software automation test framework and test method | |
CN111078482B (en) | Communication navigation equipment test system, method, equipment and readable storage medium | |
US6324665B1 (en) | Event based fault diagnosis | |
CN102169846B (en) | Method for writing multi-dimensional variable password in parallel in process of testing integrated circuit wafer | |
CN105760296B (en) | Automatic test control method, device and terminal | |
CN104391795A (en) | Method and system for automatically testing coverage rate in distributed system | |
CN107783873B (en) | Method for realizing automatic testing platform of burner | |
CN106445811A (en) | SecureCRT-based automated test system and method | |
CN105068929A (en) | Test script generation method, test script generation device, testing method, testing device and testing system | |
CN102092477A (en) | Device and method for automatic test and fault diagnosis of plane audio integrated system | |
CN106405294B (en) | Portable power distribution product transmission calibrator and implementation test method thereof | |
CN107992428A (en) | The automatic test platform that a kind of Python is realized | |
CN106646315A (en) | Automatic testing system and automatic testing method for digital measuring instruments | |
CN116087867A (en) | Method for testing operation reliability of intelligent electric energy meter | |
CN200997633Y (en) | Automatic testing system based on graphic testing platform | |
CN115168229A (en) | Coverage rate driven embedded software closed loop test platform and method | |
CN111239441A (en) | Wire harness detection device with mode comparison function | |
CN108804298B (en) | Device for testing response time of SCADA system | |
CN111767232B (en) | Equipment test program set verification system | |
CN116261091B (en) | Bluetooth testing system and method capable of customizing testing flow | |
CN116506007A (en) | Optical module firmware testing system and method | |
CN116559624A (en) | Chip testing method, system, device and storage medium | |
CN105652182A (en) | Circuit board fault positioning system and circuit board fault positioning method based on circuit network and graph search | |
CN111176995A (en) | Test method and test system based on big data test case |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |