CN113495546B - Method, controller and test bench for realizing automatic test of test cases - Google Patents

Method, controller and test bench for realizing automatic test of test cases Download PDF

Info

Publication number
CN113495546B
CN113495546B CN202010200117.XA CN202010200117A CN113495546B CN 113495546 B CN113495546 B CN 113495546B CN 202010200117 A CN202010200117 A CN 202010200117A CN 113495546 B CN113495546 B CN 113495546B
Authority
CN
China
Prior art keywords
mode
test
input
detection
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010200117.XA
Other languages
Chinese (zh)
Other versions
CN113495546A (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.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle 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 Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN202010200117.XA priority Critical patent/CN113495546B/en
Publication of CN113495546A publication Critical patent/CN113495546A/en
Application granted granted Critical
Publication of CN113495546B publication Critical patent/CN113495546B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • G05B23/0213Modular or universal configuration of the monitoring system, e.g. monitoring system having modules that may be combined to build monitoring program; monitoring system that can be applied to legacy systems; adaptable monitoring system; using different communication protocols
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M17/00Testing of vehicles
    • G01M17/007Wheeled or endless-tracked vehicles
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The invention provides a method, a controller and a test bench for realizing automatic test of a test case, wherein the method comprises the following steps: calling a corresponding BOB configuration file to configure the BOB equipment according to the BOB configuration file name in the input test case table; executing the current test item according to the stepping mode of the current test strip to obtain an execution result of the current test strip; and when all the test items are completely executed, obtaining a test report according to the execution result of each test strip. In the embodiment of the invention, the input signal in the test case replaces the manual signal input of a technician, so that the influence of the environment on the test process and the influence of manual operation on the test period are reduced; by strictly executing the test strip according to the purpose sequence number of the test strip, misoperation caused by environmental factors or self condition factors of technicians is avoided, manual confirmation of time sequence and fault problems after the test is finished is avoided, and the test efficiency is improved.

Description

Method, controller and test bench for realizing automatic test of test cases
Technical Field
The invention relates to the technical field of vehicle testing, in particular to a method, a controller and a test bench for realizing automatic testing of a test case.
Background
With the continuous increase of the functions of the whole vehicle, the testing task is increased. In the process of electric control test of the whole vehicle, a test engineer needs to manually input some signals, such as ON gear, gear change, and stepping ON an accelerator pedal and a brake pedal. Once timing and operational errors can result in a test process failure, the level of automation is low, time is wasted for new test tasks, and efficiency is low. And after the test is finished, the time sequence confirmation and the fault problem confirmation are carried out manually, and the valuable time of a test engineer is wasted. Manual testing is inefficient and validation of results relies heavily on the personal abilities of the engineer. The manual test is severely limited by the environment of the whole vehicle, so that in order to improve the test efficiency, a method capable of realizing automatic test is imperatively developed.
Disclosure of Invention
The technical purpose to be achieved by the embodiment of the invention is to provide a method, a controller and a test bench for realizing automatic test of a test case, which are used for solving the problems that manual test is seriously limited by the environment of a finished automobile and the test efficiency is low in the current finished automobile test process.
In order to solve the above technical problem, an embodiment of the present invention provides a method for implementing automatic test of a test case, including:
calling a BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table, and configuring BOB equipment;
sequentially acquiring a stepping mode of the current test strip according to the serial number of the test items, and executing the current test items according to the stepping mode to obtain an execution result of the current test strip;
and when all the test items are completely executed, obtaining a test report according to the execution result of each test strip.
Specifically, as described above with respect to the method, the step mode includes:
a single input mode, a single input cycle detection or operation mode, a single input cycle detection and operation mode, a multiple input cycle detection or operation mode, a multiple input cycle detection and operation mode, a wait mode, an input clear mode, a timing start mode, a timing end mode, an initialization mode, and a fault clear mode.
Preferably, in the method as described above, when the step mode is a single-input loop detection or operation mode, a single-input loop detection and operation mode, a multiple-input loop detection or operation mode, a multiple-input loop detection and operation mode, an initialization mode, or a fault clearing mode, the step of executing the current test item according to the step mode to obtain the execution result of the current test strip includes:
performing signal input according to the signal input allowable time and the user input variable of the current test strip target, and performing detection according to the signal detection allowable time and the user detection variable in the test case table to obtain a detection result, wherein the sum of the signal input allowable time and the signal detection allowable time is less than the allowable time limit value of the current test strip target;
obtaining and recording an execution result of the current test strip according to the detection result and a judgment rule corresponding to the stepping mode;
when the execution result is determined to be passed, jumping to the next test item; and when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and clearing the input items and stopping executing the strategy.
Further, the step of obtaining and recording the execution result of the current test strip according to the detection result and the determination rule corresponding to the step mode as described above includes:
when the stepping mode is a single-input cycle detection or operation mode or a multi-input cycle detection or operation mode, and when the detection result of any one time is correct, determining that the execution result is a pass;
and when the stepping mode is a single-input cycle detection and operation mode or a multi-input cycle detection and operation mode, determining that the execution result is passed when the detection result of each time is correct.
Specifically, the method as described above, the user input variables are: an input signal and a target value for the input signal, wherein the type of target value comprises: constant, variable, and linear inputs;
the user detection variables include: detecting a signal and at least one detection expression, the detection expression comprising: and when the detection expression is multiple, determining that the detection result is a pass only if each detection expression passes.
Preferably, the step of executing the current test item according to the step mode when the step mode is the single input mode, and obtaining the execution result of the current test strip includes:
and performing signal input once according to the signal input allowable time of the current test strip and the user input variable, and jumping to the next test item when the time reaches the allowable time limit of the current test strip.
Specifically, the method as described above, the step of executing the current test item according to the step mode to obtain the execution result of the current test strip, further includes:
when the test strip is in the step mode waiting mode, jumping to the next test item when the time reaches the allowable time limit value of the current test strip;
when the stepping mode is the input clearing mode, all the input items are reset to zero;
when the stepping mode is a timing starting mode, recording the current time point as the starting time;
and when the stepping mode is a timing ending mode, recording the current time point as ending time, and obtaining an execution result according to the current starting time.
Preferably, before the step of calling the BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table and configuring the BOB, the method further includes:
carrying out format verification on the test case table, and generating preset error reminding information when the verification fails; and when the verification is passed, generating preset passing prompt information.
Still another preferred embodiment of the present invention also provides a controller including:
the first processing module is used for calling a BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table and configuring the BOB equipment;
the second processing module is used for sequentially acquiring the stepping mode of the current test strip according to the serial number of the test item, and executing the current test item according to the stepping mode to obtain the execution result of the current test strip;
and the third processing module is used for obtaining a test report according to the execution result of each test strip when all the test items are completely executed.
Preferably, as described above, when the step mode is a single-input loop detection and operation mode, a multiple-input loop detection and operation mode, an initialization mode, or a fault clearing mode, the second processing module includes:
the first processing unit is used for inputting signals according to the signal input allowable time and the user input variable of the current test strip target and detecting according to the signal detection allowable time and the user detection variable in the test case table to obtain a detection result, wherein the sum of the signal input allowable time and the signal detection allowable time is less than the allowable time limit value of the current test strip target;
the second processing unit is used for obtaining and recording the execution result of the current test strip according to the detection result and the judgment rule corresponding to the stepping mode;
the third processing unit is used for jumping to the next test item when the execution result is determined to be passed; and when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and clearing the input items and stopping executing the strategy.
Further, as the controller described above, the second processing unit includes:
the first processing subunit is used for determining that the execution result is a pass when the detection result of any one time is correct when the stepping mode is a single-input cycle detection or operation mode or a multiple-input cycle detection or operation mode;
and the second processing subunit is used for determining that the execution result is a pass when the detection result of each time is correct when the stepping mode is a single-input cycle detection and operation mode or a multi-input cycle detection and operation mode.
Specifically, as with the controller described above, the user input variables include: an input signal and a target value for the input signal, wherein the type of the target value comprises: constant, variable, and linear inputs;
the user detection variables include: detecting a signal and at least one detection expression, the detection expression comprising: and when the detection expressions are multiple, the detection result of the current time can be determined to be passed only when each detection expression passes.
Preferably, as described above, when the step mode is the single input mode, the controller further includes:
and the fourth processing unit is used for carrying out signal input once according to the signal input allowable time of the current test strip and the user input variable, and jumping to the next test item when the time reaches the allowable time limit value of the current test strip.
Specifically, the controller and the second processing module as described above further include:
a fifth processing unit, configured to jump to a next test entry when the time reaches the allowable time limit of the current test strip when the step mode is the wait mode;
a sixth processing unit, configured to reset all the entries to zero when the stepping mode is the input clearing mode;
the seventh processing unit is used for recording the current time point as the starting time when the stepping mode is the timing starting mode;
and the eighth processing unit is used for recording the current time point as the end time when the stepping mode is the timing end mode, and obtaining an execution result according to the current start time and the previous start time.
Preferably, the controller as described above, further comprising:
the fourth processing module is used for carrying out format verification on the test case table and generating preset error reminding information when the verification fails; and when the verification is passed, generating preset passing prompt information.
Another preferred embodiment of the present invention also provides a test bench including: a controller as described above.
Compared with the prior art, the method, the controller and the test bench for realizing the automatic test of the test case provided by the embodiment of the invention at least have the following beneficial effects:
in the embodiment of the invention, the input signal in the test case replaces the manual signal input of a technician, such as ON-gear electrification, gear change, stepping ON an accelerator pedal and a brake pedal, and the like, so that the influence of the environment ON the test process is reduced, and the influence of the manual operation of the technician ON the test period is required in each test; and when the test case is executed, the test case is executed according to the target serial number of the test strip strictly, so that the situations that the operation error occurs in the manual operation of a technician due to environmental factors or the condition factors of the technician, and the test process fails are avoided, the time sequence confirmation and the fault confirmation need to be performed manually after the test is completed are avoided, and the test efficiency is improved.
Drawings
FIG. 1 is a flowchart illustrating a method for implementing automatic test of test cases according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating a method for implementing automatic test of test cases according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a test case table according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a controller according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help the full understanding of the embodiments of the present invention. It will therefore be apparent to those skilled in the art that various changes and modifications can be made in the embodiments described herein without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
It should be understood that the term "and/or" herein is only one kind of association relationship describing the association object, and means that there may be three kinds of relationships, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
Referring to fig. 1, a preferred embodiment of the present invention provides a method for implementing automatic test of test cases, including:
step S101, calling a BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table, and configuring BOB equipment;
step S102, sequentially obtaining the stepping mode of the current test strip according to the serial number of the test item, and executing the current test item according to the stepping mode to obtain the execution result of the current test strip;
and step S103, when all the test items are completely executed, obtaining a test report according to the execution result of each test strip.
In the embodiment of the invention, when a vehicle is tested, a controller for testing receives a test case table imported or input by a technician, calls a BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the test case table, and configures BOB equipment according to the BOB configuration file, wherein the BOB equipment is program-controlled BOB equipment and is used for switching between a real controller on the vehicle and a virtual controller corresponding to the real controller through a whole vehicle wire harness, so that the construction of a whole vehicle test environment is realized, and different test environments can be built to meet the requirements of different types of test items on the test environment. After the test environment is established, the test items are sequentially executed according to the test item sequence number in the test case table, when the test items of the current sequence number are executed, the stepping mode of the current test item sequence number is firstly obtained, the current test item sequence number is executed according to the stepping mode, and the execution result of the current test item sequence number is obtained, wherein the signal input mode and the detection method of the current test item sequence number can be determined according to the stepping mode, the current test item sequence number is further executed in a targeted mode, and the requirement of the finished automobile test on the test case is met. When all the test items are completely executed, the test report is obtained according to the execution result of each test strip purpose, so that technicians can accurately obtain the execution result of each test strip purpose. In the embodiment of the invention, the input signal in the test case replaces the manual signal input of a technician, such as ON-gear electrification, gear change, stepping ON an accelerator pedal and a brake pedal, and the like, so that the influence of the environment ON the test process is reduced, and the influence of the manual operation of the technician ON the test period is required in each test; and when the test case is executed, the test case is executed according to the purpose sequence number of the test strip strictly, so that the conditions that the operation error of a technician in manual operation is caused by environmental factors or the condition factors of the technician per se and the test process is failed are avoided, the time sequence and the fault problem are avoided being confirmed manually after the test is finished, and the test efficiency is improved.
Specifically, as described above for the method, the step mode includes:
a single input mode, a single input cycle detection or operation mode, a single input cycle detection and operation mode, a multiple input cycle detection or operation mode, a multiple input cycle detection and operation mode, a wait mode, an input clear mode, a timing start mode, a timing end mode, an initialization mode, and a fault clear mode.
In the embodiment of the invention, the stepping modes are divided into a plurality of modes according to different test requirements, so that the condition that multiple tests or missing tests occur during execution due to the fact that the multiple steps correspond to one mode can be avoided, and the integrity and the accuracy of the finished automobile test can be ensured.
Referring to fig. 2, preferably, the step of executing the current test item according to the stepping mode when the stepping mode is the single-input loop detection or operation mode, the single-input loop detection and operation mode, the multiple-input loop detection or operation mode, the multiple-input loop detection and operation mode, the initialization mode or the fault clearing mode, and obtaining the execution result of the current test strip includes:
step S201, inputting signals according to the signal input allowable time and the user input variable of the current test strip, and detecting according to the signal detection allowable time and the user detection variable in the test case table to obtain a detection result, wherein the sum of the signal input allowable time and the signal detection allowable time is less than the allowable time limit value of the current test strip;
step S202, obtaining and recording the execution result of the current test strip target according to the detection result and the judgment rule corresponding to the stepping mode;
step S203, when the execution result is determined to be passed, jumping to the next test item; and when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and clearing the input items and stopping executing the strategy.
In an embodiment of the present invention, when the step mode is a single-input cycle detection or operation mode, a single-input cycle detection and operation mode, a multiple-input cycle detection or operation mode, a multiple-input cycle detection and operation mode, an initialization mode, or a fault clearing mode, it may be determined that the current test item needs to perform signal input and signal detection, at this time, signal input may be performed according to the user input variable within a signal input allowable time of the current test item in the test case table, after the signal input, detection may be performed according to the user detection variable within the signal detection allowable time of the current test item in the test case table, and a detection result may be obtained. It should be noted that, within one test permission time, there may be a plurality of signal input permission times and a plurality of signal detection permission times, where, when the step mode is a single input cycle detection or operation mode, a single input cycle detection and operation mode, a multiple input cycle detection or operation mode, and a multiple input cycle detection and operation mode, a signal input is performed once within each signal input permission time according to the user input variable, and a cycle detection is performed within each signal detection permission time according to the user detection variable.
After the detection result is obtained, continuing to judge according to the detection result and the judgment rule corresponding to the stepping mode, that is, judging the execution result of the current test strip, recording the execution result to facilitate subsequent generation of a test report, specifically, when the execution result is a failure, to highlight the current test item, the recording may be marked by changing the font color, the background color, and other forms, for example: the failed test item is highlighted or red. Further, when the execution result is that the test is passed, it is determined that no problem is found after the test is performed according to the current test strip purpose, and at this time, the test of the next test strip purpose can be performed, that is, the next test item is jumped to; and when the execution result is failure, determining that the flow tested by the current test item has a problem, and determining and executing a next processing strategy according to an overrun processing strategy preset in the test case table. Wherein, according to the content tested by the current test item and the importance thereof, the technician can set the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and resetting and stopping executing the strategy by the input items; alternatively, other strategies may be set by those skilled in the art according to actual needs.
Further, the step of obtaining and recording the execution result of the current test strip according to the detection result and the determination rule corresponding to the step mode as described above includes:
when the stepping mode is a single-input cycle detection or operation mode or a multi-input cycle detection or operation mode, determining that the execution result is passed when the detection result of any one time is correct;
and when the stepping mode is a single-input cycle detection and operation mode or a multi-input cycle detection and operation mode, determining that the execution result is passed when the detection result of each time is correct.
In the embodiment of the present invention, the method for determining the execution result according to the detection result is slightly different due to the difference of the step mode. When the stepping mode is a single-input cycle detection or operation mode or a multi-input cycle detection or operation mode, and when any detection result is correct, determining that the execution result is passed; when the stepping mode is a single-input cycle detection and operation mode or a multi-input cycle detection and operation mode, and each detection result is correct, determining that the execution result is passed; the method and the device enable technicians to reasonably select the corresponding mode according to the content to be tested when the test case is written, and further can ensure the accuracy of the determined execution result when the test case is executed.
Specifically, the method as described above, the user inputting the variable includes: an input signal and a target value for the input signal, wherein the type of target value comprises: constant, variable, and linear inputs;
the user detection variables include: detecting a signal and at least one detection expression, the detection expression comprising: and when the detection expressions are multiple, the detection result of the current time can be determined to be passed only when each detection expression passes.
In an embodiment of the present invention, the input signal in the user input variable is a channel when an input signal is input, and the target value of the input signal is a judgment value for completing one signal input, wherein the type of the target value includes, but is not limited to, constant, variable and linear inputs, for example: a constant "1000"; the variable "var1"; linear input "1000@20", i.e. linear input with a slope of 20ms, and a final target value of 1000; the linear input "var1@20" is linearly input with a slope of 20ms, and the final target value is var1.
In the user detection variables during detection, at least one detection expression needs to be set according to the input signal and the number and type of detection signals that can be obtained according to the input signal, in order to ensure the correctness of detection, where the type of detection expression includes but is not limited to variable/logical relationship or target limit value, for example:
"10" for determining whether the detected signal is equal to 10, if yes, passing, otherwise, failing, and may be further represented as "i =10", where "i" is the detected corresponding signal, and "10" is a constant or variable;
"i! = 10' for judging whether the detection signal is not equal to the constant, if yes, passing, otherwise, failing;
"i > lim": the method is used for judging whether the detection signal is greater than lim, if so, the detection signal passes, otherwise, the detection signal fails, wherein lim is a value range, and the value of lim can be a constant or a variable;
"i < lim": the device is used for judging whether the detected corresponding detection signal is smaller than lim, if so, the corresponding detection signal passes through the lim, otherwise, the corresponding detection signal fails;
"i > = lim": the device is used for judging whether the detection signal is greater than or equal to lim, if so, the detection signal passes, otherwise, the detection signal fails, wherein lim is a value range, and the value of lim can be a constant or a variable;
"i < = lim": the device is used for judging whether the detection signal is less than or equal to lim, if so, the detection signal passes, and if not, the detection signal fails;
"lim1< i < lim2": the device is used for judging whether the detection signal is greater than lim1 and smaller than lim2, if so, the detection signal passes, and if not, the detection signal fails;
"lim1< i < = lim2": the device is used for judging whether the detection signal is greater than lim1 and less than or equal to lim2, if so, the detection signal passes, and if not, the detection signal fails;
"lim1< = i < lim2": the device is used for judging whether the detection signal is greater than or equal to lim1 and smaller than lim2 or not, if so, the device fails;
"lim1< = i < = lim2": the device is used for judging whether the detection signal is greater than or equal to lim1 and less than or equal to lim2, if so, the detection signal passes, and if not, the detection signal fails;
"& Tag1": the system does not participate in the detection within the test allowable time, caches a cached variable with Tag1, and can perform logic operation in logic comparison in the subsequent steps;
"Tag1&": and the system releases the previously cached variables without participating in detection.
When the detection expressions are multiple, in order to ensure the accuracy of the obtained detection result, the detection result can be determined to be passed only when each detection expression passes.
Preferably, the step of executing the current test item according to the step mode when the step mode is the single input mode to obtain the execution result of the current test item includes:
and performing signal input once according to the signal input allowable time of the current test strip and the user input variable, and jumping to the next test item when the time reaches the allowable time limit of the current test strip.
In the embodiment of the invention, when the stepping mode is the single input mode, the current test item is determined to only execute signal input once, so that after the signal input is carried out, the current test item is waited to reach the allowable time limit value of the current test strip, and the next test item is jumped to, and the normal time sequence in the test process is ensured.
Specifically, the method as described above, the step of executing the current test item according to the step mode to obtain the execution result of the current test strip, further includes:
when the test strip is in the step mode waiting mode, jumping to the next test item when the time reaches the allowable time limit value of the current test strip;
when the stepping mode is the input clearing mode, all the input items are reset to zero;
when the stepping mode is a timing starting mode, recording the current time point as the starting time;
and when the stepping mode is a timing ending mode, recording the current time point as ending time, and obtaining an execution result according to the current starting time.
In a specific embodiment of the present invention, in the step mode waiting mode, the execution waiting operation jumps to the next test entry only when the allowable time limit of the current test strip is reached, so as to provide sufficient preparation time for the test of the next test strip and ensure the normal operation of the whole test, wherein when the allowable time limit of the current test strip is reached, the execution result is determined to pass by jumping to the next test entry;
when the stepping mode is an input clearing mode, resetting all input items to be zero, and when all the input items are determined to be zero within the allowable time limit of the current test strip, determining that the execution result is passed;
when the stepping mode is a timing starting mode, recording the current time point as the starting time, and determining that the execution result is passed when the starting time is saved;
and when the stepping mode is a timing ending mode, recording the current time point as ending time, and obtaining an execution result according to the current starting time. When the recorded time difference is obtained and recorded according to the end time and the previous start time, it may be determined that the execution result is a pass.
Preferably, in the method, before the step of calling the BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table and configuring the BOB, the method further includes:
carrying out format verification on the test case table, and generating preset error reminding information when the verification fails; and when the verification is passed, generating preset passing prompt information.
In a preferred embodiment of the present invention, before configuring the BOB device according to the test case table, in order to ensure that the obtained test case table is an available test case table, format verification is performed on the test case table, if the verification passes, a preset passing prompt message is generated, and while the test case table is determined to be executable, a technician is informed that the test case table is currently executed; if the verification fails, generating preset error reminding information, and informing technicians that the current test case table is unavailable while stopping executing the test case so as to facilitate the technicians to modify the test case table, wherein the modification mode includes but is not limited to directly modifying the current test case table or modifying the original file and then re-importing or inputting the modified file.
Referring to FIG. 3, a diagram of a test case table is provided in one embodiment of the present invention.
Wherein "No." means the test item number; "step Mode" indicates a step Mode, wherein "Single Input" abbreviated "SI" indicates a Single Input Mode, "Single Input, check OR" SICO "indicates a Single Input Loop detection OR operation Mode," Single Input, check AND "SICA" indicates a Single Input Loop detection AND operation Mode, "Loop Input, check OR" LICO "indicates a multiple Input Loop detection OR operation Mode," Loop Input, check AND "LICA" indicates a multiple Input Loop detection AND operation Mode, "WAIT" indicates a WAIT Mode, "Clear" indicates an Input Clear Mode, "Timing ON" indicates a Timing start Mode, "Timing OFF" indicates a Timing end Mode, "BOB Input" indicates an initialization Mode, AND "Clear r" indicates a fault Clear Mode; "Channels & Setpoints" indicates Channels and settings for filling in the above-mentioned user input variables, including "U _ ClearErr _ control" for specifying a specific controller name and a fault diagnosis code status (U _ DTC _ STATE) as detection items; "Input Duration" represents a signal Input permission time; "Check Items" indicates a detection item for filling out the user detection variable described above; "Check Time" indicates a signal detection permission Time; "Step Duration" indicates the allowable time limit for the current test strip purpose; the "over action" indicates an over-limit processing strategy, and specifically, the "Continue" indicates a jump to next test entry strategy, the "Hold On" indicates a keep-current-state and reminding strategy, the "End" indicates a stop-execution strategy, and the "Cleanup" indicates an entry zero-clearing and stop-execution strategy.
Optionally, in order to facilitate the understanding and invoking of each test item by the technical staff, the "Use case No." indicates a case number, and is used as a retrieval function to distinguish the meaning of the test item; "Step Label" indicates that the Step Label is used to make a Chinese paraphrase for a row of test items; "Step Description" refers to a Step specification, used for the purpose of multi-row test strip meaning expression.
Referring to fig. 4, still another preferred embodiment of the present invention also provides a controller including:
the first processing module 401 is configured to, according to the name of the BOB configuration file in the input test case table, call a BOB configuration file corresponding to the name of the BOB configuration file, and configure BOB devices;
the second processing module 402 is configured to sequentially obtain a step mode of the current test strip according to the test item serial number, and execute the current test item according to the step mode to obtain an execution result of the current test strip;
a third processing module 403, configured to, when all the test items are executed, obtain a test report according to the execution result of each test strip.
Preferably, as described above, when the step mode is a single-input loop detection and operation mode, a multiple-input loop detection and operation mode, an initialization mode, or a fault clearing mode, the second processing module includes:
the first processing unit is used for carrying out signal input according to the signal input allowable time and the user input variable of the current test strip target and carrying out detection according to the signal detection allowable time and the user detection variable in the test case table to obtain a detection result, wherein the sum of the signal input allowable time and the signal detection allowable time is smaller than the allowable time limit value of the current test strip target;
the second processing unit is used for obtaining and recording the execution result of the current test strip according to the detection result and the judgment rule corresponding to the stepping mode;
the third processing unit is used for jumping to the next test item when the execution result is determined to be passed; and when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and clearing and stopping executing the strategy by the input items.
Further, the controller as described above, the second processing unit, includes:
the first processing subunit is used for determining that the execution result is a pass when the detection result of any one time is correct when the stepping mode is a single-input cycle detection or operation mode or a multi-input cycle detection or operation mode;
and the second processing subunit is used for determining that the execution result is a pass when the detection result of each time is correct when the stepping mode is a single-input cycle detection and operation mode or a multi-input cycle detection and operation mode.
Specifically, as with the controller described above, the user input variables include: an input signal and a target value of the signal input, wherein the type of the target value comprises: constant, variable, and linear inputs;
the user detection variables include: detecting a signal and at least one detection expression, the detection expression comprising: and when the detection expressions are multiple, the detection result of the current time can be determined to be passed only when each detection expression passes.
Preferably, as described above, when the step mode is the single input mode, the controller further includes:
and the fourth processing unit is used for carrying out signal input once according to the signal input allowable time of the current test strip and the user input variable, and jumping to the next test item when the time reaches the allowable time limit value of the current test strip.
Specifically, the controller and the second processing module further include:
the fifth processing unit is used for jumping to the next test item when the time reaches the allowable time limit value of the current test strip when the stepping mode is the waiting mode;
the sixth processing unit is used for resetting all the input items to zero when the stepping mode is the input clearing mode;
the seventh processing unit is used for recording the current time point as the starting time when the stepping mode is the timing starting mode;
and the eighth processing unit is used for recording the current time point as the end time when the stepping mode is the timing end mode, and obtaining an execution result according to the current start time and the previous start time.
Preferably, the controller as described above, further comprising:
the fourth processing module is used for carrying out format verification on the test case table and generating preset error reminding information when the verification fails; and when the verification is passed, generating preset passing prompt information.
The embodiment of the system controller of the invention is a controller corresponding to the embodiment of the method, and all implementation means in the embodiment of the method are applicable to the embodiment of the controller, so that the same technical effect can be achieved.
Another preferred embodiment of the present invention also provides a test rack comprising: a controller as described above.
The test bench comprising the controller replaces the original manual signal input by the signal input in the test case by executing the test case, thereby reducing the influence of the environment on the test process and the influence of the manual operation of a technician on the test period during each test; and when the test case is executed, the test case is executed according to the purpose sequence number of the test strip strictly, so that the conditions that the operation error of a technician in manual operation is caused by environmental factors or the condition factors of the technician per se and the test process is failed are avoided, the time sequence and the fault problem are avoided being confirmed manually after the test is finished, and the test efficiency is improved.
Furthermore, the present invention may repeat reference numerals and/or letters in the various examples. This repetition is for the purpose of simplicity and clarity and does not in itself dictate a relationship between the various embodiments and/or configurations discussed.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A method for realizing automatic test of test cases is characterized by comprising the following steps:
calling a BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table, and configuring BOB equipment;
sequentially acquiring a stepping mode of a current test strip according to the serial number of the test item, and executing the current test item according to the stepping mode to obtain an execution result of the current test strip;
when all the test items are completely executed, obtaining a test report according to the execution result of each test strip;
the step mode includes:
a single input mode, a single input cycle detection or operation mode, a single input cycle detection and operation mode, a multiple input cycle detection or operation mode, a multiple input cycle detection and operation mode, a wait mode, an input clear mode, a timing start mode, a timing end mode, an initialization mode, and a fault clear mode;
when the step mode is the single-input loop detection or operation mode, the single-input loop detection and operation mode, the multiple-input loop detection or operation mode, the multiple-input loop detection and operation mode, the initialization mode, or the fault clearing mode, the step of executing the current test entry according to the step mode to obtain the execution result of the current test strip includes:
performing signal input according to the signal input allowable time and the user input variable of the current test strip target, and performing detection according to the signal detection allowable time and the user detection variable in the test case table to obtain a detection result, wherein the sum of the signal input allowable time and the signal detection allowable time is less than the allowable time limit of the current test strip target;
obtaining and recording the execution result of the current test strip according to the detection result and a judgment rule corresponding to the stepping mode;
when the execution result is determined to be passed, jumping to the next test item; and when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and clearing and stopping executing the strategy by the input items.
2. The method of claim 1, wherein said step of obtaining and recording said result of said performing of said current test strip according to said test result and a determination rule corresponding to said step mode comprises:
when the stepping mode is the single-input cycle detection or operation mode or the multi-input cycle detection or operation mode, and when the detection result of any one time is correct, determining that the execution result is passed;
and when the stepping mode is the single-input cycle detection and operation mode or the multi-input cycle detection and operation mode, and when each detection result is correct, determining that the execution result is passed.
3. The method of claim 2, wherein the user input variables comprise: an input signal and a target value for the input signal, wherein the type of the target value comprises: constant, variable, and linear inputs;
the user detection variables include: detecting a signal and at least one detection expression, the detection expression comprising: and when the detection expression is multiple, determining that the detection result is passed only if each detection expression passes.
4. The method of claim 1, wherein when the step mode is the single input mode, the step of executing the current test entry according to the step mode to obtain the result of the execution of the current test strip includes:
and performing signal input once according to the signal input allowable time of the current test strip and a user input variable, and jumping to the next test item when the time reaches the allowable time limit of the current test strip.
5. The method of claim 1, wherein said step of executing said current test entry according to said step pattern resulting in an execution of said current test strip further comprises:
when the stepping mode is the waiting mode and the time reaches the allowable time limit value of the current test strip, jumping to the next test item;
when the stepping mode is the input clearing mode, all input items are reset to zero;
when the stepping mode is the timing starting mode, recording the current time point as the starting time;
and when the stepping mode is the timing ending mode, recording the current time point as ending time, and obtaining an execution result according to the previous starting time.
6. The method according to claim 1, wherein before the step of retrieving the BOB configuration file corresponding to the BOB configuration file name and configuring the BOB according to the BOB configuration file name in the input test case table, the method further comprises:
carrying out format verification on the test case table, and generating preset error reminding information when the verification fails; and when the verification is passed, generating preset passing prompt information.
7. A controller, comprising:
the first processing module is used for calling a BOB configuration file corresponding to the BOB configuration file name according to the BOB configuration file name in the input test case table and configuring BOB equipment;
the second processing module is used for sequentially acquiring the stepping mode of the current test strip according to the serial number of the test item, and executing the current test item according to the stepping mode to obtain the execution result of the current test strip;
the third processing module is used for obtaining a test report according to the execution result of each test strip when all the test items are executed;
as described above, when the step mode is the single-input loop detection or operation mode, the single-input loop detection and operation mode, the multiple-input loop detection or operation mode, the multiple-input loop detection and operation mode, the initialization mode, or the fault clearing mode, the second processing module includes:
the first processing unit is used for inputting signals according to the signal input allowable time and the user input variable of the current test strip target and detecting according to the signal detection allowable time and the user detection variable in the test case table to obtain a detection result, wherein the sum of the signal input allowable time and the signal detection allowable time is less than the allowable time limit value of the current test strip target;
the second processing unit is used for obtaining and recording the execution result of the current test strip according to the detection result and the judgment rule corresponding to the stepping mode;
the third processing unit is used for jumping to the next test item when the execution result is determined to be passed; and when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises the following steps: skipping to the next test entry strategy, keeping the current state and reminding the strategy, stopping executing the strategy, and clearing and stopping executing the strategy by the input items.
8. A test rig, comprising: the controller of claim 7.
CN202010200117.XA 2020-03-20 2020-03-20 Method, controller and test bench for realizing automatic test of test cases Active CN113495546B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010200117.XA CN113495546B (en) 2020-03-20 2020-03-20 Method, controller and test bench for realizing automatic test of test cases

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010200117.XA CN113495546B (en) 2020-03-20 2020-03-20 Method, controller and test bench for realizing automatic test of test cases

Publications (2)

Publication Number Publication Date
CN113495546A CN113495546A (en) 2021-10-12
CN113495546B true CN113495546B (en) 2022-11-15

Family

ID=77993649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010200117.XA Active CN113495546B (en) 2020-03-20 2020-03-20 Method, controller and test bench for realizing automatic test of test cases

Country Status (1)

Country Link
CN (1) CN113495546B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736567A (en) * 2011-04-11 2012-10-17 中国移动通信集团公司 Method and system for centralized test control
CN103279419A (en) * 2013-06-09 2013-09-04 浪潮电子信息产业股份有限公司 Automation version verifying method and system based on B/S structural system
CN103699122A (en) * 2014-01-09 2014-04-02 上汽通用五菱汽车股份有限公司 Finished car controller test platform and control method
CN104865947A (en) * 2014-12-08 2015-08-26 北汽福田汽车股份有限公司 Whole vehicle controller environmental model generation method and system
CN107306151A (en) * 2017-02-14 2017-10-31 深圳市双翼科技股份有限公司 A kind of calibration method and its device of BOB equipment
CN107544463A (en) * 2017-09-08 2018-01-05 北京新能源汽车股份有限公司 Automatic test method and test device for diagnosis function of vehicle controller
CN107818051A (en) * 2017-11-27 2018-03-20 北京新能源汽车股份有限公司 Test case jump analysis method and device and server
CN207264191U (en) * 2017-09-22 2018-04-20 中国第一汽车股份有限公司 Tire pressure controller automatic test equipment based on wireless Low Frequency Network
CN109189691A (en) * 2018-09-19 2019-01-11 郑州云海信息技术有限公司 A kind of test case used time recording method, device and equipment
CN109992760A (en) * 2017-12-29 2019-07-09 长城汽车股份有限公司 Test report generation method and device
CN110362471A (en) * 2019-05-28 2019-10-22 中国平安人寿保险股份有限公司 Test case processing method, system, terminal and storage medium
CN110618910A (en) * 2019-08-27 2019-12-27 中国第一汽车股份有限公司 Test system and method
CN110888818A (en) * 2019-12-22 2020-03-17 普信恒业科技发展(北京)有限公司 Test case configuration system and method, automatic test system and method

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070171716A1 (en) * 2005-11-30 2007-07-26 William Wright System and method for visualizing configurable analytical spaces in time for diagrammatic context representations
US9507692B2 (en) * 2009-04-15 2016-11-29 Oracle International Corporation Downward propagation of results for test cases in application testing
US9535818B2 (en) * 2012-10-16 2017-01-03 Microsoft Technology Licensing, Llc Identifying high impact bugs
KR101989802B1 (en) * 2017-02-28 2019-06-18 주식회사 스패로우 Method for performing test using test case and apparatus for the same
US20180285247A1 (en) * 2017-03-29 2018-10-04 The Travelers Indemnity Company Systems, methods, and apparatus for automated code testing
US10853227B2 (en) * 2018-07-23 2020-12-01 Verizon Patent And Licensing Inc. Systems and methods for modular test platform for applications

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102736567A (en) * 2011-04-11 2012-10-17 中国移动通信集团公司 Method and system for centralized test control
CN103279419A (en) * 2013-06-09 2013-09-04 浪潮电子信息产业股份有限公司 Automation version verifying method and system based on B/S structural system
CN103699122A (en) * 2014-01-09 2014-04-02 上汽通用五菱汽车股份有限公司 Finished car controller test platform and control method
CN104865947A (en) * 2014-12-08 2015-08-26 北汽福田汽车股份有限公司 Whole vehicle controller environmental model generation method and system
CN107306151A (en) * 2017-02-14 2017-10-31 深圳市双翼科技股份有限公司 A kind of calibration method and its device of BOB equipment
CN107544463A (en) * 2017-09-08 2018-01-05 北京新能源汽车股份有限公司 Automatic test method and test device for diagnosis function of vehicle controller
CN207264191U (en) * 2017-09-22 2018-04-20 中国第一汽车股份有限公司 Tire pressure controller automatic test equipment based on wireless Low Frequency Network
CN107818051A (en) * 2017-11-27 2018-03-20 北京新能源汽车股份有限公司 Test case jump analysis method and device and server
CN109992760A (en) * 2017-12-29 2019-07-09 长城汽车股份有限公司 Test report generation method and device
CN109189691A (en) * 2018-09-19 2019-01-11 郑州云海信息技术有限公司 A kind of test case used time recording method, device and equipment
CN110362471A (en) * 2019-05-28 2019-10-22 中国平安人寿保险股份有限公司 Test case processing method, system, terminal and storage medium
CN110618910A (en) * 2019-08-27 2019-12-27 中国第一汽车股份有限公司 Test system and method
CN110888818A (en) * 2019-12-22 2020-03-17 普信恒业科技发展(北京)有限公司 Test case configuration system and method, automatic test system and method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
VT System在电控单元总线通信测试中的应用;郭琳;《网络与信息工程》;20180731;第73,79-80页 *
基于VTSystem的汽车电气自动测试系统研制及应用;明星;《汽车电器》;20120831(第8期);第62-64页 *
基于硬件在环的整车控制器自动化测试研究与应用;吴方义等;《汽车电器》;20181120(第11期);全文 *

Also Published As

Publication number Publication date
CN113495546A (en) 2021-10-12

Similar Documents

Publication Publication Date Title
CN102222043B (en) Testing method and testing device
CN109977012B (en) Joint debugging test method, device, equipment and computer readable storage medium of system
JP2002505000A (en) Low cost and easy to use software for automated test systems
CN105511977A (en) Vehicle-mounted navigation system testing method and device
CN102707712B (en) Electronic equipment fault diagnosis method and system
CN112100085B (en) Android application program stability testing method, device and equipment
CN106294172B (en) App self-testing methods based on terminal device and device
CN106708725A (en) Test sequence dynamic management method combining test with diagnosis
CN113133041B (en) Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle
CN106844221B (en) Method for realizing coverage rate analysis of virtual verification system
CN113495546B (en) Method, controller and test bench for realizing automatic test of test cases
US8381145B2 (en) Method and apparatus for analyzing fault behavior of a software design model
CN111459836B (en) Conversation strategy configuration method and conversation system
CN100367233C (en) Program execution control mode
CN111624984B (en) Vehicle testing method and device
CN116610557B (en) Action binding information debugging method and device, storage medium and electronic equipment
AU2023201696B2 (en) Method and device for determining coverage in HIL testing, and storage medium
CN117951017A (en) Intelligent driving automatic simulation test method and system
CN111459837B (en) Conversation strategy configuration method and conversation system
CN116643998B (en) AUTOSAR RTM-based test method and device
CN112100077B (en) Transaction testing method and device
CN114090454B (en) Interface automation test method, device, equipment and storage medium
CN107368421A (en) The method and system of automatic test interface program
CN111930091B (en) Network test method and device for electronic control unit of electric vehicle
CN116795709A (en) Unit test method and device for software, electronic equipment and storage medium

Legal Events

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