CN110888803B - Method and system for converting test decision table into test case - Google Patents

Method and system for converting test decision table into test case Download PDF

Info

Publication number
CN110888803B
CN110888803B CN201911090153.9A CN201911090153A CN110888803B CN 110888803 B CN110888803 B CN 110888803B CN 201911090153 A CN201911090153 A CN 201911090153A CN 110888803 B CN110888803 B CN 110888803B
Authority
CN
China
Prior art keywords
rules
rule
item
judging
items
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911090153.9A
Other languages
Chinese (zh)
Other versions
CN110888803A (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 National New Energy Vehicle Technology Innovation Center Co Ltd
Original Assignee
Beijing National New Energy Vehicle Technology Innovation Center 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 National New Energy Vehicle Technology Innovation Center Co Ltd filed Critical Beijing National New Energy Vehicle Technology Innovation Center Co Ltd
Priority to CN201911090153.9A priority Critical patent/CN110888803B/en
Publication of CN110888803A publication Critical patent/CN110888803A/en
Application granted granted Critical
Publication of CN110888803B publication Critical patent/CN110888803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses a method and a system for converting a test decision table into a test case, wherein the method comprises the following steps: step 1: extracting a rule with an action item from an initial judging table aiming at the action item in the initial judging table of the automobile controller; step 2: merging the rules, and filling the merged rules into a process judgment table part corresponding to the action item; step 3: repeatedly executing the step 1-2 until a process judgment table corresponding to all action items in the initial judgment table is generated; step 4: merging rules of the process decision table until merging can not be performed; step 5: and (5) generating a test case based on the process decision table in the step 4. The method and the device can automatically extract the rules in the test decision table, combine the rules with the same action items, generate the test cases according to the combined decision table, improve the accuracy of the test cases, enable the testers to test the automobile controller based on the more accurate test cases, and improve the accuracy and efficiency of the test.

Description

Method and system for converting test decision table into test case
Technical Field
The invention belongs to the technical field of automobile controller testing, and particularly relates to a method and a system for converting a test decision table for an automobile controller into a test case.
Background
At present, functions of automobiles are more and more, various software in automobiles is more and more complex, in order to ensure reliability of automobiles, testing of control systems in automobiles is indispensable, and testing of automobile control systems is required to be performed based on test cases, wherein the test cases are technical documents describing input, actions or time and a desired result, and aim to determine whether a certain characteristic of an application program works normally or not, so that compiling of the test cases is crucial.
The common test case writing is based on a judging table, wherein the judging table consists of a condition pile, an action pile, a condition item, an action item and a rule; when the test case is designed by using the decision list method, a tester needs to identify and judge according to the condition piles, the action piles, the condition items, the action items and the rules, then the combination is simplified, and the simplified content is filled into the test case according to the format of the test case. With the increase of the condition piles and the action piles, the testers not only need to consume more time to combine and simplify the judging table to realize the writing of the test cases, but also have the problem of missing or misjudging when the condition piles and the action piles are numerous.
Therefore, a test case compiling method is particularly needed, which can save the time for a tester to compile test cases and can ensure the accuracy of the test cases.
Disclosure of Invention
The invention aims to provide a method and a system for converting a test decision table for an automobile controller into a test case, which can ensure the accuracy of the test case and save the time for a tester to compile the test case.
In order to achieve the above object, the present invention provides a method of converting a test decision table for an automotive controller into a test case, comprising: step 1: extracting a rule with an action item in an initial judging table of the automobile controller aiming at the action item in the initial judging table; step 2: acquiring the number of rules with the action items, comparing the number with a number threshold value, and filling the rules into the corresponding parts of the action items in a process judging table or filling the combined rules into the corresponding parts of the action items in the process judging table based on a comparison result; step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table; step 4: taking the process judging table as the initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table corresponding to all action items in the initial judging table; step 5: and (3) taking the process judging table generated in the step (4) as a final judging table, and generating the test case based on the final judging table.
Preferably, the number threshold includes a first number threshold equal to 1 and a second number threshold equal to 2; and when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table.
Preferably, when the number is equal to the second number threshold, identifying a condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judgment result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table.
Preferably, when said number is greater than said second number threshold, the following steps are performed: step 201: two of the rules are selected; step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table; and when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the part corresponding to the action item in the process judging table.
Preferably, prior to said step 1, condition items, action items and rules in said initial decision table are identified.
Preferably, in the step 4, the rule can not be merged any more, which means that each two rules have different condition terms, or each two rules have the same condition term, and the judgment result of a plurality of condition terms is different, or only one rule remains.
The invention also provides a system for converting a test decision table for an automobile controller into a test case, which comprises: a memory storing computer executable instructions; a processor executing computer executable instructions in the memory, the processor performing the steps of: step 1: extracting a rule with an action item in an initial judging table of the automobile controller aiming at the action item in the initial judging table; step 2: acquiring the number of rules with the action items, comparing the number with a number threshold value, and filling the rules into a part corresponding to the action items in a process judging table or filling the combined rules into a part corresponding to the action items in the process judging table based on a comparison result; step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table; step 4: taking the process judging table as the initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table of all action items in the initial judging table; step 5: and (3) taking the process judging table generated in the step (4) as a final judging table, and generating the test case based on the final judging table.
Preferably, the number threshold includes a first number threshold equal to 1 and a second number threshold equal to 2; and when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table.
Preferably, when the number is equal to the second number threshold, identifying a condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judgment result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table.
Preferably, when said number is greater than said second number threshold, the following steps are performed: step 201: two of the rules are selected; step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table; and when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the part corresponding to the action item in the process judging table.
Preferably, prior to said step 1, condition items, action items and rules in said initial decision table are identified.
Preferably, in the step 4, the rule can not be merged any more, which means that each two rules have different condition terms, or each two rules have the same condition term, and the judgment result of a plurality of condition terms is different, or only one rule remains.
The invention has the beneficial effects that: the method and the device can automatically extract the rules in the test decision table, combine the rules with the same action items, generate the test cases according to the combined decision table, save the time for writing the test cases by the testers, and simultaneously improve the accuracy of the test cases, so that the testers can test the automobile controller based on more accurate test cases, and improve the accuracy and efficiency of the test.
The method of the present invention has other features and advantages which will be apparent from or are set forth in detail in the accompanying drawings and the following detailed description, which are incorporated herein, and which together serve to explain certain principles of the invention.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings. Wherein like reference numerals generally refer to like elements throughout the exemplary embodiments of the present invention.
FIG. 1 illustrates a flow chart of a method of converting a test decision table for an automotive controller into test cases, according to one embodiment of the invention.
FIG. 2 illustrates a detailed flow chart of a method of converting a test decision table for an automotive controller into test cases, according to one embodiment of the invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiment of the invention is shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
A method of converting a test decision table for an automotive controller into test cases according to the present invention includes: step 1: extracting a rule with an action item from an initial judging table aiming at the action item in the initial judging table of the automobile controller; step 2: acquiring the number of rules with action items, comparing the number with a number threshold value, and filling the rules into the corresponding parts of the action items in the process judging table or filling the combined rules into the corresponding parts of the action items in the process judging table based on the comparison result; step 3: repeating the step 1-2 for each action item in the initial decision table to obtain a corresponding process decision table; step 4: taking the process judging table as an initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table corresponding to all action items in the initial judging table; step 5: and (3) taking the process judgment table generated in the step (4) as a final judgment table, and generating test cases based on the final judgment table.
Specifically, according to the title in the initial determination table, identifying the condition item, the action item and the rule thereof, reading the initial determination table, extracting the rule with the same action item for one action item in the initial determination table, filling the rule into the action item corresponding part in the process determination table or filling the combined rule into the action item corresponding part in the process determination table according to the number and the rule of the rule with the same action item, extracting the rule with the same action item for the next action item in the initial determination table, filling the rule into the action item corresponding part in the process determination table or filling the combined rule into the action item corresponding part in the process determination table based on the number and the rule of the rule until the process determination table corresponding to all the action items in the initial determination table is generated; because there are many rules that can be combined in the newly generated process determination table, the process determination table needs to be combined, the generated process determination table is used as an initial determination table, the process determination table is emptied, the combined process combination process determination table is repeated until the rules cannot be combined any more, the process determination table of all action items is obtained, the newly generated process determination table is used as a final determination table, and test cases are generated based on the final determination table.
According to the embodiment, the rules in the test decision table can be extracted, the rules with the same action items are combined, the test cases are generated according to the combined decision table, the time for writing the test cases by the testers is saved, meanwhile, the accuracy of the test cases is improved, the testers can test the automobile controller based on the more accurate test cases, and the accuracy and efficiency of the test are improved. In practical application, the VBA code can be used for programming, so that rules in the test decision table are automatically extracted, and the efficiency of generating test cases is further improved.
Preferably, the number threshold includes a first number threshold and a second number threshold, the first number threshold is equal to 1, and the second number threshold is equal to 2; and when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table.
Preferably, when the number is equal to the second number threshold, identifying a condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judging result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judging table; when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table.
Preferably, when the number is greater than the second number threshold, the following steps are performed: step 201: two of the rules are selected; step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table; and when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the corresponding part of the action items in the process judging table.
Preferably, in step 4, the rule can not be merged any more, which means that every two rules have different condition items, or every two rules have the same condition item, and the judging result of the plurality of condition items is different, or only one rule is left.
Specifically, when the number of rules is 1, the extracted rules are filled into the corresponding parts of the action items in the process version judgment table. When the number of the rules is 2, identifying each condition item in the two rules, if the two rules have the same condition item, namely the number of the condition items is the same, and only the judging result of one condition item is different (other conditions are the same), combining the two rules, filling the same condition item into the corresponding part of the action item in the process version judging table, and the combined rule is a new rule; otherwise, the two rules cannot be merged.
When the number of the rules is greater than 2, firstly selecting two rules, identifying each condition item in the two rules, if the two rules have the same condition item, namely the number of the condition items is the same, and when the judging result of only one condition item is different (other conditions are the same), combining the two rules, filling the same condition item into the corresponding part of the action item in the process version judging table, and the combined rule is a new rule; if the two rules can not be combined, continuously selecting the two rules from the rest rules to judge whether the two rules can be combined, and if the two rules can be combined, filling the combined rules into the part corresponding to the action item in the process version judging table; and sequentially selecting two rules until each two rules have different condition items or each two rules have the same condition item, and when the judging results of a plurality of condition items are different or only one rule is left, filling the remaining rules into the part corresponding to the action item in the process version judging table.
Preferably, prior to step 1, condition items, action items and rules in the initial decision table are identified.
A system for converting a test decision table for an automotive controller into test cases according to the present invention includes: a memory storing computer executable instructions; a processor executing computer executable instructions in the memory, performing the steps of: : step 1: extracting a rule with an action item from an initial judging table aiming at the action item in the initial judging table of the automobile controller; step 2: acquiring the number of rules with action items, comparing the number with a number threshold value, and filling the rules into the corresponding parts of the action items in the process judging table or filling the combined rules into the corresponding parts of the action items in the process judging table based on the comparison result; step 3: repeating the step 1-2 for each action item in the initial decision table to obtain a corresponding process decision table; step 4: taking the process judging table as an initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table corresponding to all action items in the initial judging table; step 5: and (3) taking the process judgment table generated in the step (4) as a final judgment table, and generating test cases based on the final judgment table.
Specifically, according to the title in the initial determination table, identifying the condition item, the action item and the rule thereof, reading the initial determination table, extracting the rule with the same action item for one action item in the initial determination table, filling the rule into the action item corresponding part in the process determination table or filling the combined rule into the action item corresponding part in the process determination table according to the number and the rule of the rule with the same action item, extracting the rule with the same action item for the next action item in the initial determination table, filling the rule into the action item corresponding part in the process determination table or filling the combined rule into the action item corresponding part in the process determination table based on the number and the rule of the rule until the process determination table corresponding to all the action items in the initial determination table is generated; because there are many rules that can be combined in the newly generated process determination table, the process determination table needs to be combined, the generated process determination table is used as an initial determination table, the process determination table is emptied, the combined process combination process determination table is repeated until the rules cannot be combined any more, the process determination table of all action items is obtained, the newly generated process determination table is used as a final determination table, and test cases are generated based on the final determination table.
According to the embodiment, the rules in the test decision table can be extracted, the rules with the same action items are combined, the test cases are generated according to the combined decision table, the time for writing the test cases by the testers is saved, meanwhile, the accuracy of the test cases is improved, the testers can test the automobile controller based on the more accurate test cases, and the accuracy and efficiency of the test are improved. In practical application, the VBA code can be used for programming, so that rules in the test decision table are automatically extracted, and the efficiency of generating test cases is further improved.
Preferably, the number threshold includes a first number threshold and a second number threshold, the first number threshold is equal to 1, and the second number threshold is equal to 2; and when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table.
Preferably, when the number is equal to the second number threshold, identifying a condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judging result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judging table; when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table.
Preferably, when the number is greater than the second number threshold, the following steps are performed: step 201: two of the rules are selected; step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table; and when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the corresponding part of the action items in the process judging table.
Preferably, in step 4, the rule can not be merged any more, which means that every two rules have different condition items, or every two rules have the same condition item, and the judging result of the plurality of condition items is different, or only one rule is left.
Specifically, when the number of rules is 1, the extracted rules are filled into the corresponding parts of the action items in the process version judgment table. When the number of the rules is 2, identifying each condition item in the two rules, if the two rules have the same condition item, namely the number of the condition items is the same, and only the judging result of one condition item is different (other conditions are the same), combining the two rules, filling the same condition item into the corresponding part of the action item in the process version judging table, and the combined rule is a new rule; otherwise, the two rules cannot be merged.
When the number of the rules is greater than 2, firstly selecting two rules, identifying each condition item in the two rules, if the two rules have the same condition item, namely the number of the condition items is the same, and when the judging result of only one condition item is different (other conditions are the same), combining the two rules, filling the same condition item into the corresponding part of the action item in the process version judging table, and the combined rule is a new rule; if the two rules can not be combined, continuously selecting the two rules from the rest rules to judge whether the two rules can be combined, and if the two rules can be combined, filling the combined rules into the part corresponding to the action item in the process version judging table; and sequentially selecting two rules until each two rules have different condition items or each two rules have the same condition item, and when the judging results of a plurality of condition items are different or only one rule is left, filling the remaining rules into the part corresponding to the action item in the process version judging table.
Preferably, prior to step 1, condition items, action items and rules in the initial decision table are identified.
Example 1
FIG. 1 illustrates a flow chart of a method of converting a test decision table for an automotive controller into test cases, according to one embodiment of the invention. FIG. 2 illustrates a detailed flow chart of a method of converting a test decision table for an automotive controller into test cases, according to one embodiment of the invention.
Referring to fig. 1 and 2, a method for converting a test decision table for an automobile controller into a test case includes:
step 1: extracting a rule with an action item from an initial judging table aiming at the action item in the initial judging table of the automobile controller;
for example, table 1 is an initial determination table, and for the action item (1), the rules with the same action item, that is, the rules with the action item (1) are extracted, and the rules are the same.
Table 1 initial determination table
Wherein prior to step 1, condition items, action items and rules in the initial decision table are identified.
Step 2: acquiring the number of rules with action items, comparing the number with a number threshold value, and filling the rules into the corresponding parts of the action items in the process judgment table or filling the combined rules into the corresponding parts of the action items in the process judgment table based on the comparison result;
wherein the number threshold comprises a first number threshold equal to 1 and a second number threshold equal to 2; and when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table.
When the number is equal to a second number threshold, identifying the condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judging result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judging table; when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table.
Wherein when the number is greater than the second number threshold, the following steps are performed: step 201: two of the rules are selected; step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table; and when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the corresponding part of the action items in the process judging table.
Specifically, the merging action is performed according to the number of extraction rules:
the number is 1, and the extracted rules are filled into the corresponding parts in the process version judging table;
the number is 2, and each condition item of the two regulations is identified: if the condition items are the same and only one condition item has different judging results, namely the number of the condition items is the same and only one condition item is opposite (other conditions are the same), the two rules can be combined, the same condition is filled into the corresponding part (such as rule 1 and rule II, and only condition (3) is different, the two rules can be combined into the rule) in the process judging table, as shown in the table 2; otherwise, not merging, and filling the two rules into the corresponding parts in the process judging table;
if the number is greater than 2, firstly selecting two rules, if the condition items are the same and the judging result of only one condition item is different, namely the number of the condition items is the same and only one condition item is opposite (other conditions are the same), combining the two rules, filling the same condition into the corresponding part in the process judging table, and continuously selecting the two rules from the rest rules to execute combination; if the two selected rules have different condition items or each two rules have the same condition item, and the judging result of a plurality of condition items is different or only one rule is left, the two rules are continuously selected, the non-merged rule can be repeatedly selected, namely, the selected and non-merged rule and the rest rules are selected to be merged and judged; and so on until all rules are traversed until every two rules have different condition items or every two rules have the same condition item, wherein the judging result of a plurality of condition items is different or only one rule position is left, and the rest rules are filled into the corresponding parts in the process judging table; (e.g. after the regular reverse instruction is extracted, firstly selecting the rule first instruction, conforming to the merging rule, and merging into a rule part; the rules are selected again, the rules for the bathing can not be combined, the steps for the bathing are selected again, the rules for the bathing accord with the combining rules, the rules 10 are combined, only the rules for the bathing remain, and the corresponding parts in the process judging table are directly filled in, as shown in the table 2.
Table 2 procedure decision table
Step 3: repeating the step 1-2 for each action item in the initial decision table to obtain a corresponding process decision table;
specifically, step 1-2 is repeatedly executed until all action items in the initial decision table are traversed.
Step 4: taking the process judging table as an initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table corresponding to all action items in the initial judging table;
in step 4, the rule can not be merged any more means that each two rules have different condition terms, or each two rules have the same condition term, and the judging result of the condition terms is different or only one rule is remained.
Specifically, steps 1-4 of the process version decision table are circularly executed until each rule in the process decision table cannot be merged.
Step 5: and (3) taking the process judgment table generated in the step (4) as a final judgment table, and generating test cases based on the final judgment table.
Specifically, the process determination table generated until the merging is impossible is referred to as the final determination table, as shown in table 3.
TABLE 3 final decision Table
The embodiments of the present invention have been described above, the description is illustrative, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments.

Claims (4)

1. A method of converting a test decision table for an automotive controller into test cases, comprising:
step 1: extracting a rule with an action item in an initial judging table of the automobile controller aiming at the action item in the initial judging table;
step 2: acquiring the number of rules with the action items, comparing the number with a number threshold value, and filling the rules into the corresponding parts of the action items in a process judging table or filling the combined rules into the corresponding parts of the action items in the process judging table based on a comparison result;
wherein the number threshold comprises a first number threshold equal to 1 and a second number threshold equal to 2;
when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table;
when the number is equal to the second number threshold, identifying a condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judging result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judging table;
when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table;
when the number is greater than the second number threshold, performing the steps of:
step 201: two of the rules are selected;
step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table;
when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the part corresponding to the action item in the process judging table;
step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table;
step 4: taking the process judging table as the initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table corresponding to all action items in the initial judging table;
step 5: and (3) taking the process judging table generated in the step (4) as a final judging table, and generating the test case based on the final judging table.
2. The method of converting a test decision table for an automotive controller into a test case according to claim 1, further comprising: prior to said step 1, condition items, action items and rules in said initial decision table are identified.
3. The method according to claim 1, wherein in the step 4, the rule can not be merged any more, which means that each two rules have different condition terms, or each two rules have the same condition term and the judgment result of the condition terms is different.
4. A system for converting a test decision table for an automotive controller into test cases, the system comprising:
a memory storing computer executable instructions;
a processor executing computer executable instructions in the memory, the processor performing the steps of:
step 1: extracting a rule with an action item in an initial judging table of the automobile controller aiming at the action item in the initial judging table;
step 2: acquiring the number of rules with the action items, comparing the number with a number threshold value, and filling the rules into the corresponding parts of the action items in a process judging table or filling the combined rules into the corresponding parts of the action items in the process judging table based on a comparison result;
wherein the number threshold comprises a first number threshold equal to 1 and a second number threshold equal to 2;
when the number is equal to the first number threshold, filling the rule into a part corresponding to the action item in the process judgment table;
when the number is equal to the second number threshold, identifying a condition item of each rule, and when each rule has the same condition item and only one of the condition items is different in judging result, merging each rule based on the same condition item, and filling the merged rule into a part corresponding to the action item in the process judging table;
when each rule has different condition items or each rule has the same condition item and the judging results of a plurality of condition items are different, filling each rule into a part corresponding to the action item in the process judging table;
when the number is greater than the second number threshold, performing the steps of:
step 201: two of the rules are selected;
step 202: identifying condition items of the two rules, merging the two rules based on the same condition item when the two rules have the same condition item and only one condition item is different in judging result, and filling the merged rule into a part corresponding to the action item in the process judging table;
when the two rules have different condition items or the two rules have the same condition item and the judging result of a plurality of condition items is different, reselecting the two rules until each two rules have different condition items in the rest rules or each two rules have the same condition item and the judging result of a plurality of condition items is different or only one rule is left, filling the rest rules into the part corresponding to the action item in the process judging table;
step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table;
step 4: taking the process judging table as the initial judging table, clearing the process judging table, and repeatedly executing the steps 1-3 until the rules can not be combined any more, so as to obtain the process judging table corresponding to all action items in the initial judging table;
step 5: and (3) taking the process judging table generated in the step (4) as a final judging table, and generating the test case based on the final judging table.
CN201911090153.9A 2019-11-08 2019-11-08 Method and system for converting test decision table into test case Active CN110888803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911090153.9A CN110888803B (en) 2019-11-08 2019-11-08 Method and system for converting test decision table into test case

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911090153.9A CN110888803B (en) 2019-11-08 2019-11-08 Method and system for converting test decision table into test case

Publications (2)

Publication Number Publication Date
CN110888803A CN110888803A (en) 2020-03-17
CN110888803B true CN110888803B (en) 2023-08-22

Family

ID=69747244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911090153.9A Active CN110888803B (en) 2019-11-08 2019-11-08 Method and system for converting test decision table into test case

Country Status (1)

Country Link
CN (1) CN110888803B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302407A (en) * 1999-02-19 2001-07-04 株式会社瓦科姆工程 Operation input processing device and method
WO2007014521A1 (en) * 2005-08-01 2007-02-08 Tong Wang A method for designing test case and a system thereof
CN101710305A (en) * 2009-12-14 2010-05-19 中国科学院计算技术研究所 Method and system for realizing white box testing of computer software
CN103605603A (en) * 2013-10-12 2014-02-26 南京大学 Covering table reduction method and system
JP2015176230A (en) * 2014-03-13 2015-10-05 富士通株式会社 Test case generation apparatus, test case generation method, and test case generation program
CN105373476A (en) * 2015-11-17 2016-03-02 北京新能源汽车股份有限公司 Method and system for generating automatic test case in automobile controller
CN105426312A (en) * 2015-12-31 2016-03-23 北京经纬恒润科技有限公司 Test suite generation method and device for smoke tests
EP3109763A1 (en) * 2015-06-24 2016-12-28 Tata Consultancy Services Limited Method and system for generating functional test cases for software systems
CN108549598A (en) * 2018-03-09 2018-09-18 中国科学院空间应用工程与技术中心 A kind of method for testing software and system
CN109062812A (en) * 2018-09-30 2018-12-21 中电科(德阳广汉)特种飞机系统工程有限公司 Test method, equipment and the readable storage medium storing program for executing of software based on many condition operation
CN109883560A (en) * 2018-12-29 2019-06-14 北京新能源汽车技术创新中心有限公司 A kind of temperature detection and control method of battery system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1302407A (en) * 1999-02-19 2001-07-04 株式会社瓦科姆工程 Operation input processing device and method
WO2007014521A1 (en) * 2005-08-01 2007-02-08 Tong Wang A method for designing test case and a system thereof
CN101710305A (en) * 2009-12-14 2010-05-19 中国科学院计算技术研究所 Method and system for realizing white box testing of computer software
CN103605603A (en) * 2013-10-12 2014-02-26 南京大学 Covering table reduction method and system
JP2015176230A (en) * 2014-03-13 2015-10-05 富士通株式会社 Test case generation apparatus, test case generation method, and test case generation program
EP3109763A1 (en) * 2015-06-24 2016-12-28 Tata Consultancy Services Limited Method and system for generating functional test cases for software systems
CN105373476A (en) * 2015-11-17 2016-03-02 北京新能源汽车股份有限公司 Method and system for generating automatic test case in automobile controller
CN105426312A (en) * 2015-12-31 2016-03-23 北京经纬恒润科技有限公司 Test suite generation method and device for smoke tests
CN108549598A (en) * 2018-03-09 2018-09-18 中国科学院空间应用工程与技术中心 A kind of method for testing software and system
CN109062812A (en) * 2018-09-30 2018-12-21 中电科(德阳广汉)特种飞机系统工程有限公司 Test method, equipment and the readable storage medium storing program for executing of software based on many condition operation
CN109883560A (en) * 2018-12-29 2019-06-14 北京新能源汽车技术创新中心有限公司 A kind of temperature detection and control method of battery system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李绘桌主编.软件测试技术.西安电子科技大学出版社,2017,(第2版),第55-56页. *

Also Published As

Publication number Publication date
CN110888803A (en) 2020-03-17

Similar Documents

Publication Publication Date Title
CN103019787B (en) Function calling relationship determines method, hot patch upgrade method and device
US10152406B2 (en) Software program repair
US10268572B2 (en) Interactive software program repair
WO2017128952A1 (en) Stack protection method and device
KR100919222B1 (en) The method and apparatus for evaluating performance of test case
KR101749210B1 (en) Malware family signature generation apparatus and method using multiple sequence alignment technique
CN110888803B (en) Method and system for converting test decision table into test case
CN101017496A (en) Method and apparatus for automatically formatting data based on a best match test result type
US8886999B2 (en) Low cost error-based program testing apparatus and method
CN104536880A (en) GUI program testing case augmentation method based on symbolic execution
US20040093476A1 (en) System for preventing memory usage conflicts when generating and merging computer architecture test cases
US10055341B2 (en) To-be-stubbed target determining apparatus, to-be-stubbed target determining method and non-transitory recording medium storing to-be-stubbed target determining program
CN115576840A (en) Static program pile insertion detection method and device based on machine learning
US20110144958A1 (en) Detection of design redundancy
CN111077878A (en) Method and system for simplifying test judgment table of automobile controller
JP6723483B2 (en) Test case generation device, test case generation method, and test case generation program
CN109472141B (en) Method and system for detecting malicious code based on time-series difference
CN111931161A (en) RISC-V processor based chip verification method, apparatus and storage medium
JP2007257397A (en) Contention state detection process additional program, contention state detection process adding apparatus and contention state detection process adding method
KR20160025881A (en) Apparatus and method for detecting malicious shared library file
CN114675839B (en) Code warehouse Java conflict file sorting and grouping method based on directed graph
JPH06161823A (en) Logic simulation/job scheduling system
CN107301256B (en) Verification method and device of integrated circuit
CN105589904A (en) Bytecode comparison based influence backtracking analysis method and backtracking analysis device
CN106502755B (en) Method and device for checking unknown symbols of Linux kernel module

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
CB02 Change of applicant information

Address after: 100176 floor 10, building 1, zone 2, yard 9, Taihe 3rd Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Beijing National New Energy Vehicle Technology Innovation Center Co.,Ltd.

Address before: 102600 1705, block a, building 1, No. 10, Ronghua Middle Road, economic and Technological Development Zone, Daxing District, Beijing

Applicant before: BEIJING NEW ENERGY VEHICLE TECHNOLOGY INNOVATION CENTER Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant