CN105629948A - Test case detection method and device - Google Patents

Test case detection method and device Download PDF

Info

Publication number
CN105629948A
CN105629948A CN201510993142.7A CN201510993142A CN105629948A CN 105629948 A CN105629948 A CN 105629948A CN 201510993142 A CN201510993142 A CN 201510993142A CN 105629948 A CN105629948 A CN 105629948A
Authority
CN
China
Prior art keywords
test result
measured
function
expected
automobile controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510993142.7A
Other languages
Chinese (zh)
Other versions
CN105629948B (en
Inventor
张富丽
王可峰
魏跃远
代康伟
余军
黄颍华
刘三兵
张翰雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN201510993142.7A priority Critical patent/CN105629948B/en
Publication of CN105629948A publication Critical patent/CN105629948A/en
Application granted granted Critical
Publication of CN105629948B publication Critical patent/CN105629948B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24048Remote test, monitoring, diagnostic

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a test case detection method and device. Wherein, the method comprises the following steps: determining a function to be tested of the automobile controller; counting an expected test result and an actual test result generated after the test case is used for testing the function to be tested of the automobile controller; and detecting the coverage degree of the test case on the function to be tested of the automobile controller according to the coverage degree of the actual test result on the expected test result. The invention solves the technical problem that the coverage of the test case to all test requirements cannot be evaluated in the related technology.

Description

Test case detection method and device
Technical field
The present invention relates to automobile controller field tests, specifically, it relates to a kind of test case detection method and device.
Background technology
At present, the test platform of automobile controller has multiple, test case for the controller of different sorts, different automobile types also has multiple, but whole function demands of controller whether are covered for these test cases, at present also without criterion and measurement device, cause to assess the test case for a controller to the coverage of whole test demand.
For above-mentioned problem, effective solution is not yet proposed at present.
Summary of the invention
Embodiments provide a kind of test case detection method and device, correlation technique cannot be assessed test case to the technical problem of the coverage of whole test demand at least to solve.
An aspect according to embodiments of the present invention, it provides a kind of test case detection method, comprising: the function to be measured determining automobile controller; The expected test result that statistics produces after using the function above-mentioned to be measured of the above-mentioned automobile controller of testing case and actual test result; According to above-mentioned actual test result to the level of coverage of above-mentioned expected test result, detect above-mentioned test case to the coverage of the function above-mentioned to be measured of above-mentioned automobile controller.
Further, according to above-mentioned actual test result to the level of coverage of above-mentioned expected test result, detect above-mentioned test case the coverage of the function above-mentioned to be measured of above-mentioned automobile controller to be comprised: the ratio calculating above-mentioned actual test result and above-mentioned expected test result, wherein, above-mentioned ratio is for weighing above-mentioned actual test result to the level of coverage of above-mentioned expected test result; Above-mentioned test case is detected to the coverage of the function above-mentioned to be measured of above-mentioned automobile controller according to above-mentioned ratio.
Further, before calculating the ratio of above-mentioned actual test result and above-mentioned expected test result, aforesaid method also comprises: above-mentioned actual test result is carried out deduplication operation, wherein, after above-mentioned actual test result is carried out deduplication operation, calculate the ratio of the actual test result after duplicate removal and above-mentioned expected test result.
Further, the expected test result that statistics produces after using the function above-mentioned to be measured of the above-mentioned automobile controller of testing case comprises: the functional attributes determining the function above-mentioned to be measured of above-mentioned automobile controller; Functional attributes according to above-mentioned function to be measured determines the data type of above-mentioned expected test result; The expected test result produced after using the function above-mentioned to be measured of the above-mentioned automobile controller of above-mentioned testing case according to above-mentioned data type statistics.
Further, the expected test result produced after using the function above-mentioned to be measured of the above-mentioned automobile controller of above-mentioned testing case according to above-mentioned data type statistics comprises: when above-mentioned data type is single data type, the single expected test result that statistics produces after using the function above-mentioned to be measured of the above-mentioned automobile controller of above-mentioned testing case; Or when above-mentioned data type is for combination data type, the combination expected test result that statistics produces after using the function above-mentioned to be measured of the above-mentioned automobile controller of above-mentioned testing case, wherein, aforesaid combination expected test result is obtain by all single expected test result combination that all single data type forming aforesaid combination data type is corresponding.
Another aspect according to embodiments of the present invention, additionally provides a kind of test case detection device, comprising: determining unit, for determining the function to be measured of automobile controller; Statistic unit, for add up use the above-mentioned automobile controller of testing case function above-mentioned to be measured after produce expected test result and actual test result; Detecting unit, for according to above-mentioned actual test result to the level of coverage of above-mentioned expected test result, detect above-mentioned test case to the coverage of the function above-mentioned to be measured of above-mentioned automobile controller.
Further, above-mentioned detecting unit comprises: calculating module, for calculating the ratio of above-mentioned actual test result and above-mentioned expected test result, wherein, above-mentioned ratio is for weighing above-mentioned actual test result to the level of coverage of above-mentioned expected test result; Detection module, for detecting above-mentioned test case to the coverage of the function above-mentioned to be measured of above-mentioned automobile controller according to above-mentioned ratio.
Further, above-mentioned detecting unit also comprises: deduplication module, for calculate above-mentioned actual test result and above-mentioned expected test result ratio before, above-mentioned actual test result is carried out deduplication operation, wherein, above-mentioned calculating module is also for, after above-mentioned actual test result is carried out deduplication operation, calculating the ratio of the actual test result after duplicate removal and above-mentioned expected test result.
Further, above-mentioned statistic unit comprises: the first determination module, for determining the functional attributes of the function above-mentioned to be measured of above-mentioned automobile controller; 2nd determination module, for determining the data type of above-mentioned expected test result according to the functional attributes of above-mentioned function to be measured; Statistics module, for the expected test result produced after the function above-mentioned to be measured according to the above-mentioned data type statistics use above-mentioned automobile controller of above-mentioned testing case.
Further, above-mentioned statistics module also for when above-mentioned data type is single data type, the single expected test result that statistics produces after using the function above-mentioned to be measured of the above-mentioned automobile controller of above-mentioned testing case; Or above-mentioned statistics module is also for when above-mentioned data type is for combination data type, the combination expected test result that statistics produces after using the function above-mentioned to be measured of the above-mentioned automobile controller of above-mentioned testing case, wherein, aforesaid combination expected test result is obtain by all single expected test result combination that all single data type forming aforesaid combination data type is corresponding.
In embodiments of the present invention, adopt detection test case to the mode of the coverage of test function, by determining the function to be measured of automobile controller; The expected test result that statistics produces after using the function to be measured of testing case automobile controller and actual test result; According to actual test result to the level of coverage of expected test result, detection test case is to the coverage of the function to be measured of automobile controller, reach detection test case to the object of the coverage of whole test demand, thus achieve whether detection test case exists repeated test or test leakage to prevent causing the technique effect reducing test efficiency and waste testing cost, and then solve and correlation technique cannot be assessed test case to the technical problem of the coverage of whole test demand.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the part of the application, and the schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention. In the accompanying drawings:
Fig. 1 is the schema of a kind of optional test case detection method according to embodiments of the present invention;
Fig. 2 is the schematic diagram of the detection device of a kind of optional test case according to embodiments of the present invention.
Embodiment
In order to make those skilled in the art understand the present invention program better, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments. Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first " in the specification sheets of the present invention and claim book and above-mentioned accompanying drawing, " the 2nd " etc. are for distinguishing similar object, and need not be used for describing specific order or precedence. Should be appreciated that the data of like this use can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except diagram here or describe those except order implement. In addition, term " comprises " and " having " and their any distortion, intention is to cover does not arrange his comprising, such as, contain those steps or unit that the process of series of steps or unit, device, system, product or equipment are not necessarily limited to clearly list, but can comprise that clearly do not list or for intrinsic other step of these processes, device, product or equipment or unit.
Embodiment 1
According to embodiments of the present invention, provide the device embodiment of a kind of test case appraisal procedure, it should be noted that, can perform in the computer system of such as one group of computer executable instructions in the step shown in the schema of accompanying drawing, and, although show logical order in flow charts, but in some cases, it is possible to be different from the step shown or described by the execution of order herein.
Fig. 1 is the schema of a kind of optional test case detection method according to embodiments of the present invention, and as shown in Figure 1, the method comprises the steps:
Step S102, it is determined that the function to be measured of automobile controller;
Step S104, the expected test result that statistics produces after using the function to be measured of testing case automobile controller and actual test result;
Step S106, according to actual test result to the level of coverage of expected test result, assessment test case is to the coverage of the function to be measured of automobile controller.
In fact, for the automobile controller that is specified, it can have multiple function, also, the function to be measured of automobile controller can by multiple, at this, it is possible to specify a kind of as current function to be measured. For example, it is assumed that certain automobile controller has the function of the motor rotating speed in control shelves position, motor rotating speed and specified gear, now, it is possible to specify the function (hereinafter referred to as shelves position controlling functions) of control shelves position is as current function to be measured.
Assume that the automobile installing above-mentioned automobile controller has 5 shelves positions, it is respectively 0,1,2,3,4, when using testing case above-mentioned shelves position controlling functions, the expected test result of 0,1,2,3,4 totally 5 shelves positions should be produced in theory, consequently, it is desirable to the theoretical test result of 0,1,2,3,4 is all added up in expected test result. And when adding up the actual test result of 0,1,2,3,4, it is necessary to opening above-mentioned test case, test 0,1,2,3,4 grade of position of above-mentioned automobile controller, the actual test value now recorded is exactly the actual test result of 0,1,2,3,4.
Wherein, when actual test value comprises the actual test result of 0,1,2,3,4 totally 5 shelves positions, show that the coverage of the function current to be measured of automobile controller is 100% by this test case, namely cover completely; Otherwise, show this test case can not cover completely the function current to be measured of automobile controller.
Pass through above-described embodiment, the expected test result of test case, the statistics of actual test result can be realized, and whether test case covers the assessment of the test result likely occurred of function to be measured, reach detection test case to the object of the coverage of whole test demand, thus achieve whether detection test case exists repeated test or test leakage to prevent causing the technique effect reducing test efficiency and waste testing cost.
Can selection of land, according to actual test result to the level of coverage of expected test result, the coverage of the function to be measured of automobile controller is comprised by assessment test case:
S2, calculates the ratio of actual test result and expected test result, and wherein, ratio is for weighing actual test result to the level of coverage of expected test result;
S4, assesses test case to the coverage of the function to be measured of automobile controller according to ratio.
By the embodiment of the present invention, first add up actual test result, expected test result, the coverage of the test case of recycling statistical computation automobile controller, provide assessment foundation for weighing testing case specific aim.
, it is also possible to output detections and statistics in the way of form document, further, after the above steps specifically as shown in table 1.
Table 1
During enforcement, the actual test result in upper table is the result that test case program tests generation automatically, it is necessary to the actual test result of each function to be measured of database software programming count, and also namely the set of actual test result is obtained by database software statistics. In addition, the function that above-mentioned database software comprises has: the actual test result of the every function of statistics controller, and statistics is automatically filled up in test result form, as in table 1; Database software calculates the Test coverage degree of each function to be measured automatically, and the Test coverage degree method of calculation of controller function are: all actual test results/
All expected results * 100%, that is, actual test result set/expected results set 1*100%.
Pass through the embodiment of the present invention, it is possible to reach simply, quantize test case intuitively to the technique effect of the coverage of the function to be measured of automobile controller.
Owing to test case may exist the defect that function to be measured carries out repeated test, if now using the technical scheme provided in above-described embodiment directly to calculate the value of " actual test result set/expected results set * 100% ", the situation that the coverage described by this ratio and actual coverage are not inconsistent may be caused, such as, in statistics 0, 1, 2, 3, during the test result of the shelves position of 4, the actual test result counted on comprises: 0, 1, 1, 1, 2, 3, 4, now, if calculating coverage according to the method described above, it is then [(0, 1, 1, 1, 2, 3, 4, )/(0, 1, 2, 3, 4)] * 100%=7/5=1.4, owing to 1.4 are greater than 1, obviously do not conform to the actual conditions. in order to overcome above-mentioned defect, can selection of land, before calculating the ratio of actual test result and expected test result, aforesaid method also comprises:
S6, carries out deduplication operation to actual test result, wherein, after actual test result is carried out deduplication operation, calculates the ratio of the actual test result after duplicate removal and expected test result.
After performing deduplication operation, it is possible to removing repeat in actual test result 0,1,1,1,2,3,41, obtain 0,1,2,3,4, now the calculation result of coverage is 100%, and this result is consistent with actual.
Pass through the embodiment of the present invention, it is possible to avoid test case repeated test or test leakage and cause test degradation in efficiency, testing cost waste, reach the technique effect whether assessment test case is outstanding simultaneously. And, for the not relevant criterion of coverage of the test case of current automobile controller and the problem of balancing method, it is blank that the present invention has filled up this, provides one method and foundation for weighing all demands of the appointed function whether test case covers automobile controller.
Can selection of land, statistics use testing case automobile controller function to be measured after produce expected test result comprise:
S8, it is determined that the functional attributes of the function to be measured of automobile controller;
S10, determines the data type of expected test result according to the functional attributes of function to be measured;
S12, the expected test result produced after using the function to be measured of testing case automobile controller according to data type statistics.
Each item function to be measured has the functional attributes of oneself, and like this, although data volume is uncertain in test result, but its data type is certain, such as, be this data type can be the one in following type: enumerate type, numeric type, boolean's amount type. Specifically, when the shelves position controlling functions that function to be measured is automobile controller, it is contemplated that the data type of test result for enumerating type, e.g., aforesaid 0,1,2,3,4 etc.; When the motor rotating speed controlling functions that function to be measured is automobile controller, the data type of expected test result is numeric type, as, under nominal situation, if motor rotating speed is 800-4000, then [800-4000] is normal numerical range, now all data scope can be divided into three sections, be respectively [minimum value-800), [800-4000], (4000-maximum value]. Test result data it should be noted that, for numeric type test result, it is assumed that expected results scope comprises three sections, as long as then can fall into these three sections of data areas respectively and namely shows that test case can cover all demands of current test function completely. In addition, for boolean's type test result, it is contemplated that the set of test result be 0,1}.
Pass through the embodiment of the present invention, it is possible to according to the functional attributes of function to be measured, the expected test result that flexible geo-statistic produces after using the function to be measured of testing case automobile controller.
Can selection of land, according to data type statistics use testing case automobile controller function to be measured after produce expected test result comprise:
S14, when data type is single data type, the single expected test result that statistics produces after using the function to be measured of testing case automobile controller; Or
S16, when data type is for combination data type, the combination expected test result that first statistics produces after using the function to be measured of testing case automobile controller, wherein, combining expected test result is obtain by all single expected test result combination that all single data type forming combination data type is corresponding.
For the test result of single data type, the general only corresponding data of each test result, such as, for the test result of shelves position controlling functions, in test result set, the corresponding data of each test result, such as 0 or 1 or 2 or 3 or 4 etc.; For the test result of combination data type, each test result generally can corresponding multiple data, such as, for the test result of shelves position motor rotating speed controlling functions, in test result set, corresponding two data of each test result, as, 1 grade and 800, wherein, 1 grade and 800 is exactly combine expected test result, and it is that the test result of the test result by shelves position controlling functions and motor rotating speed controlling functions combines. Combine expected test result set then to obtain by all single expected test result combination that all single data type forming combination data type is corresponding. Like this, under reasonable operating mode, so that it may to add up the set of the combinations of values of the test result likely occurred.
Pass through the embodiment of the present invention, it is possible to according to the data results feature of test result, the expected test result that flexible geo-statistic produces after using the function to be measured of testing case automobile controller.
Embodiment 2
According to embodiments of the present invention, it provides the device embodiment of a kind of test case apparatus for evaluating.
Fig. 2 is the schematic diagram of the detection device of a kind of optional test case according to embodiments of the present invention, and as shown in Figure 2, this device comprises: determining unit 202, for determining the function to be measured of automobile controller; Statistic unit 204, for add up use testing case automobile controller function to be measured after produce expected test result and actual test result; Assessment unit 206, for according to actual test result to the level of coverage of expected test result, assessment test case is to the coverage of the function to be measured of automobile controller.
In fact, for the automobile controller that is specified, it can have multiple function, also, the function to be measured of automobile controller can by multiple, at this, it is possible to specify a kind of as current function to be measured. For example, it is assumed that certain automobile controller has the function of the motor rotating speed in control shelves position, motor rotating speed and specified gear, now, it is possible to specify the function (hereinafter referred to as shelves position controlling functions) of control shelves position is as current function to be measured.
Assume that the automobile installing above-mentioned automobile controller has 5 shelves positions, it is respectively 0,1,2,3,4, when using testing case above-mentioned shelves position controlling functions, the expected test result of 0,1,2,3,4 totally 5 shelves positions should be produced in theory, consequently, it is desirable to the theoretical test result of 0,1,2,3,4 is all added up in expected test result. And when adding up the actual test result of 0,1,2,3,4, it is necessary to opening above-mentioned test case, test 0,1,2,3,4 grade of position of above-mentioned automobile controller, the actual test value now recorded is exactly the actual test result of 0,1,2,3,4.
Wherein, when actual test value comprises the actual test result of 0,1,2,3,4 totally 5 shelves positions, show that the coverage of the function current to be measured of automobile controller is 100% by this test case, namely cover completely; Otherwise, show this test case can not cover completely the function current to be measured of automobile controller.
Pass through above-described embodiment, the expected test result of test case, the statistics of actual test result can be realized, and whether test case covers the assessment of the test result likely occurred of function to be measured, reach detection test case to the object of the coverage of whole test demand, thus achieve whether detection test case exists repeated test or test leakage to prevent causing the technique effect reducing test efficiency and waste testing cost.
Can selection of land, assessment unit comprises: calculate module, for calculating the ratio of actual test result and expected test result, wherein, ratio is for weighing actual test result to the level of coverage of expected test result; Evaluation module, for assessing test case to the coverage of the function to be measured of automobile controller according to ratio.
By the embodiment of the present invention, first add up actual test result, expected test result, the coverage of the test case of recycling statistical computation automobile controller, provide assessment foundation for weighing testing case specific aim.
, it is also possible to output detections and statistics in the way of form document, further, after the above steps specifically as shown in table 1.
During enforcement, the actual test result in upper table is the result that test case program tests generation automatically, it is necessary to the actual test result of each function to be measured of database software programming count, and also namely the set of actual test result is obtained by database software statistics. In addition, the function that above-mentioned database software comprises has: the actual test result of the every function of statistics controller, and statistics is automatically filled up in test result form, as in table 1; Database software calculates the Test coverage degree of each function to be measured automatically, and the Test coverage degree method of calculation of controller function are: all actual test results/all expected results * 100%, that is, actual test result set/expected results set 1*100%.
Pass through the embodiment of the present invention, it is possible to reach simply, quantize test case intuitively to the technique effect of the coverage of the function to be measured of automobile controller.
Owing to test case may exist the defect that function to be measured carries out repeated test, if now using the technical scheme provided in above-described embodiment directly to calculate the value of " actual test result set/expected results set * 100% ", the situation that the coverage described by this ratio and actual coverage are not inconsistent may be caused, such as, in statistics 0, 1, 2, 3, during the test result of the shelves position of 4, the actual test result counted on comprises: 0, 1, 1, 1, 2, 3, 4, now, if calculating coverage according to the method described above, it is then [(0, 1, 1, 1, 2, 3, 4, )/(0, 1, 2, 3, 4)] * 100%=7/5=1.4, owing to 1.4 are greater than 1, obviously do not conform to the actual conditions. in order to overcome above-mentioned defect, can selection of land, assessment unit also comprises: deduplication module, for calculate actual test result and expected test result ratio before, actual test result is carried out deduplication operation, wherein, module is calculated also for, after actual test result is carried out deduplication operation, calculating the ratio of the actual test result after duplicate removal and expected test result.
After performing deduplication operation, it is possible to removing repeat in actual test result 0,1,1,1,2,3,41, obtain 0,1,2,3,4, now the calculation result of coverage is 100%, and this result is consistent with actual.
Pass through the embodiment of the present invention, it is possible to avoid test case repeated test or test leakage and cause test degradation in efficiency, testing cost waste, reach the technique effect whether assessment test case is outstanding simultaneously. And, for the not relevant criterion of coverage of the test case of current automobile controller and the problem of balancing method, it is blank that the present invention has filled up this, provides one method and foundation for weighing all demands of the appointed function whether test case covers automobile controller.
Can selection of land, statistic unit comprises: the first determination module, for determining the functional attributes of the function to be measured of automobile controller; 2nd determination module, for determining the data type of expected test result according to the functional attributes of function to be measured; Statistics module, for the expected test result produced after the function to be measured according to data type statistics use testing case automobile controller.
Each item function to be measured has the functional attributes of oneself, and like this, although data volume is uncertain in test result, but its data type is certain, such as, be this data type can be the one in following type: enumerate type, numeric type, boolean's amount type. Specifically, when the shelves position controlling functions that function to be measured is automobile controller, it is contemplated that the data type of test result for enumerating type, e.g., aforesaid 0,1,2,3,4 etc.; When the motor rotating speed controlling functions that function to be measured is automobile controller, the data type of expected test result is numeric type, as, under nominal situation, if motor rotating speed is 800-4000, then [800-4000] is normal numerical range, now all data scope can be divided into three sections, be respectively [minimum value-800), [800-4000], (4000-maximum value]. Test result data it should be noted that, for numeric type test result, it is assumed that expected results scope comprises three sections, as long as then can fall into these three sections of data areas respectively and namely shows that test case can cover all demands of current test function completely. In addition, for boolean's type test result, it is contemplated that the set of test result be 0,1}.
Pass through the embodiment of the present invention, it is possible to according to the functional attributes of function to be measured, the expected test result that flexible geo-statistic produces after using the function to be measured of testing case automobile controller.
Can selection of land, statistics module also for when data type is single data type, the single expected test result that statistics produces after using the function to be measured of testing case automobile controller; Or statistics module is also for when data type is for combination data type, the combination expected test result that first statistics produces after using the function to be measured of testing case automobile controller, wherein, combining expected test result is obtain by all single expected test result combination that all single data type forming combination data type is corresponding.
For the test result of single data type, the general only corresponding data of each test result, such as, for the test result of shelves position controlling functions, in test result set, the corresponding data of each test result, such as 0 or 1 or 2 or 3 or 4 etc.; For the test result of combination data type, each test result generally can corresponding multiple data, such as, for the test result of shelves position motor rotating speed controlling functions, in test result set, corresponding two data of each test result, as, 1 grade and 800, wherein, 1 grade and 800 is exactly combine expected test result, and it is that the test result of the test result by shelves position controlling functions and motor rotating speed controlling functions combines. Combine expected test result set then to obtain by all single expected test result combination that all single data type forming combination data type is corresponding. Like this, under reasonable operating mode, so that it may to add up the set of the combinations of values of the test result likely occurred.
Pass through the embodiment of the present invention, it is possible to according to the data results feature of test result, the expected test result that flexible geo-statistic produces after using the function to be measured of testing case automobile controller.
Above-mentioned embodiment of the present invention sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, certain embodiment there is no the part described in detail, it is possible to see the associated description of other embodiments.
In several embodiments that the application provides, it should be appreciated that, disclosed technology contents, realizes by other mode. Wherein, device embodiment described above is only schematic, the such as division of described unit, can be that a kind of logic function divides, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or does not perform. Another point, shown or discussed coupling each other or directly coupling or communication connection can be the indirect coupling by some interfaces, unit or module or communication connection, it is possible to be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or can also be distributed on multiple unit. Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to is that the independent physics of each unit exists, it is also possible to two or more unit are in a unit integrated. Above-mentioned integrated unit both can adopt the form of hardware to realize, it is also possible to adopts the form of software functional unit to realize.
If described integrated unit realize using the form of software functional unit and as independent production marketing or when using, it is possible to be stored in a computer read/write memory medium. Based on such understanding, the technical scheme of the present invention in essence or says that part prior art contributed or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage media, comprises some instructions with so that computer equipment (can be Personal Computer, server or the network equipment etc.) performs all or part of step of device described in each embodiment of the present invention. And aforesaid storage media comprises: USB flash disk, read-only storage (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The above is only the preferred embodiment of the present invention; it is noted that for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. a test case detection method, it is characterised in that, comprising:
Determine the function to be measured of automobile controller;
The expected test result that statistics produces after using the function described to be measured of automobile controller described in testing case and actual test result;
According to described actual test result to the level of coverage of described expected test result, detect described test case to the coverage of the function described to be measured of described automobile controller.
2. test case detection method according to claim 1, it is characterised in that, according to described actual test result to the level of coverage of described expected test result, detect described test case and the coverage of the function described to be measured of described automobile controller is comprised:
Calculating the ratio of described actual test result and described expected test result, wherein, described ratio is for weighing described actual test result to the level of coverage of described expected test result;
Described test case is detected to the coverage of the function described to be measured of described automobile controller according to described ratio.
3. test case detection method according to claim 2, it is characterised in that, before calculating the ratio of described actual test result and described expected test result, described method also comprises:
Described actual test result is carried out deduplication operation,
Wherein, after described actual test result is carried out deduplication operation, calculate the ratio of the actual test result after duplicate removal and described expected test result.
4. test case detection method according to claim 1, it is characterised in that, the expected test result that statistics produces after using the function described to be measured of automobile controller described in testing case comprises:
Determine the functional attributes of the function described to be measured of described automobile controller;
Functional attributes according to described function to be measured determines the data type of described expected test result;
The expected test result produced after using the function described to be measured of automobile controller described in described testing case according to described data type statistics.
5. test case detection method according to claim 4, it is characterised in that, the expected test result produced after using the function described to be measured of automobile controller described in described testing case according to described data type statistics comprises:
When described data type is single data type, the single expected test result that statistics produces after using the function described to be measured of automobile controller described in described testing case; Or
When described data type is for combination data type, the combination expected test result that statistics produces after using the function described to be measured of automobile controller described in described testing case, wherein, described combination expected test result is obtain by all single expected test result combination that all single data type forming described combination data type is corresponding.
6. a test case detection device, it is characterised in that, comprising:
Determining unit, for determining the function to be measured of automobile controller;
Statistic unit, for the expected test result that produces after adding up the function described to be measured using automobile controller described in testing case and actual test result;
Detecting unit, for according to described actual test result to the level of coverage of described expected test result, detect described test case to the coverage of the function described to be measured of described automobile controller.
7. test case according to claim 6 detection device, it is characterised in that, described detecting unit comprises:
Calculating module, for calculating the ratio of described actual test result and described expected test result, wherein, described ratio is for weighing described actual test result to the level of coverage of described expected test result;
Detection module, for detecting described test case to the coverage of the function described to be measured of described automobile controller according to described ratio.
8. test case according to claim 7 detection device, it is characterised in that, described detecting unit also comprises:
Deduplication module, for calculate described actual test result and described expected test result ratio before, described actual test result is carried out deduplication operation,
Wherein, described calculating module is also for, after described actual test result is carried out deduplication operation, calculating the ratio of the actual test result after duplicate removal and described expected test result.
9. test case according to claim 6 detection device, it is characterised in that, described statistic unit comprises:
First determination module, for determining the functional attributes of the function described to be measured of described automobile controller;
2nd determination module, for determining the data type of described expected test result according to the functional attributes of described function to be measured;
Statistics module, the expected test result produced after the function described to be measured for automobile controller according to the described data type statistics described testing case of use.
10. test case according to claim 9 detection device, it is characterised in that,
Described statistics module also for when described data type is single data type, the single expected test result that statistics produces after using the function described to be measured of automobile controller described in described testing case; Or
Described statistics module is also for when described data type is for combination data type, the combination expected test result that statistics produces after using the function described to be measured of automobile controller described in described testing case, wherein, described combination expected test result is obtain by all single expected test result combination that all single data type forming described combination data type is corresponding.
CN201510993142.7A 2015-12-24 2015-12-24 Test case detection method and device Expired - Fee Related CN105629948B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510993142.7A CN105629948B (en) 2015-12-24 2015-12-24 Test case detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510993142.7A CN105629948B (en) 2015-12-24 2015-12-24 Test case detection method and device

Publications (2)

Publication Number Publication Date
CN105629948A true CN105629948A (en) 2016-06-01
CN105629948B CN105629948B (en) 2019-02-26

Family

ID=56045003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510993142.7A Expired - Fee Related CN105629948B (en) 2015-12-24 2015-12-24 Test case detection method and device

Country Status (1)

Country Link
CN (1) CN105629948B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445814A (en) * 2016-09-05 2017-02-22 北京新能源汽车股份有限公司 Test case detection method and device
CN111639031A (en) * 2020-06-01 2020-09-08 电信科学技术第十研究所有限公司 Coverage evaluation method and device based on test data
CN111858118A (en) * 2020-07-01 2020-10-30 东风汽车集团有限公司 Hardware platform modular circuit testing method
CN114676036A (en) * 2021-06-04 2022-06-28 北京新能源汽车股份有限公司 Method, device and equipment for determining test coverage
WO2023288099A1 (en) * 2021-07-15 2023-01-19 Zeronorth, Inc. Normalization, compression, and correlation of vulnerabilities

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030163A (en) * 2006-03-01 2007-09-05 李春芳 Method for deciding human-machine interface testing covering rate
CN101247293A (en) * 2008-03-11 2008-08-20 福建星网锐捷网络有限公司 Automatic test approach and system
CN101976220A (en) * 2010-09-27 2011-02-16 北京神州泰岳软件股份有限公司 Unit test system
CN103019933A (en) * 2012-11-27 2013-04-03 网宿科技股份有限公司 Automatic test case coverage identification method and device
CN103870383A (en) * 2012-12-11 2014-06-18 航天信息股份有限公司 Test coverage statistical method and system based on JVM
US20140351793A1 (en) * 2013-05-21 2014-11-27 International Business Machines Corporation Prioritizing test cases using multiple variables
US20150347278A1 (en) * 2014-05-28 2015-12-03 Vmware, Inc. Identifying test gaps using code execution paths

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101030163A (en) * 2006-03-01 2007-09-05 李春芳 Method for deciding human-machine interface testing covering rate
CN101247293A (en) * 2008-03-11 2008-08-20 福建星网锐捷网络有限公司 Automatic test approach and system
CN101976220A (en) * 2010-09-27 2011-02-16 北京神州泰岳软件股份有限公司 Unit test system
CN103019933A (en) * 2012-11-27 2013-04-03 网宿科技股份有限公司 Automatic test case coverage identification method and device
CN103870383A (en) * 2012-12-11 2014-06-18 航天信息股份有限公司 Test coverage statistical method and system based on JVM
US20140351793A1 (en) * 2013-05-21 2014-11-27 International Business Machines Corporation Prioritizing test cases using multiple variables
US20150347278A1 (en) * 2014-05-28 2015-12-03 Vmware, Inc. Identifying test gaps using code execution paths

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
程胜 等: "《航天高可靠嵌入式实时操作系统原理与技术》", 31 July 2012, 北京:中国宇航出版社 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106445814A (en) * 2016-09-05 2017-02-22 北京新能源汽车股份有限公司 Test case detection method and device
CN111639031A (en) * 2020-06-01 2020-09-08 电信科学技术第十研究所有限公司 Coverage evaluation method and device based on test data
CN111639031B (en) * 2020-06-01 2023-06-30 电信科学技术第十研究所有限公司 Coverage evaluation method and device based on test data
CN111858118A (en) * 2020-07-01 2020-10-30 东风汽车集团有限公司 Hardware platform modular circuit testing method
CN111858118B (en) * 2020-07-01 2022-03-29 东风汽车集团有限公司 Hardware platform modular circuit testing method
CN114676036A (en) * 2021-06-04 2022-06-28 北京新能源汽车股份有限公司 Method, device and equipment for determining test coverage
WO2023288099A1 (en) * 2021-07-15 2023-01-19 Zeronorth, Inc. Normalization, compression, and correlation of vulnerabilities
US11783051B2 (en) 2021-07-15 2023-10-10 Zeronorth, Inc. Normalization, compression, and correlation of vulnerabilities

Also Published As

Publication number Publication date
CN105629948B (en) 2019-02-26

Similar Documents

Publication Publication Date Title
CN105629948A (en) Test case detection method and device
CN105468510A (en) Method and system for evaluating and tracking software quality
US11170332B2 (en) Data analysis system and apparatus for analyzing manufacturing defects based on key performance indicators
CN104517052B (en) Invasion detection method and device
CN108573355A (en) The method, apparatus and service server of operation are replaced after model modification
CN105335407A (en) Data automation test method and apparatus
CN107944721B (en) Universal machine learning method, device and system based on data mining
CN105871879A (en) Automatic network element abnormal behavior detection method and device
CN110837852A (en) Fault diagnosis method and device for rolling mill gearbox and terminal equipment
CN106934679B (en) Information matching method and device
CN114140034A (en) Quality monitoring method based on working conditions and related device
CN104635141A (en) Integrated circuit detection method, device and system
CN114111352B (en) Carbide furnace vacuumizing system abnormity detection method and system
CN105159826B (en) A kind of method and apparatus of wrong sentence in positioning target program
CN113947504B (en) Random forest method-based electricity stealing analysis method and system
CN108009582B (en) Method for setting standard working index of electronic equipment
CN107977626B (en) Grouping method for electronic equipment working data
CN112345869A (en) Automobile electronic equipment testing method and system, electronic equipment and storage medium
CN109947656A (en) A kind of testing case management and device
CN110515752A (en) A kind of disk unit life-span prediction method and device
CN109214447A (en) Model training method and device, disk life-span prediction method and device
CN112926991B (en) Method and system for grading severity level of cash-out group
US11255705B2 (en) Method for setting quality thresholds of products for testing purposes and device employing method
CN110597729B (en) Pressure testing method, device and system based on dimension
CN109748061B (en) Blanking state detection method, device and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20190226

Termination date: 20211224

CF01 Termination of patent right due to non-payment of annual fee