CN110543300B - 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 PDF

Info

Publication number
CN110543300B
CN110543300B CN201910767755.7A CN201910767755A CN110543300B CN 110543300 B CN110543300 B CN 110543300B CN 201910767755 A CN201910767755 A CN 201910767755A CN 110543300 B CN110543300 B CN 110543300B
Authority
CN
China
Prior art keywords
tested
file
information
item
signal
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.)
Active
Application number
CN201910767755.7A
Other languages
Chinese (zh)
Other versions
CN110543300A (en
Inventor
黄桑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yanfeng Visteon Electronic Technology Nanjing Co Ltd
Original Assignee
Yanfeng Visteon Electronic Technology Nanjing Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Yanfeng Visteon Electronic Technology Nanjing Co Ltd filed Critical Yanfeng Visteon Electronic Technology Nanjing Co Ltd
Priority to CN201910767755.7A priority Critical patent/CN110543300B/en
Publication of CN110543300A publication Critical patent/CN110543300A/en
Application granted granted Critical
Publication of CN110543300B publication Critical patent/CN110543300B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total 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 Electric Properties And Detecting Electric Faults (AREA)
  • Testing Or Calibration Of Command Recording Devices (AREA)

Abstract

The invention relates to an automatic generation method and an automatic generation tool for an automatic test script of an automobile instrument, and belongs to the technical field of automobile electronic testing. 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 item of information selected and set. The test script automatically generated by the method can be used by an automatic test platform, and can realize the functions of conventional test, abnormal voltage and recovery test, signal loss and recovery test, power supply mode switching test and the like of the automobile instrument function test. The automatic test script generating method and the tool have portability and universality, and solve the problems of irregular test case writing formats, insufficient test point coverage rate, overlong test case development period and the like caused by the working habit of testers.

Description

Automatic generation method and tool for automatic test script of automobile instrument
Technical Field
The invention relates to the technical field of automatic testing, in particular to an automatic generation method and an automatic generation tool for an automatic test script of an automobile instrument function.
Background
With the development of the age, automobiles are increasingly used, but each automobile has no automobile instrument for displaying the automobile state, and in order to ensure the correct indication of the instrument in actual use, a series of tests must be performed in the instrument research and development stage, and the functional test is also the most important. When the function test is carried out, the test script is the most important test basis, and the logic relation and the covered test points of the test script design directly influence the test result of the instrument. Along with the popularization of an automatic test platform, the writing of the test script is different from the traditional manual test script, and has quite high requirements on the format, the upper and lower logic relationship, the specific keywords and the like of the test script. Automated test script writing is therefore particularly important, where automated script generation is a key technology in automated script writing.
The script writing modes commonly used at present are as follows:
1) And (3) manually writing: namely, according to the understanding of project demand files, test personnel, in addition to own test capability and knowledge storage, write test scripts corresponding to the design. The mode is characterized in that the working habits and the capabilities of each person are different, and the test scripts can be written along with the habits of each person when the test scripts are compiled, so that the problems of inconsistent format standards of the test scripts, incoherence of 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) Script automatic generation tool developed in c# language: i.e., a script automatic generation tool developed by a tester using the c# programming language. Because of the early development time, the functionality available is insufficient to meet the design requirements of current meter function test scripts, and the tool also requires the user to have sufficient meter function test capabilities.
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 automatic test script of the automobile instrument, which do not need external equipment, are simple to operate, have uniform formats and high coverage rate, can be quickly generated by one key, and can be used by an automatic test platform.
In order to achieve the above purpose, the technical scheme adopted by the invention is that the automatic generation method of the automobile instrument automatic test script comprises the steps of importing and analyzing DBC files 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 corresponding automatic test script files according to each item of information which is selected and set.
As an improvement of the invention, the DBC file of the instrument 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 contained in each message and the sending period of each message are obtained, and a tree list file is formed for display.
As an improvement of the invention, the function module to be tested and the working mechanism thereof of the instrument to be tested are selected, in particular, the function unit module to be tested and the working mechanism such as working power supply mode, working voltage, abnormal voltage, recovery voltage and the like corresponding to the function unit module are selected from a plurality of function 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 functional module to be tested specifically selects the corresponding message, signal and message sending period of the item to be tested related to the functional module to be tested from the tree list file, and sets the signal value and the state corresponding to each signal value, and the loss and recovery time of the signal.
As an improvement of the invention, the corresponding automatic test script file is generated according to the selected set 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 variable, and the automatic test script file with a fixed format which can be used by an automatic test platform is automatically generated.
As an improvement of the invention, the automatic test script file is an EXCEL file.
A tool for automatically generating an automated test script is implemented based on LABVIEW platform development, comprising
DBC file analysis module: the tree list file is used for importing DBC files of the instrument to be tested and analyzing the DBC files into messages and signal information;
and a signal configuration module: information about each item for selecting the configuration signal;
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 a meter to be tested, analyzing the DBC file into a tree-shaped list file of message and signal information, and selecting a message, a signal and a message sending period corresponding to a to-be-tested item from the listed tree-shaped list file of the message information and the signal information, so as to avoid the problem that the generated test script cannot be used because of incomplete information caused by manual information input.
As an improvement of the present invention, the signal configuration module: the method comprises the steps of selecting a functional module to be tested from a plurality of functional unit modules of an instrument to be tested, selecting a item to be tested from the functional module to be tested, inputting the name of the item to be tested, selecting the working power supply mode, the working voltage, the abnormal voltage and the recovery voltage of the item to be tested, and configuring each signal value, the corresponding working state and the loss and recovery time of signals.
As an improvement of the present invention, the script generation module: determining the number of script lines of each functional test item in a test script to be generated according to each item information selected and configured for the item to be tested, and triggering and generating an automatic test script file taking an Excel file as a carrier by one key.
Compared with the prior art, the automatic test script generation method 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 generated automatic test script file format is unified and standard, and the coverage rate of test points is high; and portability and commonality of this instrument are also higher, and different instrument test projects can all be used, need not in addition to design separately, reduce development cost.
Drawings
Fig. 1 is an operation flow chart of the automatic generation method of the automatic test script for the automobile instrument function.
Fig. 2 is a schematic diagram of a script automatic generation tool developed based on the concept of the method of the present invention.
Detailed Description
The present invention is further described and illustrated below in conjunction with the accompanying drawings in order to enhance the understanding and appreciation of the invention.
As shown in fig. 1, the automatic generation method of the automatic test script of the automobile instrument provided by the invention 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 the corresponding automatic test script according to each item of information which is selected and set.
The method comprises the steps of importing and analyzing a DBC file of a meter to be tested, specifically analyzing the imported DBC file according to an inherent format of the imported DBC file, obtaining all messages, signals and message sending periods in the DBC file, and forming a tree list file for display.
The to-be-tested functional module of the to-be-tested instrument and the working mechanism thereof are selected, and the to-be-tested functional unit module and the working mechanism such as working power supply mode, working voltage, abnormal voltage, recovery voltage and the like corresponding to the functional unit module are selected from a plurality of functional unit modules of the to-be-tested instrument.
The setting of the message information and the signal information of the functional module to be tested specifically includes selecting the corresponding message, signal and message sending period of the item to be tested related to the functional module to be tested from the tree list file, and setting the signal value and the corresponding state of each signal value, and the loss and recovery time of the signal.
And generating a corresponding automatic test script file according to the selected set information, 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.
As shown in fig. 2, the automatic script generating tool developed based on the concept of the automatic test script generating method is developed and implemented through a LABVIEW platform, and comprises a DBC file analyzing module, a signal configuration module and a script generating module, wherein the DBC file analyzing module is used for importing a DBC file of a meter to be tested and analyzing 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; 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 a meter to be tested, analyzing the DBC file into a tree-shaped list file of message and signal information, and selecting a message, a signal and a message sending period corresponding to a to-be-tested item from the listed tree-shaped list file of the message information and the signal information, so as to avoid the problem that the generated test script cannot be used because of incomplete information caused by manual information input.
The signal configuration module: the method comprises the steps of selecting a functional module to be tested from a plurality of functional unit modules of an instrument to be tested, selecting a item to be tested from the functional module to be tested, inputting the name of the item to be tested, selecting the working power supply mode, the working voltage, the abnormal voltage and the recovery voltage of the item to be tested, and configuring each signal value, the corresponding working state and the loss and recovery time of signals.
The script generation module: determining the number of script lines of each functional test item in a test script to be generated according to each item information selected and configured for the item to be tested, and triggering and generating an automatic test script file taking an Excel file as a carrier by one key.
Further, the implementation of the tool includes the following steps:
1) The DBC file analysis module is established through LABVIEW platform development, 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 in a two-dimensional array.
(12) And extracting all message information in the DBC file, all signals contained in each message information and the sending period of each message by judging elements in the two-dimensional array and taking keywords of the DBC file as judgment basis, and displaying the three groups of information in the form of tree list files.
2) The signal configuration module is established through LABVIEW platform development, and specifically comprises the following steps:
(21) Selecting a functional unit module to which the 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 an operating power mode and an operating voltage of the item to be tested;
(24) Selecting an abnormal voltage and a recovery voltage of the item to be tested;
(25) Configuring a signal value and a working state of the item to be tested;
(26) Configuring signal loss and recovery time of the item to be tested;
all of these selection profiles are a single parameter variable.
3) The script generation module is established through LABVIEW platform development, and specifically comprises the following steps:
(31) Judging whether the functional unit module to be verified of the item to be tested is LCD, LED, HMI or GUAGE according to the selected functional unit module to which the item to be tested belongs;
(32) Judging the script number of each functional test item according to the selected working power supply mode, the input signal value and the working state corresponding to the signal value;
(33) According to the selected message information and signal name, working power mode, working voltage, abnormal voltage and recovery voltage, signal value, corresponding working state, signal loss and recovery time, setting different working situations to verify the function of the item to be tested;
(34) After all the configuration items are set, the automatic test script can be automatically generated by pressing the BUILD key;
(35) The generated automatic test script is stored in a two-dimensional array firstly, then an EXCEL file is opened and read, the current 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 is stored and the automatic test script is finished, wherein the generated EXCEL file is the automatic test script file which can be used by the automatic test platform.
The technical means disclosed by the scheme of the invention is not limited to the technical means disclosed by the embodiment, and also comprises the technical scheme formed by any combination of the technical features. It should be noted that modifications and adaptations to the invention may occur to one skilled in the art without departing from the principles of the present invention and are intended to be within the scope of the present invention.

Claims (1)

1. An automatic generation method of an automobile instrument automatic test script is characterized by comprising the following steps of: the method comprises the steps of importing and analyzing a DBC file of a meter to be tested, selecting a functional module to be tested of the meter 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 each item of information selected and set; the method comprises the steps of importing and analyzing a DBC file of a meter to be tested, specifically, analyzing the imported DBC file according to an inherent format of the imported DBC file, obtaining all message messages in the DBC file, all signals contained in each message and a sending period of each message, and forming a tree list file for display;
the method comprises the steps of selecting a functional module to be tested of a meter to be tested and a working mechanism thereof, and specifically selecting a functional unit module to be tested and a working power supply mode, a working voltage, an abnormal voltage and a recovery voltage corresponding to the functional unit module from a plurality of functional unit modules of the meter to be tested;
the setting of the message information and the signal information of the function module to be tested is to select the corresponding message, signal and message sending period of the item to be tested related in the function module to be tested from the tree list file, and set the signal value and the corresponding state of each signal value, loss of signal and recovery time;
generating a corresponding automatic test script file according to each item of information which is 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 a test script according to the parameter variables, and automatically generating the automatic test script file with a fixed format which can be used by an automatic test platform, wherein the automatic test script file is an EXCEL file;
the script automatic generation tool developed based on the conception of the test script automatic generation method is realized through the LABVIEW platform development and comprises a DBC file analysis module, a signal configuration module and a script generation module, wherein the DBC file analysis module is used for importing a DBC file of a meter to be tested and analyzing 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; the script generation module is used for generating an automatic test script file according to the signal information of the selected configuration;
the DBC file analysis module: the method comprises the steps of importing a DBC file of a meter to be tested, analyzing the DBC file into a tree-shaped list file of message and signal information, and selecting a message, a signal and a message sending period corresponding to a to-be-tested item from the listed tree-shaped list file of the message information and the signal information, so as to avoid the problem that a generated test script cannot be used because of incomplete information caused by manual information input;
the signal configuration module: selecting a function module to be tested from a plurality of function unit modules of an instrument to be tested, selecting a item to be tested from the function module to be tested, inputting the name of the item to be tested, selecting a working power supply mode, working voltage, abnormal voltage and recovery voltage of the item to be tested, and configuring each signal value, corresponding working state and loss and recovery time of signals;
the script generation module: determining the number of script lines of each functional test item in a test script to be generated according to each item information selected and configured for the item to be tested, and triggering and generating an automatic test script file taking an Excel file as a carrier by one key.
CN201910767755.7A 2019-08-20 2019-08-20 Automatic generation method and tool for automatic test script of automobile instrument Active CN110543300B (en)

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 CN110543300A (en) 2019-12-06
CN110543300B true 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)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN111736815B (en) * 2020-06-28 2024-07-09 武汉精立电子技术有限公司 Modularized development tool, system and method for test file script
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

Citations (4)

* Cited by examiner, † Cited by third party
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
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

Also Published As

Publication number Publication date
CN110543300A (en) 2019-12-06

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
CN107908507B (en) double-CPU multichannel FT (FT) mass production test system and method
CN111078482B (en) Communication navigation equipment test system, method, equipment and readable storage medium
CN102387234B (en) Mobile phone automatic test device and method
CN106291060B (en) Mobile phone current testing system and mobile phone current testing method
CN105760296B (en) Automatic test control method, device and terminal
CN101287266B (en) Test system and method for mobile phone
CN101272422A (en) Mobile phone automatized test method
CN103376380A (en) Test system and method thereof
CN109634253B (en) Automatic flow control method and system
CN107992428A (en) The automatic test platform that a kind of Python is realized
CN116261091B (en) Bluetooth testing system and method capable of customizing testing flow
CN115168229A (en) Coverage rate driven embedded software closed loop test platform and method
CN110750462A (en) FPGA white box test platform
CN114578790A (en) Unmanned aerial vehicle flight control automatic test method, system, equipment and medium
US20090164931A1 (en) Method and Apparatus for Managing Test Result Data Generated by a Semiconductor Test System
CN111767232B (en) Equipment test program set verification system
CN102236068A (en) Method and device for testing chip
CN105652182A (en) Circuit board fault positioning system and circuit board fault positioning method based on circuit network and graph search
CN107733740A (en) A kind of communication equipment automatic test approach based on VEE
CN111061244A (en) Automatic testing method for power distribution master station monitoring system
CN110968071B (en) Method and system for generating functional test case of electric screen cabinet of railway vehicle
CN111510355A (en) Automatic sequence test system and method for CAN communication of whole vehicle
CN109782731B (en) Automatic test method for logic function of microwave oven

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