CN115687102A - Test method of vehicle-mounted controller, and test script generation method and device - Google Patents

Test method of vehicle-mounted controller, and test script generation method and device Download PDF

Info

Publication number
CN115687102A
CN115687102A CN202211296248.8A CN202211296248A CN115687102A CN 115687102 A CN115687102 A CN 115687102A CN 202211296248 A CN202211296248 A CN 202211296248A CN 115687102 A CN115687102 A CN 115687102A
Authority
CN
China
Prior art keywords
test
minimum
action
test action
minimum test
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.)
Pending
Application number
CN202211296248.8A
Other languages
Chinese (zh)
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.)
Guangzhou Automobile Group Co Ltd
Original Assignee
Guangzhou Automobile Group 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 Guangzhou Automobile Group Co Ltd filed Critical Guangzhou Automobile Group Co Ltd
Priority to CN202211296248.8A priority Critical patent/CN115687102A/en
Publication of CN115687102A publication Critical patent/CN115687102A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

The application discloses a test method of a vehicle-mounted controller, a test script generation method and a test script generation device, wherein the test method of the vehicle-mounted controller comprises the following steps: calling a parsing function parsing script path of a minimum test action corresponding to the dormancy wakeup test action; reading a test sequence text of the minimum test action according to the script path; analyzing the minimum test action according to the test sequence text; and calling an execution function corresponding to the minimum test action to test the minimum test action. The script path is analyzed by calling the analytic function of the minimum test action corresponding to the dormancy awakening test action, so that a corresponding test sequence text is obtained, each minimum test action corresponds to one analytic function, the test sequence text and the execution function, each minimum test action corresponds to one test case, dormancy awakening test is not a certain number of test cases any more, and the practicability of the script is improved.

Description

Test method of vehicle-mounted controller, and test script generation method and device
Technical Field
The present disclosure relates to the field of vehicle braking technologies, and in particular, to a method and an apparatus for testing a vehicle-mounted controller, a method and an apparatus for generating a test script, an electronic device, and a computer-readable storage medium.
Background
Along with the intelligent development of automobiles, more and more electronic control units are carried by the automobiles, and the probability of power shortage of the whole automobiles is increased, so that the network dormancy awakening function of each controller of the whole automobiles needs to be specially tested in a large quantity, the dormancy awakening test needs to design a large number of arrangement and combination working conditions and carry out a pressure test for a long enough time, the current dormancy awakening test can only realize a certain number of solidified test cases, and the practicability is low.
Disclosure of Invention
In view of the foregoing problems, the present application provides a method for testing an onboard controller, a method for generating a test script, an apparatus, an electronic device, and a computer-readable storage medium.
In a first aspect, an embodiment of the present application provides a method for testing an on-board controller, where the method includes: calling an analytic function corresponding to a minimum test action in the dormancy awakening test actions, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test action; analyzing and searching a script path corresponding to the minimum test action according to the analysis function; reading a test sequence text of the minimum test action according to the script path; analyzing the minimum test action according to the test sequence text; and calling an execution function corresponding to the minimum test action to test the minimum test action.
In a second aspect, an embodiment of the present application provides a method for generating a test script of an on-board controller, where the method includes: acquiring a minimum test action in the dormancy awakening test actions of the vehicle-mounted controller; determining a target minimum test action corresponding to the test requirement in all the minimum test actions according to the test requirement; acquiring parameters corresponding to the target minimum test action; and generating a test script corresponding to the test requirement according to the target minimum test action and the parameter corresponding to the target minimum test action.
In a third aspect, an embodiment of the present application provides a testing apparatus for an on-vehicle controller, where the apparatus includes: the analysis function calling module is used for calling an analysis function corresponding to the minimum test action in the dormancy awakening test actions, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test actions; the script path acquisition module is used for searching a script path corresponding to the minimum test action according to the analysis function; the test sequence text reading module is used for reading the test sequence text of the minimum test action according to the script path; the analysis module is used for analyzing the minimum test action according to the test sequence text; and the execution function calling module is used for calling the execution function corresponding to the minimum test action to test the minimum test action.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of testing an onboard controller as provided by the first aspect above.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the method for testing the vehicle-mounted controller provided in the first aspect.
According to the scheme, the script path is analyzed by calling the analytic function of the minimum test action corresponding to the dormancy awakening test action, so that the corresponding test sequence text is obtained, the minimum test action corresponding to the dormancy awakening test action is obtained by analyzing the test sequence text, finally, the execution function of the minimum test action is called to test the minimum test action, each minimum test action corresponds to one analytic function, the test sequence text and the execution function, each minimum test action corresponds to one test case, the dormancy awakening test is not a certain number of test cases any more, and the practicability of the script is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a flow chart of a testing method of an on-board controller according to an embodiment of the present application.
Fig. 2 shows a flow chart of a testing method of an on-board controller according to another embodiment of the present application.
Fig. 3 is a schematic flow chart illustrating a testing method of an on-board controller according to still another embodiment of the present application.
Fig. 4 is a flowchart illustrating a method for generating a test script of an onboard controller according to an embodiment of the present application.
Fig. 5 shows a block diagram of a testing apparatus of an on-vehicle controller according to an embodiment of the present application.
Fig. 6 shows a block diagram of an electronic device for executing a test method of an onboard controller according to an embodiment of the present application.
Fig. 7 illustrates a storage medium storing or carrying program codes implementing a test method of an on-vehicle controller according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
A currently common script development manner is to compile a corresponding test case function in a script file for a test case, for example, to wake up a test case function of an Electronic Control Unit (ECU) by a test network management message, a test case function of an IG hard wire wake-up ECU by a test, and a test case function of a wake-up bit of the ECU by the test, and then call up a plurality of test case functions in a main function.
Aiming at the current script development mode, the inventor finds that the problem of test script solidification exists, and a test case function needs to be rewritten for a newly added case. In addition, the method leads the test cases to be more numerous, the test script codes to be more huge, the whole body is dragged and moved, the modification and the maintenance are difficult, and only a certain number of quantized cases can be compiled, the test requirement of expanding a large number of cases in sleep awakening test can not be met, and all tests need to be realized through the script codes.
In view of the above problems, a method and an apparatus for testing a vehicle-mounted controller, a method and an apparatus for generating a test script, an electronic device, and a computer-readable storage medium according to an embodiment of the present disclosure are provided. The specific test method of the vehicle-mounted controller is described in detail in the following embodiments.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a testing method for a vehicle-mounted controller according to an embodiment of the present application. In a specific embodiment, the method for testing the vehicle-mounted controller is applied to the testing apparatus 300 of the vehicle-mounted controller shown in fig. 5 and the electronic device 100 provided with the testing apparatus 300 of the vehicle-mounted controller.
The following will describe a specific flow of the present embodiment by taking an electronic device as an example. As will be described in detail with respect to the flow shown in fig. 1, the method for testing the onboard controller may specifically include the following steps:
step S110: and calling an analysis function corresponding to the minimum test action in the dormancy awakening test actions, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test action.
The onboard Controller may be a Body Control Module (BCM), an Electronic Control Unit (ECU), a Vehicle Control Unit (VCU), or a Transmission Control Unit (TCU), which is a Controller on the Vehicle.
The minimum test action can be obtained by analyzing the data such as an electrical schematic diagram, an electricity consumption information table and the like of a vehicle controller such as a vehicle body controller in advance, control principle information of each signal in the vehicle controller can be obtained, and the sleep awakening test action of the vehicle-mounted controller is analyzed and extracted according to the control principle information to obtain the minimum test action.
Step S120: and analyzing the script path corresponding to the minimum test action according to the analysis function.
Each minimum test action corresponds to an analysis function, when the minimum test action needs to be tested, the analysis function corresponding to the minimum test action needs to be called, and the script file path corresponding to the minimum test action is obtained through the analysis function.
Step S130: and reading the test sequence text of the minimum test action according to the script path.
The test sequence text corresponds to the natural language text of the test script. And the analysis function reads the test sequence text matched with the script path by analyzing and acquiring the script path.
Step S140: and analyzing the minimum test action according to the test sequence text.
One test sequence text corresponds to one minimum test action, and the minimum test action corresponding to the test sequence text can be obtained through analysis according to the test sequence text.
Step S150: and calling an execution function corresponding to the minimum test action to test the minimum test action.
And after the minimum test action is determined, calling an execution function corresponding to the minimum test action, and executing the test on the minimum test action, thereby realizing the test on the vehicle-mounted controller.
According to the scheme, the script path is analyzed by calling the analytic function of the minimum test action corresponding to the dormancy awakening test action, so that the corresponding test sequence text is obtained, the minimum test action corresponding to the dormancy awakening test action is obtained by analyzing the test sequence text, finally, the execution function of the minimum test action is called to test the minimum test action, each minimum test action corresponds to one analytic function, the test sequence text and the execution function, a plurality of minimum test actions are not written in the same script, the solidification test mode written by the traditional sequential structure script is broken, and the practicability of the script is improved.
In another embodiment of the present application, please refer to fig. 2, and fig. 2 is a schematic flowchart illustrating a testing method for a vehicle-mounted controller according to another embodiment of the present application, which specifically includes the following steps:
step S210: naming the minimum test action according to a predetermined format.
In order to better use the minimum test action, the minimum test action is named according to a preset format, the preset format can be a camel-type naming method, and can also be a format defined by a user, for example, a KL30 electric control action is named as Power (), a KL15 electric control action is named as IG1 (), an NM message sending action is named as MsgNM (), an application message sending action is named as MsgApp (), a detection action is named as Check (), a Reset action is named as Reset (), a waiting action is named as WaitFor (), a sleep state judging action is named as IsSleep (), a stop message detecting action is named as IsSilent (), and a normal work detecting action is named as IsWork (). The naming format of the minimum test action is not limited herein.
Step S220: and compiling the named minimum test action to obtain a test sequence text corresponding to the minimum test action.
In order to test the test action set, corresponding test sequence texts need to be written for a plurality of minimum test actions in the test action set.
And compiling the named test action set to obtain a test sequence text corresponding to the minimum test action, wherein the test sequence text name corresponds to the minimum test action name one to one, so that the test sequence text corresponding to the minimum test action can be searched more conveniently. For example, the text name of the test sequence corresponding to the KL30 electrical control action is also Power ().
Step S230: and packaging the execution functions corresponding to the test actions in the test action set one by one, and enabling the function names of the execution functions to correspond to the names of the minimum test actions corresponding to the execution functions one by one.
Encapsulation, i.e. hiding the properties and implementation details of the object, exposes the interface only to the outside.
And packaging the execution statement corresponding to the minimum test action to form an execution function corresponding to the minimum test action, and calling the packaged execution function only without repeatedly writing the execution statement when the minimum test action needs to be executed each time, so that the working efficiency is improved.
And packaging the execution functions corresponding to the test actions in the test action set one by one, enabling the function names of the execution functions to correspond to the names of the test actions corresponding to the execution functions one by one, and enabling the packaged execution function interface to be convenient for a user to call.
In the specific implementation process, a test action set is formed by analyzing and extracting a plurality of minimum test actions obtained by the analysis of the sleep awakening test actions of the vehicle-mounted control. The test action set may be all the minimum test actions, or may be a test action set formed by a plurality of classification test actions, which is obtained by classifying a plurality of minimum test actions according to a preset classification rule. The preset classification rules may be classified according to functions, or may be classified according to types of the vehicle-mounted controllers, and the specific classification rules are determined by users, which is not limited herein. For example, the following minimum test actions, KL30 electrical control action, KL15 electrical control action, NM message sending action, application message sending action, detection action, reset action, waiting action, sleep state judgment action, stop message detection action, and normal operation detection action can be analyzed and proposed for the vehicle-mounted controller. And forming other minimum sending actions such as NM message sending actions and application message sending actions into a sending action test set, and forming a plurality of minimum electric control actions into an electric control action test set.
Specifically, the analysis and extraction of the dormancy wakeup test action of the vehicle-mounted controller are performed to obtain a plurality of minimum test actions corresponding to the dormancy wakeup test action, and the formation of the test action set can be based on the universality of the dormancy wakeup test action of the vehicle-mounted controller and the test action principle, and the analysis and extraction of the test action set are performed to obtain a plurality of minimum test actions corresponding to the dormancy wakeup test action, so that the test action set is formed.
The universality refers to the minimum test action used in all the vehicle-mounted controllers, for example, the minimum test actions such as application message sending action, detection action and the like.
The test action principle includes, but is not limited to, a test action minimization principle, and the test action minimization principle refers to performing layer-by-layer analysis and extraction on test actions in the vehicle-mounted controller to obtain a minimum test action which cannot be analyzed and extracted again.
The dormant awakening action of the vehicle-mounted controller is analyzed and extracted according to the universality and the test action principle, so that a test action set can be obtained more perfectly.
Step S240: and calling an analysis function analysis script path of a minimum test action corresponding to the dormancy awakening test action, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test action.
Step S250: and reading the test sequence text of the minimum test action according to the script path.
Step S260: and analyzing the minimum test action according to the test sequence text.
Step S270: and calling an execution function corresponding to the minimum test action to test the minimum test action.
The detailed descriptions of steps S240 to S270 refer to steps S110 to S140, which are not repeated herein.
According to the scheme, the script path is analyzed by calling the analytic function of the minimum test action corresponding to the dormancy awakening test action, so that the corresponding test sequence text is obtained, the minimum test action corresponding to the dormancy awakening test action is obtained by analyzing the test sequence text, finally, the execution function of the minimum test action is called to test the minimum test action, each minimum test action corresponds to one analytic function, the test sequence text and the execution function, each minimum test action corresponds to one test case, the dormancy awakening test is not a certain number of test cases any more, and the practicability of the script is improved. And the name of the minimum test action is consistent with the test sequence text name and the execution function name, so that the test sequence text and the execution function corresponding to the minimum test action can be acquired more quickly, and the working efficiency is improved.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a testing method for a vehicle-mounted controller according to another embodiment of the present application:
step S310: and calling an analysis function analysis script path of a minimum test action corresponding to the dormancy awakening test action, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test action.
Step S320: and reading the test sequence text of the minimum test action according to the script path.
Step S330: and analyzing the minimum test action according to the test sequence text.
Step S340: and calling an execution function corresponding to the minimum test action to test the minimum test action.
The detailed descriptions of steps S310 to S340 refer to steps S110 to S140, which are not repeated herein.
Step S350: and setting a wake-up parameter for the sleep wake-up test action, wherein the wake-up parameter is used for detecting whether the test is successful, and the minimum test action comprises the minimum wake-up test action.
In a specific implementation process, the NM packet sending action further includes a wakeup bit, so that a wakeup parameter needs to be set for the NM packet sending action, for example, msgNM (a, B, C), where a is a packet Channel, for example, when a is a Channel, it indicates that the NM packet sending action is on the Channel, B is a wakeup indication bit, for example, B is State/Byte3, which means that the third Byte is set as a wakeup indication bit, when the third Byte is preset data, the on-board controller is woken up, and C is a network packet indication bit, for example, when C is Byte1, it means that the first Byte is a preset data, it indicates a network packet.
In addition to the above parameters, the present application also proposes to set parameters for the KL30 electrical control operation, for example, power (0) represents the Power-off state of KL30, and Power (1) represents the Power-on state of KL 30. When the waiting action is WaitFor (300), the waiting time is 300ms, and the waiting time can be set by the user, which is not limited herein. The other minimum test actions can be set with parameters, and different parameters represent different states of the minimum test action. The specific parameters are set by the user.
Referring to fig. 4, fig. 4 is a flowchart illustrating a method for generating a test script of an on-board controller according to an embodiment of the present application. In a specific embodiment, the method for generating the test script of the vehicle-mounted controller is applied to a test method of the vehicle-mounted controller, and the test script is provided for the test method of the vehicle-mounted controller.
As will be described in detail with respect to the flow shown in fig. 4, the method for generating the test script of the vehicle-mounted controller may specifically include the following steps:
step S410: and acquiring the minimum test action in the sleep awakening test actions of the vehicle-mounted controller.
For obtaining the minimum test action, refer to the obtaining manner of the minimum test action in the foregoing embodiment, which is not limited herein.
According to the acquisition mode in the embodiment, the minimum test action in the sleep awakening actions of the vehicle-mounted controller is acquired, so that the sleep awakening actions of the vehicle-mounted controller can be conveniently tested.
Step S420: and determining a target minimum test action corresponding to the test requirement in all the minimum test actions according to the test requirement.
The test request may be determined by the user or may be a predetermined request.
Different test requirements need different minimum test actions to be realized, so that the test requirements can correspond to one minimum test action or a plurality of minimum test actions for determining the minimum test actions corresponding to the different test requirements.
Step S430: and acquiring parameters corresponding to the target minimum test action.
A parameter is an adjustable parameter that must be constrained.
In the present application, the parameter corresponding to the target minimum test operation is a constraint parameter set to fulfill a test request.
Step S440: and generating a test script corresponding to the test requirement according to the target minimum test action and the parameters corresponding to the target minimum test action.
The target minimum test action and the parameters corresponding to the target minimum test action are generated together to form the test script, so that the process of assigning values to the target minimum test action in the test process is reduced, and the test efficiency is improved.
In another embodiment of the application, the target minimum test action can also be directly used to generate a test script corresponding to the test requirement, parameters are flexibly set for the target minimum test action in the test process, and the test requirement under different conditions can be adapted.
In the scheme of the application, the target minimum test action and the parameter corresponding to the target minimum test action may be generated together to form the test script corresponding to the test requirement, or the target minimum test action may be used to directly produce the test script corresponding to the test requirement, and a specific test script generation manner is not specifically limited herein.
The test script corresponding to the test requirement is generated through the target minimum test action and the target minimum test parameters, the number of the test cases can be increased, the dormancy awakening of the vehicle-mounted controller can be tested more comprehensively, in addition, the defects of the existing test method can be overcome through the plurality of test cases, and the test practicability is improved.
In the embodiment of the application, the parameter setting is performed on the minimum test actions, so that the condition that each state writes a corresponding state function can be avoided, and the processing load of the processor can be reduced to a certain extent.
Referring to fig. 5, a block diagram of a testing apparatus 300 for an on-board controller according to an embodiment of the present disclosure is shown. The test apparatus 300 for the vehicle-mounted controller is applied to an electronic device, and the test apparatus 300 for the vehicle-mounted controller includes: the analysis function calling module 310 is configured to call an analysis function corresponding to a minimum test action in the sleep wake-up test actions, where the minimum test action is obtained by analyzing and extracting the sleep wake-up test action; a script path obtaining module 320, configured to analyze, according to the analysis function, a script path corresponding to the minimum test action; the test sequence text reading module 330 is configured to read the test sequence text of the minimum test action according to the script path; the parsing module 340 is configured to parse the minimum test action according to the test sequence text; and the execution function calling module 350 is configured to call an execution function corresponding to the minimum test action to test the minimum test action.
In the embodiment of the present application, before parsing the function call module 310, the method further includes: the minimum test action naming module is used for naming the minimum test action according to a preset format; the test sequence text compiling module is used for compiling the named test action set to obtain a test sequence text corresponding to the minimum test action; and the after-naming execution function packaging module is used for packaging the execution functions corresponding to the test actions in the test action set one by one and enabling the function names of the execution functions to correspond to the names of the test actions corresponding to the execution functions one by one.
In an embodiment of the application, the post-naming execution function encapsulation module includes: and the test sequence compiling module is used for compiling the test sequence of the named test action set to obtain a test sequence text corresponding to the minimum test action.
In an embodiment of the application, the parsing function encapsulation module includes: and the analysis function acquisition module is used for packaging a function which can read the test sequence text and analyze the text format of the test sequence text to obtain the analysis function.
In other embodiments of the present application, the testing apparatus 300 of the vehicle-mounted controller further includes a parameter setting module, configured to set a wake-up parameter for the sleep wake-up test action, where the wake-up parameter is used to detect whether the test is successful, and the minimum test action includes the minimum wake-up test action.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 6, a block diagram of an electronic device according to an embodiment of the present application is shown. The electronic device 100 may be a device capable of running an application, such as an electric vehicle or an internal combustion engine vehicle. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 connects various parts within the overall electronic device 100 using various interfaces and lines, and performs various functions of the electronic device 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and calling data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
Referring to fig. 7, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable storage medium 200 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 200 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 200 includes a non-volatile computer-readable storage medium. The computer readable storage medium 200 has storage space for program code 210 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 210 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method of testing an on-board controller, the method comprising:
calling an analytic function corresponding to a minimum test action in the dormancy awakening test actions, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test action;
analyzing the script path corresponding to the minimum test action according to the analysis function;
reading a test sequence text of the minimum test action according to the script path;
analyzing the minimum test action according to the test sequence text;
and calling an execution function corresponding to the minimum test action to test the minimum test action.
2. The method according to claim 1, wherein before the invoking the parsing function corresponding to the minimum test action in the sleep-wake test actions, further comprises:
acquiring a naming format of the minimum test action;
naming all the minimum test actions according to the naming format;
and packaging the execution function corresponding to the minimum test action, and enabling the function name of the execution function to be in one-to-one correspondence with the name of the minimum test action corresponding to the execution function.
3. The method of claim 2, wherein prior to naming all of the minimal test actions according to the naming format, comprising:
and analyzing and extracting to obtain a plurality of minimum test actions corresponding to the dormancy awakening test actions based on the universality of the dormancy awakening test actions of the vehicle-mounted controller and the test action principle.
4. The method of claim 2, wherein reading the test sequence text of the minimum test action according to the script path is preceded by:
and compiling the named minimum test action to obtain a test sequence text corresponding to the minimum test action, and enabling the name of the test sequence text to be in one-to-one correspondence with the name of the minimum test action corresponding to the test sequence text.
5. The method of claim 2, wherein before the invoking the parsing function corresponding to the minimum test action in the sleep wake test actions, the method further comprises:
and packaging a function which can read the test sequence text and analyze the text format of the test sequence text to obtain the analysis function.
6. The method according to any one of claims 1-5, further comprising:
and setting a wake-up parameter for the sleep wake-up test action, wherein the wake-up parameter is used for detecting whether the test is successful, and the minimum test action comprises the minimum wake-up test action.
7. A method for generating a test script of an on-board controller, the method comprising:
acquiring a minimum test action in the dormancy awakening test actions of the vehicle-mounted controller;
determining a target minimum test action corresponding to the test requirement in all the minimum test actions according to the test requirement;
acquiring a parameter corresponding to the target minimum test action;
and generating a test script corresponding to the test requirement according to the target minimum test action and the parameter corresponding to the target minimum test action.
8. An apparatus for testing an on-board controller, the apparatus comprising:
the analysis function calling module is used for calling an analysis function corresponding to the minimum test action in the dormancy awakening test actions, wherein the minimum test action is obtained by analyzing and extracting the dormancy awakening test actions;
the script path acquisition module is used for analyzing the script path corresponding to the minimum test action according to the analysis function;
the test sequence text reading module is used for reading the test sequence text of the minimum test action according to the script path;
the analysis module is used for analyzing the minimum test action according to the test sequence text;
and the execution function calling module is used for calling the execution function corresponding to the minimum test action to test the minimum test action.
9. An electronic device, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-6.
10. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 6.
CN202211296248.8A 2022-10-21 2022-10-21 Test method of vehicle-mounted controller, and test script generation method and device Pending CN115687102A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211296248.8A CN115687102A (en) 2022-10-21 2022-10-21 Test method of vehicle-mounted controller, and test script generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211296248.8A CN115687102A (en) 2022-10-21 2022-10-21 Test method of vehicle-mounted controller, and test script generation method and device

Publications (1)

Publication Number Publication Date
CN115687102A true CN115687102A (en) 2023-02-03

Family

ID=85066275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211296248.8A Pending CN115687102A (en) 2022-10-21 2022-10-21 Test method of vehicle-mounted controller, and test script generation method and device

Country Status (1)

Country Link
CN (1) CN115687102A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192690A (en) * 2023-05-04 2023-05-30 华砺智行(武汉)科技有限公司 Method, system, equipment and medium for rapidly testing C-V2X equipment for surface vector production

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150324274A1 (en) * 2014-05-09 2015-11-12 Wipro Limited System and method for creating universal test script for testing variants of software application
CN111474865A (en) * 2020-03-31 2020-07-31 北京经纬恒润科技有限公司 Dormancy awakening test system for intelligent vehicle-mounted terminal controller
CN112506756A (en) * 2020-11-11 2021-03-16 东风汽车集团有限公司 Vehicle controller test case script generation method and device
CN112699055A (en) * 2021-01-19 2021-04-23 航天恒星科技有限公司 Software automation test method and system with low maintenance cost
CN113326191A (en) * 2021-05-27 2021-08-31 合肥移瑞通信技术有限公司 Current consumption testing method and device and storage medium
CN114124767A (en) * 2021-11-29 2022-03-01 奇瑞商用车(安徽)有限公司 Automatic testing method and device for gateway network management strategy
CN114968777A (en) * 2022-05-18 2022-08-30 中国第一汽车股份有限公司 Test method and device based on Autosar network management mechanism and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150324274A1 (en) * 2014-05-09 2015-11-12 Wipro Limited System and method for creating universal test script for testing variants of software application
CN111474865A (en) * 2020-03-31 2020-07-31 北京经纬恒润科技有限公司 Dormancy awakening test system for intelligent vehicle-mounted terminal controller
CN112506756A (en) * 2020-11-11 2021-03-16 东风汽车集团有限公司 Vehicle controller test case script generation method and device
CN112699055A (en) * 2021-01-19 2021-04-23 航天恒星科技有限公司 Software automation test method and system with low maintenance cost
CN113326191A (en) * 2021-05-27 2021-08-31 合肥移瑞通信技术有限公司 Current consumption testing method and device and storage medium
CN114124767A (en) * 2021-11-29 2022-03-01 奇瑞商用车(安徽)有限公司 Automatic testing method and device for gateway network management strategy
CN114968777A (en) * 2022-05-18 2022-08-30 中国第一汽车股份有限公司 Test method and device based on Autosar network management mechanism and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
徐志峰等: "《基于场景识别的电动汽车唤醒、休眠策略设计》", 《汽车实用技术》, no. 5, pages 31 - 34 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192690A (en) * 2023-05-04 2023-05-30 华砺智行(武汉)科技有限公司 Method, system, equipment and medium for rapidly testing C-V2X equipment for surface vector production

Similar Documents

Publication Publication Date Title
CN107967205B (en) Memory analysis method, device and system and computing equipment
CN111639287A (en) Page processing method and device, terminal equipment and readable storage medium
CN112328489B (en) Test case generation method and device, terminal equipment and storage medium
CN106970816B (en) Software upgrading processing method and device and audio playing equipment
CN109033247A (en) A kind of management method of application program, device, storage medium and terminal
CN115687102A (en) Test method of vehicle-mounted controller, and test script generation method and device
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN111724781B (en) Audio data storage method, device, terminal and storage medium
CN112416775A (en) Software automation testing method and device based on artificial intelligence and electronic equipment
CN114138674A (en) Automatic testing method and device and computer equipment
CN113704117A (en) Algorithm testing system, method and device
CN112559088A (en) Configuration file optimization method, device, server and storage medium
CN114337920A (en) Code analysis method and device and electronic equipment
CN113064556A (en) BIOS data storage method, device, equipment and storage medium
CN113326191A (en) Current consumption testing method and device and storage medium
CN111045507B (en) List management and control method, device, mobile terminal and storage medium
CN110609703B (en) Performance detection tool implementation method and device, readable storage medium and terminal equipment
CN112861138A (en) Software security analysis method and analysis device, electronic device, and storage medium
CN115794756A (en) Simulation file compression method and device, equipment and storage medium
CN112287643B (en) Message monitoring method, device, equipment and computer readable storage medium
CN113849195A (en) Application program loading method and device, storage medium and terminal
CN114020717A (en) Method, device, equipment and medium for acquiring performance data of distributed storage system
CN113742099A (en) Message consumption method, production method, system and storage medium based on set
CN111459819A (en) Software testing method and device, electronic equipment and computer readable medium
CN111813593A (en) Data processing method, equipment, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination