CN113495546A - 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 PDFInfo
- Publication number
- CN113495546A CN113495546A CN202010200117.XA CN202010200117A CN113495546A CN 113495546 A CN113495546 A CN 113495546A CN 202010200117 A CN202010200117 A CN 202010200117A CN 113495546 A CN113495546 A CN 113495546A
- Authority
- CN
- China
- Prior art keywords
- test
- mode
- 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.)
- Granted
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 323
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000001514 detection method Methods 0.000 claims description 186
- 238000012545 processing Methods 0.000 claims description 51
- 230000014509 gene expression Effects 0.000 claims description 25
- 238000012795 verification Methods 0.000 claims description 18
- 230000009191 jumping Effects 0.000 claims description 16
- 230000008569 process Effects 0.000 abstract description 15
- 238000012790 confirmation Methods 0.000 abstract description 9
- 230000007613 environmental effect Effects 0.000 abstract description 4
- 101100074792 Danio rerio lhx1a gene Proteins 0.000 description 4
- 101100511184 Dictyostelium discoideum limB gene Proteins 0.000 description 4
- 101150097504 LHX1 gene Proteins 0.000 description 4
- 101100454869 Rattus norvegicus Lhx5 gene Proteins 0.000 description 4
- 230000009471 action Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000010276 construction Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- UPRXAOPZPSAYHF-UHFFFAOYSA-N lithium;cyclohexyl(propan-2-yl)azanide Chemical compound CC(C)N([Li])C1CCCCC1 UPRXAOPZPSAYHF-UHFFFAOYSA-N 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000010200 validation analysis Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B23/00—Testing or monitoring of control systems or parts thereof
- G05B23/02—Electric testing or monitoring
- G05B23/0205—Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
- G05B23/0208—Electric 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/0213—Modular 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
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01M—TESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
- G01M17/00—Testing of vehicles
- G01M17/007—Wheeled or endless-tracked vehicles
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/24—Pc safety
- G05B2219/24065—Real 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 target to obtain an execution result of the current test strip target; 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
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 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.
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 target 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.
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.
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 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, 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, 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:
format verification is carried out on the test case table, and when the verification fails, preset error reminding information is generated; 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 items, and executing the current test items 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 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 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 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 the single-input cycle detection and operation mode or the multiple-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 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.
Another preferred embodiment of the present invention also provides a test rack comprising: 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 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. Thus, it will be apparent to those skilled in the art that various changes and modifications may be made to 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 merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B 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 related 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 a 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 an 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 case is sequentially executed according to the test strip target serial number in the test case table, when the test item of the current serial number is executed, the stepping mode of the current test strip target is firstly obtained, the current test strip target is executed according to the stepping mode, and the execution result of the current test strip target is obtained, wherein the signal input mode and the detection method of the current test strip target can be determined according to the stepping mode, the current test strip target is further subjected to targeted execution, 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 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.
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 to obtain 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 and stopping executing the strategy by the input items.
In an embodiment of the present invention, 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, it is determined that the current test item needs to perform signal input and signal detection, at this time, signal input is 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 is 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 is obtained, further, in order to prevent a test time process of each test item from affecting a whole vehicle test, each test item sets a test allowable time of the current test item in the test case table based on a whole vehicle condition, a processing condition of a tested controller, and the like, the sum of the signal input allowable time and the signal detection allowable time needs to be smaller than the test allowable time so as to ensure the smooth operation of the whole vehicle test. 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 as: 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, due to the difference of the step mode, the method of determining the execution result according to the detection result is slightly different. 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 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 writing the test case, and further ensure the accuracy of the determined execution result when executing the test case.
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 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.
In an embodiment of the present invention, the input signal in the user input variables 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, such as: a constant "1000"; the variable "var 1"; linear input "1000 @ 20" is input linearly with a slope of 20ms, and the final target value is 1000; the linear input "var 1@ 20" is input linearly with a slope of 20ms, and the final target value is var 1.
In the detection of the variables by the user, at least one detection expression is required to be set according to the input signal and the number and types of detection signals that can be obtained according to the input signal, in order to ensure the correctness of the detection, wherein the types of the detection expressions include but are not limited to variable/logical relations or target limits, for example:
"10" for determining whether the detection signal is equal to 10, if it is satisfied, it is passed, otherwise, it fails, and it may also be expressed 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;
"lim 1< i < lim 2": the device is used for judging whether the detection signal is greater than lim1 and less than lim2, if yes, the detection signal passes, and if not, the detection signal fails;
"lim 1< i < ═ lim 2": the device is used for judging whether the detection signal is greater than lim1 and less than or equal to lim2, if yes, the detection signal passes, and if not, the detection signal fails;
"lim 1< ═ i < lim 2": the device is used for judging whether the detection signal is greater than or equal to lim1 and less than lim2, if yes, the pass is failed, otherwise, the failure is detected;
"lim 1< ═ i < ═ lim 2": 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 yes, the detection signal passes, and if not, the detection signal fails;
"& Tag 1": the system does not participate in the detection within the test permission time, and caches a cached variable with the name of Tag1, and the cached variable is used for the subsequent steps and can be used for carrying out logic operation in logic comparison;
"Tag 1 &": without participating in the detection, the system releases the previously cached variables.
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, 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.
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, all input items are reset to zero, and when all input items are determined to be zero within the allowable time limit value of the current test strip, the execution result can be determined to be 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:
format verification is carried out on the test case table, and when the verification fails, preset error reminding information is generated; 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 being 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; the "over action" represents an overrun processing policy, specifically, wherein "Continue" represents a jump to a next test entry policy, "Hold On" represents a keep current state and a reminder policy, "End" represents a stop execution policy, and "Cleanup" represents an entry zero clearing and stop execution policy.
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 stepping mode of the current test strip according to the serial number of the test item, and execute the current test item according to the stepping mode to obtain an execution result of the current test strip;
a third processing module 403, configured to obtain a test report according to the execution result of each test strip when all the test items are 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 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 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 the single-input cycle detection and operation mode or the multiple-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 comprises the controller, and the signal input in the test case replaces the original manual signal input by executing the test case, so that the influence of the environment on the test process is reduced, and the influence of the manual operation of a technician on the test period is required for 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.
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 (10)
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;
and when all the test items are completely executed, obtaining a test report according to the execution result of each test strip.
2. The method of claim 1, wherein the step mode comprises:
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.
3. The method of claim 2, wherein when the step mode is the single-input loop detection and 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; when the execution result is failure, executing an overrun processing strategy in the test case table, wherein the overrun processing strategy comprises: 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.
4. The method of claim 3, 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 each detection result is correct, determining that the execution result is passed.
5. The method of claim 4, 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 expressions are multiple, the detection result of the current time can be determined to be passed only when each detection expression passes.
6. The method of claim 2, 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.
7. The method of claim 2, 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.
8. 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:
format verification is carried out on the test case table, and when the verification fails, preset error reminding information is generated; and when the verification is passed, generating preset passing prompt information.
9. 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;
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 executed.
10. A test rack, comprising: the controller of claim 9.
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 true CN113495546A (en) | 2021-10-12 |
CN113495546B 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 (19)
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 |
US20100268502A1 (en) * | 2009-04-15 | 2010-10-21 | Oracle International Corporation | Downward propagation of results for test cases in application testing |
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 |
US20140109053A1 (en) * | 2012-10-16 | 2014-04-17 | Microsoft | Identifying high impact bugs |
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 |
US20180285247A1 (en) * | 2017-03-29 | 2018-10-04 | The Travelers Indemnity Company | Systems, methods, and apparatus for automated code testing |
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 |
US20200019494A1 (en) * | 2017-02-28 | 2020-01-16 | Sparriw Co., Ltd | Method and apparatus for performing test by using test case |
US20200026640A1 (en) * | 2018-07-23 | 2020-01-23 | Verizon Patent And Licensing Inc. | Systems and methods for modular test platform for applications |
CN110888818A (en) * | 2019-12-22 | 2020-03-17 | 普信恒业科技发展(北京)有限公司 | Test case configuration system and method, automatic test system and method |
-
2020
- 2020-03-20 CN CN202010200117.XA patent/CN113495546B/en active Active
Patent Citations (19)
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 |
US20100268502A1 (en) * | 2009-04-15 | 2010-10-21 | Oracle International Corporation | Downward propagation of results for test cases in application testing |
CN102736567A (en) * | 2011-04-11 | 2012-10-17 | 中国移动通信集团公司 | Method and system for centralized test control |
US20140109053A1 (en) * | 2012-10-16 | 2014-04-17 | Microsoft | Identifying high impact bugs |
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 |
US20200019494A1 (en) * | 2017-02-28 | 2020-01-16 | Sparriw Co., Ltd | Method and apparatus for performing test by using test case |
US20180285247A1 (en) * | 2017-03-29 | 2018-10-04 | The Travelers Indemnity Company | Systems, methods, and apparatus for automated code testing |
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 |
US20200026640A1 (en) * | 2018-07-23 | 2020-01-23 | Verizon Patent And Licensing Inc. | Systems and methods for modular test platform for applications |
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)
Title |
---|
吴方义等: "基于硬件在环的整车控制器自动化测试研究与应用", 《汽车电器》 * |
明星: "基于VTSystem的汽车电气自动测试系统研制及应用", 《汽车电器》 * |
郭琳: "VT System在电控单元总线通信测试中的应用", 《网络与信息工程》 * |
Also Published As
Publication number | Publication date |
---|---|
CN113495546B (en) | 2022-11-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20050223295A1 (en) | Method for the creation of sequences for testing software | |
CN109977012B (en) | Joint debugging test method, device, equipment and computer readable storage medium of system | |
CN102707712B (en) | Electronic equipment fault diagnosis method and system | |
CN106844221B (en) | Method for realizing coverage rate analysis of virtual verification system | |
CN113133041B (en) | Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle | |
CN113495546B (en) | Method, controller and test bench for realizing automatic test of test cases | |
US20110246954A1 (en) | Method and apparatus for analyzing fault behavior | |
EP2820547B1 (en) | Debugging method and computer program product | |
CN111459836B (en) | Conversation strategy configuration method and conversation system | |
CN100367233C (en) | Program execution control mode | |
CN107748302B (en) | Automatic test control method for automatic comprehensive detection equipment for electrical accessories of seat | |
CN111624984B (en) | Vehicle testing method and device | |
CN110674042A (en) | Concurrency performance testing method and device | |
CN114511234B (en) | Method, system, equipment and readable storage medium for robust configuration of production line resources | |
CN111459837B (en) | Conversation strategy configuration method and conversation system | |
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 | |
CN112100077B (en) | Transaction testing method and device | |
CN107368421A (en) | The method and system of automatic test interface program | |
CN112597026B (en) | Test case generation method and device | |
CN112015656B (en) | Visual debugging method and device for workflow designer | |
CN111930091B (en) | Network test method and device for electronic control unit of electric vehicle | |
CN109062810B (en) | Application program testing method and device, electronic equipment and storage medium | |
CN117743150A (en) | Testing method and device for parallel execution of steps, electronic equipment and 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 |