CN108829604A - Method for generating test case and device based on vehicle control device - Google Patents
Method for generating test case and device based on vehicle control device Download PDFInfo
- Publication number
- CN108829604A CN108829604A CN201810687864.3A CN201810687864A CN108829604A CN 108829604 A CN108829604 A CN 108829604A CN 201810687864 A CN201810687864 A CN 201810687864A CN 108829604 A CN108829604 A CN 108829604A
- Authority
- CN
- China
- Prior art keywords
- test case
- template
- test
- default
- types
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
Abstract
The present disclosure discloses a kind of method for generating test case and device based on vehicle control device, is related to the field of test technology, and main purpose is to solve the problems, such as that the specific aim of the existing test case for generating vehicle control device is poor.Disclosed method includes:Determine that target defect, the target defect are determined according to the actual result and expected results of the initial test case according to initial test case;According to the target defect, the default test case template of the corresponding target defect is chosen from default test case template set, contains at least one default test case template in the default test case template set;According to the default test case template and the initial test case, the target detection use-case of the corresponding target defect is generated.The disclosure is used to generate the test case of vehicle control device.
Description
Technical field
Embodiment of the disclosure is related to the field of test technology more particularly to a kind of test case based on vehicle control device is raw
At method and device.
Background technique
With the continuous development of measuring technology, the measuring technology of vehicle is also being constantly updated.Since vehicle control device is made
For the important component of control vehicle operation, reliability will directly affect the operating status of vehicle, or even influence the fortune of vehicle
Row safety.Therefore, the test also gradually attention by personage in domain in testing field, for vehicle control device.
Usually detect it using test case in test process in the controller to vehicle.Wherein, it tests
Use-case (Test Case, test case) is one group of test input, execution condition and the expection worked out for some special objective
As a result test model, to realize that some inputs the operation that information obtains under execution condition and parameter of its setting in test
As a result whether meet the test function of expected results.In general, it when generating the test case of vehicle control device, is all based on
Test needs to generate corresponding test case.However in practical applications, since the test case of existing vehicle control device is raw
At being carried out based on testing requirement, when test target existing defects or it is abnormal when, the specific aim of the test case of existing generation
It is poor, influence the accuracy of follow-up test result.
Summary of the invention
In view of the above problems, embodiment of the disclosure provide a kind of method for generating test case based on vehicle control device and
Device, main purpose be in the test process to vehicle control device, when the controller of test is there are when certain defect, can make
Test case generated has preferable specific aim.
In order to solve the above technical problems, in a first aspect, embodiment of the disclosure provide it is a kind of based on vehicle control device
Method for generating test case, this method include:
Determine that target defect, the target defect are the reality according to the initial test case according to initial test case
As a result it is determined with expected results;
According to the target defect, the default survey of the corresponding target defect is chosen from default test case template set
Example template is tried out, contains at least one default test case template in the default test case template set;
According to the default test case template and the initial test case, the target of the corresponding target defect is generated
Test case.
Optionally, each of described default test case template set presets test case and respectively corresponds different tests
Type.
Optionally, described according to the target defect, the corresponding target is chosen from default test case template set
The default test case template of defect, including:
Determine the test-types of the corresponding target defect;
The default test case template of the corresponding test-types, institute are obtained from the default test case template set
State default test case template include composite type template, it is ordinal type template, triggering template types, feedback kind template, excellent
First template types, common sense template types and fault type template.
Optionally, described according to the default test case template and the initial test case, generate the corresponding mesh
The target detection use-case of defect is marked, including:
The extracting parameter information from the initial test case, the parameter information include test input information, execute ginseng
Number information and expected results;
According to the default test case template and the parameter information, the target of the corresponding target defect of building is surveyed
Example on probation.
Optionally, described according to the target defect, the corresponding mesh is chosen from default test case template set
Before the default test case template for marking defect, the method also includes:
Test case is traversed, and test-types are determined according to the test-purpose of test case;
According to different test-types, the test case template of the corresponding different test-types of building, is obtained described pre- respectively
If test case template set.
Second aspect, embodiment of the disclosure additionally provide a kind of Test cases technology device based on vehicle control device,
The device includes:
First determination unit, for determining that target defect, the target defect are according to according to initial test case
What the actual result and expected results of initial test case determined;
Selection unit, for choosing the corresponding mesh from default test case template set according to the target defect
The default test case template of defect is marked, contains at least one default test case mould in the default test case template set
Plate;
Generation unit, for generating described in corresponding to according to the default test case template and the initial test case
The target detection use-case of target defect.
Optionally, each of described default test case template set presets test case and respectively corresponds different tests
Type.
Optionally, the selection unit includes:
Determining module, for determining the test-types of the corresponding target defect;
Module is obtained, for obtaining the default survey of the corresponding test-types from the default test case template set
Example template on probation, the default test case template include composite type template, ordinal type template, trigger template types, is anti-
Present template types, precedence type template, common sense template types and fault type template.
Optionally, the generation unit includes:
Extraction module, for the extracting parameter information from the initial test case, the parameter information includes that test is defeated
Enter information, execute parameter information and expected results;
Module is constructed, for according to the default test case template and the parameter information, the corresponding mesh of building
Mark the target detection use-case of defect.
Optionally, described device further includes:
Second determination unit determines test-types for traversing test case, and according to the test-purpose of test case;
Construction unit, for according to different test-types, building to correspond to the test case mould of different test-types respectively
Plate obtains the default test case template set.
To achieve the goals above, the third aspect according to an embodiment of the present disclosure provides a kind of storage medium, described
Storage medium includes the program of storage, wherein equipment where controlling the storage medium in described program operation executes above-mentioned
The method for generating test case based on vehicle control device.
To achieve the goals above, fourth aspect according to an embodiment of the present disclosure provides a kind of electronic equipment, described
Electronic equipment includes one or more processors and memory, and wherein memory is for storing one or more programs, when described
One or more programs are executed by one or more of processors, so that one or more of realize base as described above
In the method for generating test case of vehicle control device.
The method for generating test case based on vehicle control device provided by above-mentioned technical proposal, embodiment of the disclosure
And device, the prior art is carried out in test process to vehicle control device, the specific aim of test case generated compared with
The problem of difference.Embodiment of the disclosure is by determining target defect according to initial test case first, then, according to the mesh
Defect is marked, the default test case template of the corresponding target defect is chosen from default test case template set, finally, root
According to the default test case template and the initial test case, the target detection use-case of the corresponding target defect is generated,
So as to generating corresponding test case for the target defect of vehicle control device, enable test case generated
With preferable specific aim, so solve the prior art during the Test cases technology of vehicle control device, there is survey
The poor problem of the specific aim of example on probation, then the accuracy for subsequent test provides guarantee.
Above description is only the general introduction of embodiment of the disclosure technical solution, in order to better understand the reality of the disclosure
Apply the technological means of example, and can be implemented in accordance with the contents of the specification, and in order to allow the above-mentioned of embodiment of the disclosure and
Other objects, features and advantages can be more clearly understood, below the special specific embodiment for lifting embodiment of the disclosure.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the disclosure
Embodiment limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of method for generating test case process based on vehicle control device of embodiment of the disclosure offer
Figure;
Fig. 2 shows another method for generating test case streams based on vehicle control device that embodiment of the disclosure provides
Cheng Tu;
Fig. 3 shows a kind of group of Test cases technology device based on vehicle control device of embodiment of the disclosure offer
At block diagram;
Fig. 4 shows another Test cases technology device based on vehicle control device of embodiment of the disclosure offer
Composition block diagram.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms embodiment of the disclosure without that should be illustrated here
Embodiment limited.On the contrary, the embodiment that these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and energy
It is enough to be fully disclosed to those skilled in the art the range of embodiment of the disclosure.
In order in the test process to vehicle control device, make test case generated that there is preferable specific aim,
Embodiment of the disclosure provides a kind of method for generating test case based on vehicle control device, is applied to client, such as Fig. 1 institute
Show, this method includes:
101, target defect is determined according to initial test case.
Wherein, the target defect is determined according to the actual result and expected results of the initial test case.
Under normal conditions, when generating corresponding test case to vehicle control device, it is all based on different testing requirements
Come what is generated.For example, load capacity test case, torsion-testing use-case etc..However, in actual test process, different surveys
The test result of example on probation is different, and some test results meet expected results, and some does not meet expected results then.Therefore,
Expected test case is not met for such test result, corresponding test report can be generated in vehicle testing system.
In the embodiments of the present disclosure, can not be consistent according to acquisition test result in above-mentioned test report with expected results
Test case is as initial test case.And it is lacked present in vehicle control device test process with this initial test case to determine
It falls into, i.e. target defect described in the embodiment of the present disclosure.For example, the method according to this step, when determining initial test case
When for torsion-testing use-case, then it can determine that the target defect in vehicle is torque from the test case.
Certainly, in the embodiments of the present disclosure, including but not limited to described above for the acquisition modes of initial test case
Method, other modes can also be chosen according to actual needs and carried out, do not do specific restriction herein.
102, according to the target defect, the pre- of the corresponding target defect is chosen from default test case template set
If test case template.
Wherein, default test case template is contained at least one in the default test case template set.
Specifically, in the embodiments of the present disclosure, the default test case template can be set according to user.
For example, can be set as needed the test case template for determining the default electric quantity test use-case of battery capacity in vehicle.
Certainly, in the embodiments of the present disclosure, the building mode for presetting test case template can choose the building of existing test case
Mode carries out, herein and without limitation.
In the embodiments of the present disclosure, default test case template can correspond to different defects to be set, therefore,
It, can be according to default test case template set when choosing the default test case template of corresponding target defect in this step
In each the defective labels of default test case template choose, specifically, the type of label and adding tagged mode
It is determined with when constructing the default test case template set, herein and without limitation, but is ensured that the default test
Use-case template can be corresponding from different defect that may be present in test process.
103, according to the default test case template and the initial test case, the corresponding target defect is generated
Target detection use-case.
After having chosen default test case template in abovementioned steps 102, due to when generating new test case, i.e., this
When target detection use-case described in open embodiment, need to be generated by the relevant parameter in original test case, example
Such as, the information such as input, the output in initial test case are needed.Therefore, in this step, need by from initial test case
Relevant test information is obtained, and information and default test case template are tested with this, constructs corresponding test case, then
To the target detection use-case of corresponding target defect.It should be noted that in this step, the mode for generating test case can
It is carried out with the generating mode according to the prior art, in this regard, the embodiment of the present disclosure does not do specific restriction, it can according to practical feelings
Condition chooses corresponding generating mode.
The method for generating test case based on vehicle control device that embodiment of the disclosure provides, for the prior art right
Vehicle control device carries out in test process, the poor problem of the specific aim of test case generated.Embodiment of the disclosure
By determining target defect according to initial test case first, then, according to the target defect, from default test case mould
The default test case template that the corresponding target defect is chosen in plate set, finally, according to the default test case template
And the initial test case, the target detection use-case of the corresponding target defect is generated, so as to be directed to vehicle control device
Target defect generate corresponding test case, enable test case generated that there is preferable specific aim, in turn
Solve the prior art during the Test cases technology of vehicle control device, ask there are the specific aim of test case is poor
Topic, then the accuracy for subsequent test provides guarantee.
Further, as the refinement and extension to embodiment illustrated in fig. 1, embodiment of the disclosure additionally provides another kind
Method for generating test case based on vehicle control device, as shown in Fig. 2, its specific steps includes:
201, target defect is determined according to initial test case.
In embodiment of the disclosure, step in the initial test case, the descriptions such as target defect and previous embodiment
It is described unanimously in 101, details are not described herein.
It in the embodiments of the present disclosure, can be according to manual test before determining target defect according to initial test case
Initial test case is obtained in test report one or more in automatic test.Wherein, in the embodiments of the present disclosure, this is first
It include for the test information in test process, for example, inputting information, expected results, actual result, holding in beginning test case
Row condition etc., so as to the subsequent generation for carrying out target detection example.
Target defect is determined by preliminary examination test case as a result, can be subsequent targeted generation vehicle control
The test case of device provides support, and then the accuracy for subsequent test case generated provides guarantee.
202, test case is traversed, and test-types are determined according to the test-purpose of test case.
It, in the embodiments of the present disclosure, can also be according to this step for the accuracy for the test case being subsequently generated
Method, first traversal vehicle management system in whole test cases, be then based on the different purposes of test case to determine
The test-types carried out are actually needed, in this step, type and quantity for test-types are not done specifically herein
It limits, it can be determines according to actual conditions.
203, according to different test-types, the test case template of the corresponding different test-types of building, obtains institute respectively
State default test case template set.
It, can be according to identified multiple after the test-types of practically necessary progress have been determined in abovementioned steps 202
Test-types construct the test case template of corresponding each test-types respectively, wherein test case template can be understood as one
A test model for being used to generate different tests, interior necessary program and structure comprising for executing different execution conditions are right
It, can be in test input information, expected results and the execution item for adding test target thereto in this kind of test case template
After part etc. tests information, the test case for corresponding to the test target can be obtained.
Pass through traversal test case as a result, and carry out the classification of test-types depending on the application to it, then according to different surveys
Examination type constructs different test case templates respectively, comprising being directed in the default test case template set enabled to
The test case template of different test-types ensures that the accuracy for being subsequently generated the test case of corresponding target defect.
204, according to the target defect, the pre- of the corresponding target defect is chosen from default test case template set
If test case template.
In the embodiments of the present disclosure, default test case mould is contained at least one in the default test case template set
Plate, each of described test case template set preset test case and respectively correspond different test-types.
Specifically, this step can carry out in the following way:Firstly, determining the test class of the corresponding target defect
Type.Then, the default test case template of the corresponding test-types is obtained from the test case template set.Wherein,
The default test case template include composite type template, ordinal type template, triggering template types, feedback kind template,
Precedence type template, common sense template types and fault type template.
In the embodiments of the present disclosure, test-types are respectively:Composite type, ordinal type, triggering type, feedback kind,
The multiple types such as precedence type, common sense type and fault type.For example, composite type can be understood as test target
A variety of different input information needs in input information just can determine that the function of test target is according to certain permutation and combination
No normal test-types;Ordinal type can be understood as the test for inputting input information for regular hour sequence
Type;Triggering type can be understood as the test-types that input information is a kind of trigger event;Feedback kind is that test is a certain defeated
The test-types for the input information that result needs some to fix out;Priority type can be understood as test varying input signal
There are the test-types of certain priority orders;Common sense type can be understood as test and all follow certain under any conditions often
No matter load capacity is both greater than 0 at any time in the test-types of knowledge condition, such as the test of battery load capacity, then battery load capacity
The test-types of test can be understood as the test of common sense classification;Fault type can be understood as test such as numerical value transfinite,
The test-types of the abnormal conditions such as communication loss.
In the embodiments of the present disclosure, different types of template that default test template includes is respectively corresponded with test-types,
Therefore can ensure to generate corresponding test case for different target defects, so that vehicle described in the embodiment of the present disclosure
The generation result of controller test use-case is more accurate.
205, according to the default test case template and the initial test case, the corresponding target defect is generated
Target detection use-case.
Since abovementioned steps 204 have determined that the default test case template of corresponding target defect, and due to test
The generation of use-case is generated by template and parameter information, therefore, is needed in this step by obtaining in preliminary examination test case
Take corresponding parameter information.Specifically, this step may include:Firstly, the extracting parameter information from the initial test case,
Wherein, include test input information in the parameter information, execute parameter information and expected results.Then, according to described pre-
If test case template and the parameter information, the target detection use-case of the corresponding target defect of building.
Pass through the extracting parameter information from initial test case as a result, it can be ensured that parameter information it is accurate, to make a living
It is provided safeguard at the accuracy of target detection use-case.
Further, as the realization to method shown in above-mentioned Fig. 1, embodiment of the disclosure additionally provides a kind of based on vehicle
The Test cases technology device of controller, for being realized to above-mentioned method shown in FIG. 1.The Installation practice with it is aforementioned
Embodiment of the method is corresponding, be it is easy to read, present apparatus embodiment no longer to the detail content in preceding method embodiment carry out by
One repeats, it should be understood that the device in the present embodiment can correspond to the full content realized in preceding method embodiment.Such as figure
Shown in 3, which includes:First determination unit 31, selection unit 32 and generation unit 33, wherein
First determination unit 31 can be used for determining that target defect, the target defect are roots according to initial test case
It is determined according to the actual result and expected results of the initial test case.
Selection unit 32 can be used for the target defect determined according to first determination unit 31, use from default test
The default test case template of the corresponding target defect is chosen in example template set, in the default test case template set
Contain at least one default test case template.
Generation unit 33, the default test case template that can be used for being chosen according to the selection unit 32 and described initial
Test case generates the target detection use-case of the corresponding target defect.
Further, as the realization to method shown in above-mentioned Fig. 2, embodiment of the disclosure additionally provides a kind of based on vehicle
The Test cases technology device of controller, for being realized to above-mentioned method shown in Fig. 2.The Installation practice with it is aforementioned
Embodiment of the method is corresponding, be it is easy to read, present apparatus embodiment no longer to the detail content in preceding method embodiment carry out by
One repeats, it should be understood that the device in the present embodiment can correspond to the full content realized in preceding method embodiment.Such as figure
Shown in 4, which includes:First determination unit 41, selection unit 42 and generation unit 43, wherein
First determination unit 41 can be used for determining that target defect, the target defect are roots according to initial test case
It is determined according to the actual result and expected results of the initial test case.
Selection unit 42 can be used for the target defect determined according to first determination unit 41, use from default test
The default test case template of the corresponding target defect is chosen in example template set, in the default test case template set
Contain at least one default test case template.
Generation unit 43, the default test case template that can be used for being chosen according to the selection unit 42 and described initial
Test case generates the target detection use-case of the corresponding target defect.
Further, each of described default test case template set presets test case and respectively corresponds different surveys
Try type.
Further, the selection unit 42 includes:
Determining module 421 is determined for corresponding to the test-types of the target defect;
Module 422 is obtained, can be used for obtaining the corresponding determining module from the default test case template set
The default test case template of 421 test-types determined, the default test case template includes composite type template, sequence
Template types, triggering template types, feedback kind template, precedence type template, common sense template types and fault type template.
Further, the generation unit 43 includes:
Extraction module 431, can be used for the extracting parameter information from the initial test case, and the parameter information includes
Test input information executes parameter information and expected results;
Module 432 is constructed, can be used for being extracted according to the default test case template and the extraction module 431
Parameter information, the target detection use-case of the corresponding target defect of building.
Further, described device further includes:
Second determination unit 44 can be used for traversing test case, and be determined and be tested according to the test-purpose of test case
Type;
Construction unit 45 can be used for the different test-types determined according to second determination unit 44, respectively structure
The test case template for building corresponding different test-types, obtains the default test case template set, so that the selection is single
Member 42 therefrom chooses default test case template.
By above-mentioned technical proposal, embodiment of the disclosure provides a kind of Test cases technology side based on vehicle control device
Method and device.The prior art is carried out in test process to vehicle control device, the specific aim of test case generated
Poor problem.Embodiment of the disclosure is by determining target defect according to initial test case first, then, according to described
Target defect chooses the default test case template of the corresponding target defect from default test case template set, finally,
According to the default test case template and the initial test case, the target detection for generating the corresponding target defect is used
Example, so as to generate corresponding test case for the target defect of vehicle control device, so that test case generated
Can have preferable specific aim, so solve the prior art during the Test cases technology of vehicle control device, deposit
In the problem that the specific aim of test case is poor, then the accuracy for subsequent test provides guarantee.
Meanwhile target defect is determined by preliminary examination test case, it can be subsequent targeted generation vehicle control
The test case of device provides support, and then the accuracy for subsequent test case generated provides guarantee.Also, by time
It goes through test case and carries out the classification of test-types depending on the application to it, then constructed respectively according to different test-types different
Test case template is used comprising the test for different test-types in the default test case template set enabled to
Example template, ensures that the accuracy for being subsequently generated the test case of corresponding target defect.In addition, default test template includes
Different types of template respectively corresponded with test-types, therefore can ensure to generate corresponding survey for different target defect
Example on probation, so that the generation result of vehicle control device test case described in the embodiment of the present disclosure is more accurate.
The Test cases technology device based on vehicle control device includes processor and memory, and above-mentioned first determines
Unit, selection unit and generation unit etc. store in memory as program unit, are stored in memory by processor execution
In above procedure unit realize corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one
Or more, there is preferable specific aim come the test case for the vehicle control device for ensuring to generate by adjusting kernel parameter.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM), memory includes at least one storage
Chip.
Embodiment of the disclosure provides a kind of storage medium, is stored thereon with program, when which is executed by processor
Realize the method for generating test case based on vehicle control device.
Embodiment of the disclosure provides a kind of processor, and the processor is for running program, wherein described program fortune
The method for generating test case based on vehicle control device is executed when row.
Embodiment of the disclosure provides a kind of equipment, and equipment includes processor, memory and stores on a memory simultaneously
The program that can be run on a processor, processor realize following steps when executing program:Target is determined according to initial test case
Defect, the target defect are determined according to the actual result and expected results of the initial test case;According to the mesh
Defect is marked, the default test case template of the corresponding target defect is chosen from default test case template set, it is described pre-
If containing at least one default test case template in test case template set;According to the default test case template and institute
Initial test case is stated, the target detection use-case of the corresponding target defect is generated.
Further, each of described default test case template set presets test case and respectively corresponds different surveys
Try type.
Further, described according to the target defect, the corresponding mesh is chosen from default test case template set
The default test case template of defect is marked, including:
Determine the test-types of the corresponding target defect;
The default test case template of the corresponding test-types, institute are obtained from the default test case template set
State default test case template include composite type template, it is ordinal type template, triggering template types, feedback kind template, excellent
First template types, common sense template types and fault type template.
Further, described according to the default test case template and the initial test case, it generates described in corresponding to
The target detection use-case of target defect, including:
The extracting parameter information from the initial test case, the parameter information include test input information, execute ginseng
Number information and expected results;
According to the default test case template and the parameter information, the target of the corresponding target defect of building is surveyed
Example on probation.
Further, it described according to the target defect, is chosen from default test case template set described in corresponding to
Before the default test case template of target defect, the method also includes:
Test case is traversed, and test-types are determined according to the test-purpose of test case;
According to different test-types, the test case template of the corresponding different test-types of building, is obtained described pre- respectively
If test case template set.
Embodiment of the disclosure additionally provides a kind of computer program product, when executing on data processing equipment, fits
In the program for executing initialization there are as below methods step:Determine that target defect, the target defect are according to initial test case
It is determined according to the actual result of the initial test case and expected results;According to the target defect, used from default test
The default test case template of the corresponding target defect is chosen in example template set, in the default test case template set
Contain at least one default test case template;According to the default test case template and the initial test case, generate
The target detection use-case of the corresponding target defect.
Further, each of described default test case template set presets test case and respectively corresponds different surveys
Try type.
Further, described according to the target defect, the corresponding mesh is chosen from default test case template set
The default test case template of defect is marked, including:
Determine the test-types of the corresponding target defect;
The default test case template of the corresponding test-types, institute are obtained from the default test case template set
State default test case template include composite type template, it is ordinal type template, triggering template types, feedback kind template, excellent
First template types, common sense template types and fault type template.
Further, described according to the default test case template and the initial test case, it generates described in corresponding to
The target detection use-case of target defect, including:
The extracting parameter information from the initial test case, the parameter information include test input information, execute ginseng
Number information and expected results;
According to the default test case template and the parameter information, the target of the corresponding target defect of building is surveyed
Example on probation.
Further, it described according to the target defect, is chosen from default test case template set described in corresponding to
Before the default test case template of target defect, the method also includes:
Test case is traversed, and test-types are determined according to the test-purpose of test case;
According to different test-types, the test case template of the corresponding different test-types of building, is obtained described pre- respectively
If test case template set.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (12)
1. a kind of method for generating test case based on vehicle control device, which is characterized in that including:
Determine that target defect, the target defect are the actual results according to the initial test case according to initial test case
It is determined with expected results;
According to the target defect, the default test that the corresponding target defect is chosen from default test case template set is used
Example template, contains at least one default test case template in the default test case template set;
According to the default test case template and the initial test case, the target detection of the corresponding target defect is generated
Use-case.
2. the method according to claim 1, wherein each of described default test case template set is default
Test case respectively corresponds different test-types.
3. according to the method described in claim 2, it is characterized in that, described according to the target defect, from default test case
The default test case template of the corresponding target defect is chosen in template set, including:
Determine the test-types of the corresponding target defect;
The default test case template of the corresponding test-types is obtained from the default test case template set, it is described pre-
If test case template includes composite type template, ordinal type template, triggering template types, feedback kind template, priority class
Pattern plate, common sense template types and fault type template.
4. according to the method described in claim 3, it is characterized in that, described according to the default test case template and described first
Beginning test case generates the target detection use-case of the corresponding target defect, including:
The extracting parameter information from the initial test case, the parameter information include test input information, execute parameter letter
Breath and expected results;
According to the default test case template and the parameter information, the target detection of the corresponding target defect of building is used
Example.
5. method according to any of claims 1-4, which is characterized in that described according to the target defect, from
Before the default test case template for choosing the corresponding target defect in default test case template set, the method is also wrapped
It includes:
Test case is traversed, and test-types are determined according to the test-purpose of test case;
According to different test-types, the test case template of the corresponding different test-types of building, obtains the default survey respectively
Example template set on probation.
6. a kind of Test cases technology device based on vehicle control device, which is characterized in that including:
First determination unit, for determining that target defect, the target defect are according to described initial according to initial test case
What the actual result and expected results of test case determined;
Selection unit is lacked for according to the target defect, choosing the corresponding target from default test case template set
Sunken default test case template contains at least one default test case template in the default test case template set;
Generation unit, for generating the corresponding target according to the default test case template and the initial test case
The target detection use-case of defect.
7. device according to claim 6, which is characterized in that each of described default test case template set is default
Test case respectively corresponds different test-types.
8. device according to claim 7, which is characterized in that the selection unit includes:
Determining module, for determining the test-types of the corresponding target defect;
Module is obtained, the default test for obtaining the corresponding test-types from the default test case template set is used
Example template, the default test case template include composite type template, ordinal type template, triggering template types, feedback sort
Pattern plate, precedence type template, common sense template types and fault type template.
9. device according to claim 8, which is characterized in that the generation unit includes:
Extraction module, for the extracting parameter information from the initial test case, the parameter information includes test input letter
Breath executes parameter information and expected results;
Module is constructed, for according to the default test case template and the parameter information, the corresponding target of building to be lacked
Sunken target detection use-case.
10. in device according to any one of claim 6-9, which is characterized in that described device further includes:
Second determination unit determines test-types for traversing test case, and according to the test-purpose of test case;
Construction unit, for according to different test-types, the test case template of the corresponding different test-types of building, to be obtained respectively
To the default test case template set.
11. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment perform claim require 1 to described in any one of claim 5 based on vehicle control
The method for generating test case of device processed.
12. a kind of electronic equipment, which is characterized in that the electronic equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of realizations are as weighed
Benefit requires 1 to the method for generating test case based on vehicle control device described in any one of claim 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810687864.3A CN108829604A (en) | 2018-06-28 | 2018-06-28 | Method for generating test case and device based on vehicle control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810687864.3A CN108829604A (en) | 2018-06-28 | 2018-06-28 | Method for generating test case and device based on vehicle control device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108829604A true CN108829604A (en) | 2018-11-16 |
Family
ID=64133489
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810687864.3A Pending CN108829604A (en) | 2018-06-28 | 2018-06-28 | Method for generating test case and device based on vehicle control device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108829604A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109900494A (en) * | 2019-02-25 | 2019-06-18 | 上海机动车检测认证技术研究中心有限公司 | A kind of generation method of test case |
CN112380138A (en) * | 2020-12-07 | 2021-02-19 | 深圳开源互联网安全技术有限公司 | Test case compiling method and device and storage medium |
CN112559326A (en) * | 2020-12-03 | 2021-03-26 | 北京车和家信息技术有限公司 | Testing method and device for fusion calibration, vehicle-mounted system and vehicle |
CN112579370A (en) * | 2019-09-30 | 2021-03-30 | 北京车和家信息技术有限公司 | Detection method and device for vehicle-mounted HMI equipment |
CN113468053A (en) * | 2021-07-02 | 2021-10-01 | 建信金融科技有限责任公司 | Application system testing method and device |
CN113704100A (en) * | 2021-08-20 | 2021-11-26 | 苏州智加科技有限公司 | Automatic management method and system for test cases |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199045A1 (en) * | 2008-02-01 | 2009-08-06 | Dainippon Screen Mfg. Co., Ltd. | Software fault management apparatus, test management apparatus, fault management method, test management method, and recording medium |
CN104731698A (en) * | 2013-12-20 | 2015-06-24 | 深圳中兴力维技术有限公司 | Abnormal test case automatic generation processing method and device based on automatic tests |
CN105354140A (en) * | 2015-11-02 | 2016-02-24 | 上海聚力传媒技术有限公司 | Automation testing method and system |
CN107357738A (en) * | 2017-08-30 | 2017-11-17 | 郑州云海信息技术有限公司 | A kind of flexible and efficient requirement management systems and method |
-
2018
- 2018-06-28 CN CN201810687864.3A patent/CN108829604A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090199045A1 (en) * | 2008-02-01 | 2009-08-06 | Dainippon Screen Mfg. Co., Ltd. | Software fault management apparatus, test management apparatus, fault management method, test management method, and recording medium |
CN104731698A (en) * | 2013-12-20 | 2015-06-24 | 深圳中兴力维技术有限公司 | Abnormal test case automatic generation processing method and device based on automatic tests |
CN105354140A (en) * | 2015-11-02 | 2016-02-24 | 上海聚力传媒技术有限公司 | Automation testing method and system |
CN107357738A (en) * | 2017-08-30 | 2017-11-17 | 郑州云海信息技术有限公司 | A kind of flexible and efficient requirement management systems and method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109900494A (en) * | 2019-02-25 | 2019-06-18 | 上海机动车检测认证技术研究中心有限公司 | A kind of generation method of test case |
CN109900494B (en) * | 2019-02-25 | 2021-04-13 | 上海机动车检测认证技术研究中心有限公司 | Test case generation method |
CN112579370A (en) * | 2019-09-30 | 2021-03-30 | 北京车和家信息技术有限公司 | Detection method and device for vehicle-mounted HMI equipment |
CN112579370B (en) * | 2019-09-30 | 2023-07-28 | 北京车和家信息技术有限公司 | Detection method and device for vehicle-mounted HMI (human machine interface) equipment |
CN112559326A (en) * | 2020-12-03 | 2021-03-26 | 北京车和家信息技术有限公司 | Testing method and device for fusion calibration, vehicle-mounted system and vehicle |
CN112380138A (en) * | 2020-12-07 | 2021-02-19 | 深圳开源互联网安全技术有限公司 | Test case compiling method and device and storage medium |
CN112380138B (en) * | 2020-12-07 | 2021-11-09 | 深圳开源互联网安全技术有限公司 | Test case compiling method and device and storage medium |
CN113468053A (en) * | 2021-07-02 | 2021-10-01 | 建信金融科技有限责任公司 | Application system testing method and device |
CN113468053B (en) * | 2021-07-02 | 2022-11-15 | 中国建设银行股份有限公司 | Application system testing method and device |
CN113704100A (en) * | 2021-08-20 | 2021-11-26 | 苏州智加科技有限公司 | Automatic management method and system for test cases |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108829604A (en) | Method for generating test case and device based on vehicle control device | |
CN107967928B (en) | Flash memory chip life prediction method based on mathematical model | |
Haegeman et al. | Order parameter for symmetry-protected phases in one dimension | |
CN109960653A (en) | Regression testing method, device, equipment and storage medium | |
US20120022849A1 (en) | Plc symbol structure for a plc code for automatically generating an input/output model, and simulation apparatus and simulation method for testing the plc code using same | |
CN110177079A (en) | The calling system and call method of intelligent contract | |
CN109145981B (en) | Deep learning automatic model training method and equipment | |
CN108133279A (en) | Wind power probability forecasting method, storage medium and equipment | |
CN109583223A (en) | A kind of detection method and device of pair of big data security deployment | |
CN109495336A (en) | Network Abnormal test method and device, computer equipment and readable medium | |
Thwin et al. | Application of neural network for predicting software development faults using object-oriented design metrics | |
CN107451058A (en) | A kind of software development methodology and device | |
Shams | Developing machine learning products better and faster at startups | |
CN109032850A (en) | Field device debugging system and field device adjustment method | |
CN109726068A (en) | A kind of data detection method and device | |
CN107703773A (en) | A kind of method for testing software and device based on hardware-in-loop simulation system | |
CN109359346A (en) | A kind of heat load prediction method, apparatus, readable medium and electronic equipment | |
CN110057419A (en) | Compensation method, device, storage medium, processor and the system of flow signal | |
CN112527573A (en) | Interface testing method, device and storage medium | |
CN110019449A (en) | There are the merging method and device of intersection set | |
Gopal | Design quality metrics on the package maintainability and reliability of open source software | |
CN110221981A (en) | The test method and device of embedded software | |
Pesaran | Consistency of Short-term and Long-term Expectations | |
CN110175038A (en) | The update method and device of soft-lock license | |
CN111476347B (en) | Maintenance method, system and storage medium of phase modulator based on multiple factors |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181116 |
|
RJ01 | Rejection of invention patent application after publication |