CN112506756A - Vehicle controller test case script generation method and device - Google Patents

Vehicle controller test case script generation method and device Download PDF

Info

Publication number
CN112506756A
CN112506756A CN202011253045.1A CN202011253045A CN112506756A CN 112506756 A CN112506756 A CN 112506756A CN 202011253045 A CN202011253045 A CN 202011253045A CN 112506756 A CN112506756 A CN 112506756A
Authority
CN
China
Prior art keywords
action
test
function
test case
library
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
Application number
CN202011253045.1A
Other languages
Chinese (zh)
Other versions
CN112506756B (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.)
Dongfeng Motor Corp
Original Assignee
Dongfeng Motor Corp
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 Dongfeng Motor Corp filed Critical Dongfeng Motor Corp
Priority to CN202011253045.1A priority Critical patent/CN112506756B/en
Publication of CN112506756A publication Critical patent/CN112506756A/en
Application granted granted Critical
Publication of CN112506756B publication Critical patent/CN112506756B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/3688Test management for test execution, e.g. scheduling of test suites
    • 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)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention relates to the technical field of vehicle controller testing, in particular to a method and a device for generating a test case script of a vehicle controller. The method comprises the following steps: constructing a test action text library according to the action value of a control function signal of the vehicle controller; loading a test action text library, creating and packaging a basic action function according to basic action items of action classification of the control function signal, and constructing a test action function library; calling a test action text library, associating the function classification of the control function signal with the corresponding test action, and constructing a test case text library; and calling the test action function library according to the test action sequence of the test case text library to generate a test case script of the vehicle controller. The invention can automatically generate the script code of the vehicle controller test case according to the control function of the vehicle controller, standardizes the format of the test case script, improves the script generation efficiency, and further efficiently and uniformly obtains the vehicle controller test case script.

Description

Vehicle controller test case script generation method and device
Technical Field
The invention relates to the technical field of vehicle controller testing, in particular to a method and a device for generating a test case script of a vehicle controller.
Background
At present, various automatic test equipment is introduced into various large whole vehicle factories to improve the test efficiency, and the vehicle controllers are automatically tested. Before testing, a large amount of test case scripting work is required. Because the same test action can repeatedly appear at different positions in the test case, a large amount of repeated codes exist in the written test case script, and the test case script is complicated to write and is easy to make mistakes. Meanwhile, the script writing capabilities and habits of different testers are greatly different, so that the test case script is various in format and not efficient and uniform enough.
Therefore, how to efficiently and uniformly obtain the vehicle controller test case script is a technical problem which needs to be solved urgently at present.
Disclosure of Invention
The invention aims to provide a method and a device for generating a vehicle controller test case script so as to efficiently and uniformly obtain the vehicle controller test case script.
The embodiment of the invention provides the following scheme:
in a first aspect, an embodiment of the present invention provides a method for generating a test case script for a vehicle controller, where the method includes:
constructing a test action text library according to the action value of a control function signal of the vehicle controller;
loading the test action text library, creating and packaging a basic action function according to the basic action items of the action classification of the control function signal, and constructing a test action function library;
calling the test action text library, associating the function classification of the control function signal with the corresponding test action, and constructing a test case text library;
and calling the test action function library according to the test action sequence of the test case text library to generate a test case script of the vehicle controller.
In a possible embodiment, the constructing a test action text library according to the action value of the control function signal of the vehicle controller includes:
acquiring a signal list text library; the signal list text base comprises all action values of the control function signals of the vehicle controller;
according to action classification rules, carrying out action classification on control function signals of the vehicle controller to obtain action classification of the control function signals;
constructing a test action text library to be filled according to the action classification of the control function signal;
and associating all action values of the control function signal to the test action text library to be filled to obtain the test action text library.
In a possible embodiment, the loading the test action text library, creating and packaging a basic action function according to a basic action item of the action classification of the control function signal, and constructing a test action function library includes:
loading the test action text library and constructing a test action function library to be filled;
according to the action classification of the control function signal, establishing and packaging a basic action large class in the test action function library to be filled;
and according to the basic action items of the action classification, packaging corresponding basic action functions in the basic action categories to obtain the test action function library.
In a possible embodiment, the invoking the test action text library, associating the function classification of the control function signal with a corresponding test action, and constructing a test case text library includes:
constructing a test case text library to be filled according to the function classification of the control function signal;
calling the test action text library, and associating the action numerical value corresponding to the function classification of the control function signal into the test case text library to be filled;
and arranging the test action corresponding to the function classification of the control function signal in the test case text library to be filled according to the action sequence of the test case of the vehicle controller, and acquiring the test case text library.
In a possible embodiment, the invoking the test action function library according to the test action sequence of the test case text library to generate the test case script of the vehicle controller includes:
loading the test case text library and constructing a test case script to be filled;
according to the function classification of the control function signal, creating and packaging a test function class in the test case script to be filled;
calling the test case text library to obtain a test action sequence of the test function class;
and calling a basic action function of the test action function library in the test function class according to the test action sequence of the test function class to generate a test case script of the vehicle controller.
In one possible embodiment, the action classification of the control function signal includes a set broad class and an acquire broad class;
the setting broad class comprises one or more of a voltage mode setting class, a power management setting class, a state setting class, a general switch setting class, a wiper switch setting class, a lamp switch setting class and a Bus signal setting class;
the acquisition broad class includes one or more of a Bus signal acquisition class and a drive signal acquisition class.
In a possible embodiment, the function classification of the control function signal includes one or more of a general control system function class, an outdoor lamp function class, an indoor lamp function class, a central control door lock function class, a turn signal function class, a driver information function class, a power window function class, a front wiper function class, a rear defrosting function class, an anti-theft alarm function class and a car-finding function class.
In a second aspect, an embodiment of the present invention provides a vehicle controller test case script generating apparatus, where the apparatus includes:
the first construction module is used for constructing a test action text library according to the action value of the control function signal of the vehicle controller;
the second construction module is used for loading the test action text library, creating and packaging a basic action function according to the basic action items of the action classification of the control function signal, and constructing a test action function library;
the third building module is used for calling the test action text library, associating the function classification of the control function signal with the corresponding test action, and building a test case text library;
and the first generation module is used for calling the test action function library according to the test action sequence of the test case text library to generate the test case script of the vehicle controller.
In a possible embodiment, the first building block comprises:
the first acquisition module is used for acquiring a signal list text library; the signal list text base comprises all action values of the control function signals of the vehicle controller;
the second acquisition module is used for carrying out action classification on the control function signals of the vehicle controller according to action classification rules to acquire action classification of the control function signals;
the fourth construction module is used for constructing a test action text library to be filled according to the action classification of the control function signal;
and the first operation module is used for associating all action values of the control function signal to the test action text library to be filled to obtain the test action text library.
In a possible embodiment, the second building block comprises:
the fifth construction module is used for loading the test action text library and constructing a test action function library to be filled;
the second operation module is used for establishing and packaging a basic action category in the test action function library to be filled according to the action category of the control function signal;
and the third operation module is used for packaging a corresponding basic action function in the basic action category according to the basic action item of the action category to obtain the test action function library.
In a possible embodiment, the third building block comprises:
the sixth construction module is used for constructing a test case text library to be filled according to the function classification of the control function signal;
the fourth operation module is used for calling the test action text library and associating the action numerical value corresponding to the function classification of the control function signal into the test case text library to be filled;
and the fifth operation module is used for arranging the test action corresponding to the function classification of the control function signal in the test case text library to be filled according to the action sequence of the test case of the vehicle controller, and acquiring the test case text library.
In a possible embodiment, the first generating module includes:
the seventh construction module is used for loading the test case text library and constructing a test case script to be filled;
a sixth operation module, configured to create and package a test function class in the test case script to be filled according to the function classification of the control function signal;
the seventh operation module is used for calling the test case text library to obtain the test action sequence of the test function class;
and the second generation module is used for calling a basic action function of the test action function library in the test function class according to the test action sequence of the test function class to generate a test case script of the vehicle controller.
In one possible embodiment, the action classification of the control function signal includes a set broad class and an acquire broad class;
the setting broad class comprises one or more of a voltage mode setting class, a power management setting class, a state setting class, a general switch setting class, a wiper switch setting class, a lamp switch setting class and a Bus signal setting class;
the acquisition broad class includes one or more of a Bus signal acquisition class and a drive signal acquisition class.
In a possible embodiment, the function classification of the control function signal includes one or more of a general control system function class, an outdoor lamp function class, an indoor lamp function class, a central control door lock function class, a turn signal function class, a driver information function class, a power window function class, a front wiper function class, a rear defrosting function class, an anti-theft alarm function class and a car-finding function class.
In a third aspect, an embodiment of the present invention provides a vehicle controller test case script generating device, including:
a memory for storing a computer program;
a processor configured to execute the computer program to implement the steps of the vehicle controller test case script generation method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of the vehicle controller test case script generation method in any one of the first aspect.
Compared with the prior art, the invention has the following advantages and beneficial effects:
firstly, acquiring an action value of a control function signal, and constructing a test action text library; then, according to the test action text library, a test action function library is constructed; then, calling a test action text library to construct a test case text library; and finally, calling a test action function library to generate a test case script of the vehicle controller.
The invention can automatically generate the script code of the vehicle controller test case according to the control function of the vehicle controller, standardizes the format of the test case script, improves the script generation efficiency, and further efficiently and uniformly obtains the vehicle controller test case script.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present specification, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for generating a test case script for a vehicle controller according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a vehicle controller test case script generation apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments of the present invention belong to the scope of protection of the embodiments of the present invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for generating a test case script of a vehicle controller according to an embodiment of the present invention, including steps 11 to 14.
And 11, constructing a test action text library according to the action value of the control function signal of the vehicle controller.
Specifically, the Vehicle Controller may be a Controller on an automobile, such as a Body Control Module (BCM), an Electronic Control Unit (ECU), a Vehicle Control Unit (VCU), or a Transmission Control Unit (TCU).
Specifically, the control principle information of each signal in the vehicle controller can be obtained by analyzing the data such as an electrical principle diagram, an electricity consumption information table and the like of the vehicle controller such as the vehicle body controller in advance, the control principle information can indicate that a certain state of a certain signal is controlled by a certain digital quantity (numerical value) of the vehicle controller, and finally all possible action values of various signals of the vehicle controller can be obtained according to the control principle information, so that the establishment of a test action text library is completed.
Here, the present invention further provides a better test action text library construction scheme, including:
step 21, acquiring a signal list text library; wherein the signal list text library includes all action values of the control function signals of the vehicle controller.
Specifically, before the step is executed, the control principle information of each signal in the vehicle controller may be obtained through technical analysis, and the control principle information is displayed in a signal list text library form, similar to an Excel list, and includes all action values of the control function signal of the vehicle controller.
And step 22, performing action classification on the control function signal of the vehicle controller according to an action classification rule to obtain the action classification of the control function signal.
Specifically, the basic test actions in the vehicle controller can be classified into two categories, namely setting and obtaining, wherein the setting means that the vehicle controller issues a control command to control the relevant component equipment to perform the corresponding actions, and the obtaining means that the vehicle controller receives a feedback signal to confirm whether the relevant component equipment correctly performs the corresponding actions. The setting broad category comprises one or more of a voltage mode setting category, a power management setting category, a state setting category, a general switch setting category, a wiper switch setting category, a lamp switch setting category and a Bus signal setting category; the acquisition broad class includes one or more of a Bus signal acquisition class and a drive signal acquisition class.
And step 23, constructing a test action text library to be filled according to the action classification of the control function signal.
Specifically, this step is used to construct a blank test action text library of the vehicle controller, which includes each action category of the control function signal, but has no specific action value.
And 24, associating all action values of the control function signal to the test action text library to be filled to obtain the test action text library.
Specifically, in this step, all action values of the control function signal in the signal list text base can be associated to the test action text to be filled by the Excel data validity limitation, and the specific process includes:
firstly, adding VBA macro codes in a test action text to be filled; and then, adding data validity limitation in the corresponding signal cell change event function selection change, and limiting the corresponding signal value of the data source in the signal list text base.
The step 21 to the step 24 can effectively distinguish each action state in the control function signal by carrying out action classification on the action function signal, and provide necessary support preparation for the automatic and efficient generation of a test action text library, a test case text library and a test case script.
And step 12, loading the test action text library, creating and packaging a basic action function according to the basic action items of the action classification of the control function signal, and constructing a test action function library.
Specifically, a certain motion value of the control function signal represents one state of a corresponding component device on the automobile, and a motion command of the vehicle controller needs to move the corresponding component device on the automobile from one state to another state, wherein the motion command needs to be executed cooperatively by the motion function. Some simple actions (such as opening a door, closing a door, turning on a light, turning off the light and the like) can complete corresponding action control only through one-time change of a state value, but some complex actions (such as flashing of a steering lamp, automatic water spraying of a wiper, windshield cleaning and the like) can be subdivided into a plurality of basic action items, and a control flow of the complex actions can be completed through fixed combination of the plurality of basic action items. Therefore, the construction of the test action function library can be completed by performing function packaging on the basic action items corresponding to the action classifications of the control function signals.
Here, the present invention further provides a better test action function library construction scheme, including:
and 31, loading the test action text library and constructing a test action function library to be filled.
Specifically, an Open method in a Workbooks object in the VBA is used for opening an Excel data file, and a corresponding test action text library data file is obtained. And then, establishing and opening a test action function library to be filled by using an Open method in the VBA.
And step 32, establishing and packaging a basic action large class in the test action function library to be filled according to the action classification of the control function signal.
Specifically, the basic action broad category can be divided into a setting broad category and an acquisition broad category.
Specifically, in the specific execution process of this step, a system class library required in compilation and a basic class library provided by the test equipment platform need to be added to the test action function library to be filled, and then a basic action class is created and packaged in the test action function library to be filled according to the action classification of the control function signal.
And step 33, encapsulating corresponding basic action functions in the basic action categories according to the basic action items of the action categories to obtain the test action function library.
Specifically, a basic action item sequence formed by basic action items corresponding to a basic action category is obtained according to a loading result of the test action text library, the basic action items comprise names, descriptions, parameters and corresponding signal values of the actions, and then the basic action items are packaged into a basic action function according to the basic action item sequence, and finally the construction of the test action function library is completed.
Steps 31 to 33 provide the necessary execution functions for the test case script by encapsulating the creation of the base action function.
And step 13, calling the test action text library, associating the function classification of the control function signal with the corresponding test action, and constructing a test case text library.
Specifically, the test case text library is equivalent to a natural language text corresponding to the execution logic of the test case script. The function classification of the control function signal can comprise one or more of a master control system function class, an outdoor lamp function class, an indoor lamp function class, a central control door lock function class, a steering lamp function class, a driver information function class, an electric vehicle window function class, a front windscreen wiper function class, a rear defrosting function class, an anti-theft alarm function class and a vehicle searching function class.
In the step, the test action text library is called to acquire the action classification and the action execution sequence specifically corresponding to a certain function classification of the control function signal, so that a test case text library capable of describing the execution logic of the test case script is constructed.
Here, the present invention further provides a better test case text library construction scheme, including:
and step 41, constructing a test case text library to be filled according to the function classification of the control function signal.
Specifically, in the step, a test case text library to be filled is constructed according to the function classification result of the control function signal. The function classification corresponds to a test function class of the actual vehicle controller.
And 42, calling the test action text library, and associating the action numerical value corresponding to the function classification of the control function signal into the test case text library to be filled.
Specifically, by Excel data validity limitation, an action numerical value corresponding to the function classification of the control function signal is associated to a test case text library to be filled, and the specific flow comprises the following steps: adding VBA macro codes in a test case text library to be filled, performing multi-level data validity limitation according to basic test action classification, adding data validity limitation in a corresponding cell change event function selection change, and limiting a data source to be a basic test action in the test action text library.
Step 43, arranging the test actions corresponding to the function classification of the control function signals in the test case text library to be filled according to the action sequence of the test case of the vehicle controller, and acquiring the test case text library.
Specifically, the step completes the construction of the test case text library by arranging the basic test actions in the test action text library. The method comprises the steps of increasing test actions according to a certain sequence according to an action sequence of a test case, and simultaneously appointing information such as a working gear, a voltage mode, a key state and the like of the test actions and expected test results after the test actions are executed, so that the test case text library is obtained.
Step 41 to step 43 construct a test case text library capable of describing the execution logic of the test case script, and provide necessary support for efficiently and automatically realizing the test case script. When the test requirement is changed, the new test requirement can be adapted only by carrying out corresponding change in the test case text library and then regenerating the script, so that the application range and the flexibility of the scheme are improved.
And 14, calling the test action function library according to the test action sequence of the test case text library to generate a test case script of the vehicle controller.
Specifically, the test case script of the vehicle controller generated in this step can be matched with related test equipment to complete the automated test of the vehicle controller in a virtual environment and/or a hardware environment.
Specifically, the test case text library can describe the execution logic of the test case script, and the test action sequence is obtained according to the test case text library, and then the test action function library is called, so that the execution code corresponding to the test action sequence can be obtained, and the test case script of the vehicle controller is automatically generated.
Here, the present invention further provides a better test case script generation scheme, including:
and 51, loading the test case text library and constructing a test case script to be filled.
Specifically, in the step, an Open method in a Workbooks object in the VBA is used for opening an Excel data file, a corresponding test case text library data file is found, and then a test case script to be filled is created and opened by using the Open method in the VBA.
And step 52, creating and packaging a test function class in the test case script to be filled according to the function classification of the control function signal.
Specifically, the test functions may include one or more of a master control system function, an outdoor lamp function, an indoor lamp function, a central control door lock function, a steering lamp function, a driver information function, a power window function, a front wiper function, a rear defrosting function, an anti-theft alarm function, and a vehicle searching function.
Specifically, in the specific execution process of this step, a system class library required in compilation, a basic class library provided by the device test platform, and the test action function library need to be added to the test case script to be filled, and then a test function class is created and packaged in the test case script to be filled according to the function classification of the control function signal.
And 53, calling the test case text library to obtain the test action sequence of the test function class.
Specifically, the test action sequence extracted in this step includes all test action permutations related to the completion of this test function, including information such as applicable gear, voltage mode, key status, and the like, and an expected test result after each test action is executed.
And step 54, calling a basic action function of the test action function library in the test function class according to the test action sequence of the test function class to generate a test case script of the vehicle controller.
Specifically, the step sequentially extracts the test action sequence from the test case text library, and calls the basic action function to create the test action sequence script under the test function category corresponding to the test case script.
Based on the same inventive concept as the method, an embodiment of the present invention further provides a device for generating a test case script for a vehicle controller, as shown in fig. 2, the device is a schematic structural diagram of the embodiment of the device, and the device includes:
the first construction module 61 is used for constructing a test action text library according to the action value of the control function signal of the vehicle controller;
a second constructing module 62, configured to load the test action text library, create and package a basic action function according to the basic action item of the action classification of the control function signal, and construct a test action function library;
a third constructing module 63, configured to invoke the test action text library, associate the function classification of the control function signal with a corresponding test action, and construct a test case text library;
and the first generation module 64 is configured to call the test action function library according to the test action sequence of the test case text library, and generate a test case script of the vehicle controller.
In a possible embodiment, the first building block comprises:
the first acquisition module is used for acquiring a signal list text library; the signal list text base comprises all action values of the control function signals of the vehicle controller;
the second acquisition module is used for carrying out action classification on the control function signals of the vehicle controller according to action classification rules to acquire action classification of the control function signals;
the fourth construction module is used for constructing a test action text library to be filled according to the action classification of the control function signal;
and the first operation module is used for associating all action values of the control function signal to the test action text library to be filled to obtain the test action text library.
In a possible embodiment, the second building block comprises:
the fifth construction module is used for loading the test action text library and constructing a test action function library to be filled;
the second operation module is used for establishing and packaging a basic action category in the test action function library to be filled according to the action category of the control function signal;
and the third operation module is used for packaging a corresponding basic action function in the basic action category according to the basic action item of the action category to obtain the test action function library.
In a possible embodiment, the third building block comprises:
the sixth construction module is used for constructing a test case text library to be filled according to the function classification of the control function signal;
the fourth operation module is used for calling the test action text library and associating the action numerical value corresponding to the function classification of the control function signal into the test case text library to be filled;
and the fifth operation module is used for arranging the test action corresponding to the function classification of the control function signal in the test case text library to be filled according to the action sequence of the test case of the vehicle controller, and acquiring the test case text library.
In a possible embodiment, the first generating module includes:
the seventh construction module is used for loading the test case text library and constructing a test case script to be filled;
a sixth operation module, configured to create and package a test function class in the test case script to be filled according to the function classification of the control function signal;
the seventh operation module is used for calling the test case text library to obtain the test action sequence of the test function class;
and the second generation module is used for calling a basic action function of the test action function library in the test function class according to the test action sequence of the test function class to generate a test case script of the vehicle controller.
In one possible embodiment, the action classification of the control function signal includes a set broad class and an acquire broad class;
the setting broad class comprises one or more of a voltage mode setting class, a power management setting class, a state setting class, a general switch setting class, a wiper switch setting class, a lamp switch setting class and a Bus signal setting class;
the acquisition broad class includes one or more of a Bus signal acquisition class and a drive signal acquisition class.
In a possible embodiment, the function classification of the control function signal includes one or more of a general control system function class, an outdoor lamp function class, an indoor lamp function class, a central control door lock function class, a turn signal function class, a driver information function class, a power window function class, a front wiper function class, a rear defrosting function class, an anti-theft alarm function class and a car-finding function class.
Based on the same inventive concept as that in the foregoing embodiments, an embodiment of the present invention further provides a vehicle controller test case script generating device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of any one of the foregoing methods when executing the program.
Based on the same inventive concept as in the previous embodiments, embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of any of the methods described above.
The technical scheme provided by the embodiment of the invention at least has the following technical effects or advantages:
the embodiment of the invention firstly obtains the action value of the control function signal and constructs a test action text library; then, according to the test action text library, a test action function library is constructed; then, calling a test action text library to construct a test case text library; and finally, calling a test action function library to generate a test case script of the vehicle controller.
According to the embodiment of the invention, the script code of the vehicle controller test case can be automatically generated according to the control function of the vehicle controller, the format of the test case script is standardized, the script generation efficiency is improved, and the vehicle controller test case script is efficiently and uniformly obtained.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (modules, systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A vehicle controller test case script generation method is characterized by comprising the following steps:
constructing a test action text library according to the action value of a control function signal of the vehicle controller;
loading the test action text library, creating and packaging a basic action function according to the basic action items of the action classification of the control function signal, and constructing a test action function library;
calling the test action text library, associating the function classification of the control function signal with the corresponding test action, and constructing a test case text library;
and calling the test action function library according to the test action sequence of the test case text library to generate a test case script of the vehicle controller.
2. The method for generating the test case script of the vehicle controller according to claim 1, wherein the constructing a test action text library according to the action value of the control function signal of the vehicle controller includes:
acquiring a signal list text library; the signal list text base comprises all action values of the control function signals of the vehicle controller;
according to action classification rules, carrying out action classification on control function signals of the vehicle controller to obtain action classification of the control function signals;
constructing a test action text library to be filled according to the action classification of the control function signal;
and associating all action values of the control function signal to the test action text library to be filled to obtain the test action text library.
3. The method for generating the test case script of the vehicle controller according to claim 1, wherein the loading the test action text library, creating and packaging a basic action function according to the basic action item of the action classification of the control function signal, and constructing a test action function library comprises:
loading the test action text library and constructing a test action function library to be filled;
according to the action classification of the control function signal, establishing and packaging a basic action large class in the test action function library to be filled;
and according to the basic action items of the action classification, packaging corresponding basic action functions in the basic action categories to obtain the test action function library.
4. The method for generating the test case script of the vehicle controller according to claim 1, wherein the step of calling the test action text library, associating the function classification of the control function signal with a corresponding test action, and constructing the test case text library comprises:
constructing a test case text library to be filled according to the function classification of the control function signal;
calling the test action text library, and associating the action numerical value corresponding to the function classification of the control function signal into the test case text library to be filled;
and arranging the test action corresponding to the function classification of the control function signal in the test case text library to be filled according to the action sequence of the test case of the vehicle controller, and acquiring the test case text library.
5. The method for generating the test case script of the vehicle controller according to claim 1, wherein the step of calling the test action function library according to the test action sequence of the test case text library to generate the test case script of the vehicle controller comprises:
loading the test case text library and constructing a test case script to be filled;
according to the function classification of the control function signal, creating and packaging a test function class in the test case script to be filled;
calling the test case text library to obtain a test action sequence of the test function class;
and calling a basic action function of the test action function library in the test function class according to the test action sequence of the test function class to generate a test case script of the vehicle controller.
6. The vehicle controller test case script generation method of claim 1, wherein the action classification of the control function signal comprises a set broad class and an obtain broad class;
the setting broad class comprises one or more of a voltage mode setting class, a power management setting class, a state setting class, a general switch setting class, a wiper switch setting class, a lamp switch setting class and a Bus signal setting class;
the acquisition broad class includes one or more of a Bus signal acquisition class and a drive signal acquisition class.
7. The method according to claim 1, wherein the function categories of the control function signals include one or more of a master control system function category, an outdoor lamp function category, an indoor lamp function category, a central door lock function category, a turn signal function category, a driver information function category, a power window function category, a front wiper function category, a rear defrost function category, an anti-theft alarm function category, and a vehicle-finding function category.
8. A vehicle controller test case script generating apparatus, the apparatus comprising:
the first construction module is used for constructing a test action text library according to the action value of the control function signal of the vehicle controller;
the second construction module is used for loading the test action text library, creating and packaging a basic action function according to the basic action items of the action classification of the control function signal, and constructing a test action function library;
the third building module is used for calling the test action text library, associating the function classification of the control function signal with the corresponding test action, and building a test case text library;
and the first generation module is used for calling the test action function library according to the test action sequence of the test case text library to generate the test case script of the vehicle controller.
9. A vehicle controller test case script generating apparatus, comprising:
a memory for storing a computer program;
a processor for executing the computer program to carry out the steps of the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to carry out the steps of the method of any one of claims 1 to 7.
CN202011253045.1A 2020-11-11 2020-11-11 Method and device for generating test case script of vehicle controller Active CN112506756B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011253045.1A CN112506756B (en) 2020-11-11 2020-11-11 Method and device for generating test case script of vehicle controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011253045.1A CN112506756B (en) 2020-11-11 2020-11-11 Method and device for generating test case script of vehicle controller

Publications (2)

Publication Number Publication Date
CN112506756A true CN112506756A (en) 2021-03-16
CN112506756B CN112506756B (en) 2023-06-06

Family

ID=74957845

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011253045.1A Active CN112506756B (en) 2020-11-11 2020-11-11 Method and device for generating test case script of vehicle controller

Country Status (1)

Country Link
CN (1) CN112506756B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114755936A (en) * 2022-04-20 2022-07-15 中国第一汽车股份有限公司 Automatic test system and method for air suspension
CN114815786A (en) * 2022-06-24 2022-07-29 江西五十铃汽车有限公司 Test method and system for simulating alarm function triggering and electronic equipment
CN115687102A (en) * 2022-10-21 2023-02-03 广州汽车集团股份有限公司 Test method of vehicle-mounted controller, and test script generation method and device
WO2024078601A1 (en) * 2022-10-14 2024-04-18 瞬联软件科技(北京)有限公司 Icon detection script generation method, and device and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179363A1 (en) * 2005-02-07 2006-08-10 Labanca John Online testing unification system with remote test automation technology
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
US20070220347A1 (en) * 2006-02-22 2007-09-20 Sergej Kirtkow Automatic testing for dynamic applications
CN101141319A (en) * 2007-05-23 2008-03-12 中兴通讯股份有限公司 Function operation packaging based automatization test script implementing method and apparatus
CN102722437A (en) * 2012-05-29 2012-10-10 北京空间飞行器总体设计部 Spacecraft test system and spacecraft test method based on assemblies and scripts
CN104484269A (en) * 2014-11-27 2015-04-01 北京广利核系统工程有限公司 Method for automatically generating testing script
US20150331733A1 (en) * 2014-05-13 2015-11-19 Netapp, Inc. Tag based selection of test scripts for failure analysis
CN105243013A (en) * 2015-09-17 2016-01-13 浪潮(北京)电子信息产业有限公司 Software testing method and system
CN106407054A (en) * 2016-08-30 2017-02-15 浪潮(北京)电子信息产业有限公司 BMC automatic testing system and method
WO2018121531A1 (en) * 2016-12-30 2018-07-05 中兴通讯股份有限公司 Method and apparatus for generating test case script
CN108255702A (en) * 2017-09-21 2018-07-06 平安科技(深圳)有限公司 A kind of test case creation method, apparatus, equipment and storage medium
CN108255706A (en) * 2017-11-27 2018-07-06 平安科技(深圳)有限公司 Edit methods, device, terminal device and the storage medium of automatic test script
US20180267887A1 (en) * 2017-03-16 2018-09-20 Wipro Limited Method and system for automatic generation of test script
US20190188116A1 (en) * 2017-12-20 2019-06-20 10546658 Canada Inc. Automated software testing method and system
CN111581082A (en) * 2020-04-21 2020-08-25 东风汽车集团有限公司 Vehicle-mounted controller test script generation device and method
CN111767226A (en) * 2020-06-30 2020-10-13 上海云轴信息科技有限公司 Method, system and equipment for testing cloud computing platform resources

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060179363A1 (en) * 2005-02-07 2006-08-10 Labanca John Online testing unification system with remote test automation technology
US20070220347A1 (en) * 2006-02-22 2007-09-20 Sergej Kirtkow Automatic testing for dynamic applications
CN101025686A (en) * 2007-03-22 2007-08-29 中兴通讯股份有限公司 Automation test system and test script generating and operating method
CN101141319A (en) * 2007-05-23 2008-03-12 中兴通讯股份有限公司 Function operation packaging based automatization test script implementing method and apparatus
CN102722437A (en) * 2012-05-29 2012-10-10 北京空间飞行器总体设计部 Spacecraft test system and spacecraft test method based on assemblies and scripts
US20150331733A1 (en) * 2014-05-13 2015-11-19 Netapp, Inc. Tag based selection of test scripts for failure analysis
CN104484269A (en) * 2014-11-27 2015-04-01 北京广利核系统工程有限公司 Method for automatically generating testing script
CN105243013A (en) * 2015-09-17 2016-01-13 浪潮(北京)电子信息产业有限公司 Software testing method and system
CN106407054A (en) * 2016-08-30 2017-02-15 浪潮(北京)电子信息产业有限公司 BMC automatic testing system and method
WO2018121531A1 (en) * 2016-12-30 2018-07-05 中兴通讯股份有限公司 Method and apparatus for generating test case script
US20180267887A1 (en) * 2017-03-16 2018-09-20 Wipro Limited Method and system for automatic generation of test script
CN108255702A (en) * 2017-09-21 2018-07-06 平安科技(深圳)有限公司 A kind of test case creation method, apparatus, equipment and storage medium
CN108255706A (en) * 2017-11-27 2018-07-06 平安科技(深圳)有限公司 Edit methods, device, terminal device and the storage medium of automatic test script
US20190188116A1 (en) * 2017-12-20 2019-06-20 10546658 Canada Inc. Automated software testing method and system
CN111581082A (en) * 2020-04-21 2020-08-25 东风汽车集团有限公司 Vehicle-mounted controller test script generation device and method
CN111767226A (en) * 2020-06-30 2020-10-13 上海云轴信息科技有限公司 Method, system and equipment for testing cloud computing platform resources

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨世春: "《电动汽车设计基础》", 31 July 2013, 国防工业出版社, pages: 130 - 134 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114755936A (en) * 2022-04-20 2022-07-15 中国第一汽车股份有限公司 Automatic test system and method for air suspension
CN114815786A (en) * 2022-06-24 2022-07-29 江西五十铃汽车有限公司 Test method and system for simulating alarm function triggering and electronic equipment
WO2024078601A1 (en) * 2022-10-14 2024-04-18 瞬联软件科技(北京)有限公司 Icon detection script generation method, and device and storage medium
CN115687102A (en) * 2022-10-21 2023-02-03 广州汽车集团股份有限公司 Test method of vehicle-mounted controller, and test script generation method and device

Also Published As

Publication number Publication date
CN112506756B (en) 2023-06-06

Similar Documents

Publication Publication Date Title
CN112506756B (en) Method and device for generating test case script of vehicle controller
US7200543B2 (en) Method for fault analysis using simulation
CN107943008B (en) Automated diagnosis test method based on VT system
CN112532299B (en) Satellite test automatic execution system based on module splicing
CN110221828B (en) Visual programming method for communication program of automobile electronic control unit
CN111538628B (en) Information processing method, device, equipment and medium
CN110244688A (en) Meter bus panel automatic generation method and its system based on LabVIEW
CN111767589A (en) Batch processing method, system, terminal and storage medium based on static rigidity of automobile mounting point
CN104123401A (en) CAE intelligent system
Hansen et al. Model-in-the-loop and software-in-the-loop testing of closed-loop automotive software with arttest
CN201497881U (en) Development platform of vehicle central control unit
CN201812197U (en) Device for testing automobile electronic control system
CN111581101A (en) Software model testing method, device, equipment and medium
van de Mortel-Fronczak et al. Supervisor synthesis in model-based automotive systems engineering
CN115203031A (en) Automatic driving and automatic generalization simulation test method and device
CN113220664B (en) Satellite telemetering intelligent interpretation system and method for rapidly generating Lua script rule
US10521332B1 (en) Parametrization of a simulation model
Beuche et al. Managing flexibility: Modeling binding-times in simulink
CN113542381B (en) Message frame processing method and device
Shaout et al. Automotive embedded systems-model based approach review.
Conrad et al. Model-based development of in-vehicle software
Liang et al. Multi-level modeling for hybrid manufacturing systems using Arena and MATLAB
Ambert et al. Applying an MBT toolchain to automotive embedded systems: case study reports
Schubert et al. Executable Specs: What makes one, and how are they used?
CN113673088B (en) Automatic test system construction method and system

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