CN110888803A - 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
CN110888803A
CN110888803A CN201911090153.9A CN201911090153A CN110888803A CN 110888803 A CN110888803 A CN 110888803A CN 201911090153 A CN201911090153 A CN 201911090153A CN 110888803 A CN110888803 A CN 110888803A
Authority
CN
China
Prior art keywords
rules
judgment table
rule
item
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.)
Granted
Application number
CN201911090153.9A
Other languages
Chinese (zh)
Other versions
CN110888803B (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 New Energy Vehicle Technology Innovation Center Co Ltd
Original Assignee
Beijing 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 New Energy Vehicle Technology Innovation Center Co Ltd filed Critical Beijing 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

Images

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a system for converting a test judgment table into a test case, wherein the method comprises the following steps: step 1: extracting a rule with an action item in an initial judgment table of an automobile controller aiming at the action item in the initial judgment table; step 2: merging rules, filling the merged rules into the process judgment table part corresponding to the action items; and 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; and 4, step 4: merging process judgment table rules until merging can not be carried out; and 5: and generating a test case based on the process judgment table in the step 4. The method can automatically extract the rules in the test judgment table, combine the rules with the same action items, and generate the test case according to the combined judgment table, thereby improving the accuracy of the test case, enabling a tester to test the automobile controller based on the more accurate test case, and improving 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, the functions of automobiles are more and more, various software in the automobiles are more and more complex, in order to ensure the reliability of the automobiles, it is necessary to test a control system in the automobiles, and the test of the control system of the automobiles needs to be carried out based on a test case, which is a technical document describing input, action, or time and an expected result, and the purpose is to determine whether a certain characteristic of an application program works normally, so the compilation of the test case is crucial.
The method comprises the following steps that the common test case compiling is based on a judgment table, and the judgment table is composed of a condition pile, an action pile, condition items, action items and rules; when a test case is designed by using a decision table 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 merge and simplify the test case, and fill the simplified contents into the test case according to the format of the test case. With the increase of the condition piles and the action piles, a tester not only needs to spend more time for combining the simplified judgment table to realize the compiling of the test case, but also has the problem of missing or misjudging by mistake when the condition piles and the action piles are many.
Therefore, a test case compiling method is particularly needed, which can save the time for testing personnel 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 for converting a test decision table for an automobile controller into a test case, comprising: step 1: extracting a rule with an action item in an initial judgment table of the automobile controller aiming at the action item; step 2: acquiring the number of rules with the action items, comparing the number with a number threshold, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment table based on a comparison result; and step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table; and 4, step 4: taking the process judgment table as the initial judgment table, emptying the process judgment table, and repeatedly executing the steps 1-3 until the rules can not be combined again, so as to obtain the process judgment tables corresponding to all action items in the initial judgment table; and 5: and taking the process judgment table generated in the step 4 as a final judgment table, and generating the test case based on the final judgment table.
Preferably, 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.
Preferably, when the number is equal to the second number threshold, identifying a condition item that each rule has, and when each rule has the same condition item and only one of the condition items has different judgment results, merging each rule based on the same condition item, and filling the merged rule into a portion corresponding to the action item in the process decision table; and when each rule has different condition items or each rule has the same condition item and the judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
Preferably, when the number is greater than the second number threshold, the following steps are performed: step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when the two rules have different condition items or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, and filling the rest rules into the part corresponding to the action item in the process judgment table.
Preferably, before the step 1, condition items, action items and rules in the initial decision table are identified.
Preferably, in the step 4, the rule can not be merged again means that each two rules have different condition items, or each two rules have the same condition item, and the judgment results of the condition items are different or only one rule remains.
The invention also provides a system for converting the test decision table for the automobile controller into the test case, which comprises the following steps: a memory storing computer-executable instructions; a processor executing computer executable instructions in the memory to perform the steps of: step 1: extracting a rule with an action item in an initial judgment table of the automobile controller aiming at the action item; step 2: acquiring the number of rules with the action items, comparing the number with a number threshold, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment table based on a comparison result; and step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table; and 4, step 4: taking the process judgment table as the initial judgment table, emptying the process judgment table, repeatedly executing the steps 1-3 until the rules can not be combined, and obtaining the process judgment tables of all action items in the initial judgment table; and 5: and taking the process judgment table generated in the step 4 as a final judgment table, and generating the test case based on the final judgment table.
Preferably, 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.
Preferably, when the number is equal to the second number threshold, identifying a condition item that each rule has, and when each rule has the same condition item and only one of the condition items has different judgment results, merging each rule based on the same condition item, and filling the merged rule into a portion corresponding to the action item in the process decision table; and when each rule has different condition items or each rule has the same condition item and the judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
Preferably, when the number is greater than the second number threshold, the following steps are performed: step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when the two rules have different condition items or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, and filling the rest rules into the part corresponding to the action item in the process judgment table.
Preferably, before the step 1, condition items, action items and rules in the initial decision table are identified.
Preferably, in the step 4, the rule can not be merged again means that each two rules have different condition items, or each two rules have the same condition item, and the judgment results of the condition items are different or only one rule remains.
The invention has the beneficial effects that: the method can automatically extract the rules in the test judgment table, combine the rules with the same action items, and generate the test case according to the combined judgment table, thereby saving the time of compiling the test case for a tester, simultaneously improving the accuracy of the test case, enabling the tester to test the automobile controller based on the more accurate test case, and improving 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 parts throughout the exemplary embodiments of the invention.
FIG. 1 illustrates a flow diagram of a method of converting a test decision list for an automotive controller into test cases, according to one embodiment of the invention.
FIG. 2 illustrates a detailed flow diagram 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 embodiments of the present invention are shown in the drawings, it should be understood that the present 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.
The method for converting the test decision list for the automobile controller into the test case comprises the following steps: step 1: extracting a rule with an action item in an initial judgment table of an automobile controller aiming at the action item in the initial judgment table; step 2: acquiring the number of rules with action items, comparing the number with a number threshold, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment table based on a comparison result; and step 3: repeating the step 1-2 aiming at each action item in the initial judgment table to obtain a corresponding process judgment table; and 4, step 4: taking the process judgment table as an initial judgment table, emptying the process judgment table, and repeatedly executing the steps 1-3 until the rules can not be combined again to obtain the process judgment tables corresponding to all action items in the initial judgment table; and 5: and (4) taking the process judgment table generated in the step (4) as a final judgment table, and generating the test case based on the final judgment table.
Specifically, according to the title in the initial judgment table, identifying condition items, action items and rules thereof, reading the initial judgment table, extracting the rules with the same action items aiming at one action item in the initial judgment table, filling the rules into the action item corresponding part in the process judgment table or filling the merged rules into the action item corresponding part in the process judgment table according to the quantity and the rules of the rules with the same action items, then extracting the rules of the same action items aiming at the next action item in the initial judgment table, filling the rules into the action item corresponding part in the process judgment table or filling the merged rules into the action item corresponding part in the process judgment table based on the quantity and the rules of the rules until generating the process judgment table corresponding to all action items in the initial judgment table; the newly generated process judgment table also has a plurality of rules which can be merged, the process judgment table needs to be merged, the generated process judgment table is used as an initial judgment table, the process judgment table is emptied, the merged process merging process judgment table is repeated until the rules can not be merged any more, the process judgment tables of all action items are obtained, the newly generated process judgment table is used as a final judgment table, and the test case is generated based on the final judgment table.
According to the exemplary embodiment, the rules in the test judgment table can be extracted, the rules with the same action items are combined, and the test case is generated according to the combined judgment table, so that the time of compiling the test case by a tester is saved, the accuracy of the test case is improved, the tester can test the automobile controller based on the more accurate test case, and the accuracy and the efficiency of the test are improved. In actual application, the VBA codes can be used for programming, so that rules in the test judgment table are automatically extracted, and the efficiency of generating the test case is further improved.
Preferably, the number threshold comprises 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 value, 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 the condition items of each rule, and when each rule has the same condition item and only one of the condition items has different judgment results, merging each rule based on the same condition item, and filling the merged rule into the 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 judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
Preferably, when the number is larger than the second number threshold, the following steps are performed: step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when the two rules have different condition items, or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items, or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, filling the rest rules into the corresponding part of the action item in the process judgment table.
Preferably, in step 4, the rule can not be merged again means that each two rules have different condition items, or each two rules have the same condition item, and the judgment results of the condition items are different or only one rule is left.
Specifically, when the number of the rules is 1, the extracted rules are filled into the part corresponding to the action item in the process version determination 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 the judgment result of only one condition item is different (other conditions are the same), merging the two rules, filling the same condition item into the part corresponding to the action item in the process version judgment table, and taking the merged rule as a new rule; otherwise, the two rules cannot be merged.
When the number of the rules is larger than 2, two of the rules are selected first, each condition item in the two rules is identified, if the two rules have the same condition item, namely the number of the condition items is the same, and the judgment result of only one condition item is different (other conditions are the same), the two rules can be merged, the same condition item is filled into the part corresponding to the action item in the process version judgment table, and the merged rule is a new rule; otherwise, the two rules can not be combined, and the two rules are continuously selected from the rest rules to judge whether the two rules can be combined, if so, the combined rules are filled into the part corresponding to the action item in the process version judgment table; and sequentially selecting two rules until every two rules have different condition items, or every two rules have the same condition item, and when the judgment results of the condition items are different or only one rule remains, filling the remaining rule into the part corresponding to the action item in the process version judgment table.
Preferably, prior to step 1, condition items, action items and rules in the initial decision table are identified.
According to the invention, the system for converting the test decision list for the automobile controller into the test case comprises the following steps: a memory storing computer-executable instructions; a processor executing computer executable instructions in the memory to perform the steps of: : step 1: extracting a rule with an action item in an initial judgment table of an automobile controller aiming at the action item in the initial judgment table; step 2: acquiring the number of rules with action items, comparing the number with a number threshold, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment table based on a comparison result; and step 3: repeating the step 1-2 aiming at each action item in the initial judgment table to obtain a corresponding process judgment table; and 4, step 4: taking the process judgment table as an initial judgment table, emptying the process judgment table, and repeatedly executing the steps 1-3 until the rules can not be combined again to obtain the process judgment tables corresponding to all action items in the initial judgment table; and 5: and (4) taking the process judgment table generated in the step (4) as a final judgment table, and generating the test case based on the final judgment table.
Specifically, according to the title in the initial judgment table, identifying condition items, action items and rules thereof, reading the initial judgment table, extracting the rules with the same action items aiming at one action item in the initial judgment table, filling the rules into the action item corresponding part in the process judgment table or filling the merged rules into the action item corresponding part in the process judgment table according to the quantity and the rules of the rules with the same action items, then extracting the rules of the same action items aiming at the next action item in the initial judgment table, filling the rules into the action item corresponding part in the process judgment table or filling the merged rules into the action item corresponding part in the process judgment table based on the quantity and the rules of the rules until generating the process judgment table corresponding to all action items in the initial judgment table; the newly generated process judgment table also has a plurality of rules which can be merged, the process judgment table needs to be merged, the generated process judgment table is used as an initial judgment table, the process judgment table is emptied, the merged process merging process judgment table is repeated until the rules can not be merged any more, the process judgment tables of all action items are obtained, the newly generated process judgment table is used as a final judgment table, and the test case is generated based on the final judgment table.
According to the exemplary embodiment, the rules in the test judgment table can be extracted, the rules with the same action items are combined, and the test case is generated according to the combined judgment table, so that the time of compiling the test case by a tester is saved, the accuracy of the test case is improved, the tester can test the automobile controller based on the more accurate test case, and the accuracy and the efficiency of the test are improved. In actual application, the VBA codes can be used for programming, so that rules in the test judgment table are automatically extracted, and the efficiency of generating the test case is further improved.
Preferably, the number threshold comprises 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 value, 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 the condition items of each rule, and when each rule has the same condition item and only one of the condition items has different judgment results, merging each rule based on the same condition item, and filling the merged rule into the 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 judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
Preferably, when the number is larger than the second number threshold, the following steps are performed: step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when the two rules have different condition items, or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items, or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, filling the rest rules into the corresponding part of the action item in the process judgment table.
Preferably, in step 4, the rule can not be merged again means that each two rules have different condition items, or each two rules have the same condition item, and the judgment results of the condition items are different or only one rule is left.
Specifically, when the number of the rules is 1, the extracted rules are filled into the part corresponding to the action item in the process version determination 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 the judgment result of only one condition item is different (other conditions are the same), merging the two rules, filling the same condition item into the part corresponding to the action item in the process version judgment table, and taking the merged rule as a new rule; otherwise, the two rules cannot be merged.
When the number of the rules is larger than 2, two of the rules are selected first, each condition item in the two rules is identified, if the two rules have the same condition item, namely the number of the condition items is the same, and the judgment result of only one condition item is different (other conditions are the same), the two rules can be merged, the same condition item is filled into the part corresponding to the action item in the process version judgment table, and the merged rule is a new rule; otherwise, the two rules can not be combined, and the two rules are continuously selected from the rest rules to judge whether the two rules can be combined, if so, the combined rules are filled into the part corresponding to the action item in the process version judgment table; and sequentially selecting two rules until every two rules have different condition items, or every two rules have the same condition item, and when the judgment results of the condition items are different or only one rule remains, filling the remaining rule into the part corresponding to the action item in the process version judgment table.
Preferably, prior to step 1, condition items, action items and rules in the initial decision table are identified.
Example one
FIG. 1 illustrates a flow diagram of a method of converting a test decision list for an automotive controller into test cases, according to one embodiment of the invention. FIG. 2 illustrates a detailed flow diagram 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 in an initial judgment table of an automobile controller aiming at the action item in the initial judgment table;
for example, table 1 is an initial decision table, and for the action item ①, rules having the same action item, that is, rules all having an action item ① are extracted as rules ⑴⑵⑶⑸⑺).
TABLE 1 initial determination Table
Figure BDA0002266610560000111
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, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment 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; and when the number is equal to the first number threshold value, 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 the condition items of each rule, merging each rule based on the same condition items when each rule has the same condition item and only one of the condition items has different judgment results, and filling the merged rule into the 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 judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
When the number is larger than a second number threshold, executing the following steps: step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table; and when the two rules have different condition items, or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items, or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, filling the rest rules into the corresponding part of the action item in the process judgment table.
Specifically, the merging action is performed according to the number of extraction rules:
the quantity is 1, and the extracted rule is filled into a corresponding part in the process version judgment table;
if the number of the condition items is 2, identifying the condition items of the two rules, namely if the condition items are the same and the judgment result of only one condition item is different, namely the number of the condition items is the same and only one condition is opposite (other conditions are the same), merging the two rules, and filling the same condition into the corresponding part in the process judgment table (such as a rule ⑴ and a rule ⑵, and if the condition ③ is different, merging the two rules into a rule ⑼), as shown in table 2;
if the number of the rules is larger than 2, two rules are selected, if the conditions are the same and the judgment result of only one condition is different, namely the conditions are the same and only one condition is opposite (other conditions are the same), the two rules can be merged, the corresponding part in the process judgment table is filled with the same condition, the two rules are continuously selected from the rest rules to be merged, if the two selected rules have different conditions or each two rules have the same conditions and the judgment results of a plurality of conditions are different or only one rule remains, the two rules are continuously selected, the rules which are not merged can be repeatedly selected, namely the selected and not merged rules are selected to be merged and judged with the rest rules, the process is repeated until all the rules are traversed until each two rules have different conditions or each two rules have the same conditions and the judgment results of a plurality of conditions are different or only one rule remains, the rest rules are filled into the corresponding part in the process judgment table, (for example, after the rules are extracted ⑴⑵⑶⑸⑺, the rules are selected ⑴⑵, merged into the corresponding rule meeting the merged rule 3982, the corresponding rule is selected, the merged rule meeting the merged rule 3982, the corresponding rule is directly filled into the merged rule meeting the merged rule 3982, the merged rule specification, the merged rule is obtained by the ⑴⑵⑶⑸⑺, the merged rule meeting the corresponding rule meeting the merged rule meeting the rule meeting.
TABLE 2 Process decision Table
Figure BDA0002266610560000131
And step 3: repeating the step 1-2 aiming at each action item in the initial judgment table to obtain a corresponding process judgment table;
specifically, the step 1-2 is repeatedly executed until all action items in the initial judgment table are traversed.
And 4, step 4: taking the process judgment table as an initial judgment table, emptying the process judgment table, and repeatedly executing the steps 1-3 until the rules can not be combined again to obtain the process judgment tables corresponding to all action items in the initial judgment table;
in step 4, the rule can not be merged again means that every two rules have different condition items, or every two rules have the same condition item, and the judgment results of the condition items are different or only one rule remains.
Specifically, steps 1-4 of the process version decision table are executed in a loop until each rule in the process version decision table cannot be merged.
And 5: and (4) taking the process judgment table generated in the step (4) as a final judgment table, and generating the test case based on the final judgment table.
Specifically, the procedure determination table generated until the merging cannot be performed is set as the final determination table, as shown in table 3.
TABLE 3 Final decision Table
Figure BDA0002266610560000141
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, 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 illustrated embodiments.

Claims (10)

1. A method for converting a test decision list for an automotive controller into test cases, comprising:
step 1: extracting a rule with an action item in an initial judgment table of the automobile controller aiming at the action item;
step 2: acquiring the number of rules with the action items, comparing the number with a number threshold, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment table based on a comparison result;
and step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table;
and 4, step 4: taking the process judgment table as the initial judgment table, emptying the process judgment table, and repeatedly executing the steps 1-3 until the rules can not be combined again, so as to obtain the process judgment tables corresponding to all action items in the initial judgment table;
and 5: and taking the process judgment table generated in the step 4 as a final judgment table, and generating the test case based on the final judgment table.
2. The method of converting a test decision table for an automotive controller into test cases of claim 1, wherein the quantity threshold comprises a first quantity threshold equal to 1 and a second quantity 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.
3. The method according to claim 2, wherein 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 has different determination results, 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 decision table;
and when each rule has different condition items or each rule has the same condition item and the judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
4. The method of converting a test decision list for an automotive controller into test cases of claim 3, wherein when the number is greater than the second number threshold, performing the steps of:
step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table;
and when the two rules have different condition items or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, filling the rest rules into the part corresponding to the action item in the process judgment table.
5. The method of converting a test decision list for an automotive controller into test cases of claim 1, further comprising: before the step 1, condition items, action items and rules in the initial decision table are identified.
6. The method according to claim 1, wherein in step 4, the rule can no longer be merged means that each two rules have different condition items, or each two rules have the same condition item, and the determination results of the condition items are different.
7. A system for converting a test decision list 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 to perform the steps of:
step 1: extracting a rule with an action item in an initial judgment table of the automobile controller aiming at the action item;
step 2: acquiring the number of rules with the action items, comparing the number with a number threshold, and filling the rules into a part corresponding to the action items in a process judgment table or filling the combined rules into a part corresponding to the action items in the process judgment table based on a comparison result;
and step 3: repeating the step 1-2 for each action item in the initial judgment table to obtain a corresponding process judgment table;
and 4, step 4: taking the process judgment table as the initial judgment table, emptying the process judgment table, and repeatedly executing the steps 1-3 until the rules can not be combined again, so as to obtain the process judgment tables corresponding to all action items in the initial judgment table;
and 5: and taking the process judgment table generated in the step 4 as a final judgment table, and generating the test case based on the final judgment table.
8. The system for converting a test decision list for an automotive controller into test cases of claim 7, wherein the quantity threshold comprises a first quantity threshold equal to 1 and a second quantity 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.
9. The system according to claim 7, wherein when the number is equal to the second number threshold, the condition item of each rule is identified, and when each rule has the same condition item and only one of the condition items has different determination results, each rule is merged based on the same condition item, and the merged rule is filled into the part corresponding to the action item in the process decision table;
and when each rule has different condition items or each rule has the same condition item and the judgment results of the condition items are different, filling each rule into the part corresponding to the action item in the process judgment table.
10. The system for converting a test decision list for an automotive controller into test cases of claim 7, wherein when the number is greater than the second number threshold, performing the steps of:
step 201: two 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 of the condition items has different judgment results, and filling the merged rule into a part corresponding to the action item in the process judgment table;
and when the two rules have different condition items or the two rules have the same condition item and the judgment results of the condition items are different, reselecting the two rules until each two rules in the rest rules have different condition items or each two rules have the same condition item and the judgment results of the condition items are different or only one rule is left, and filling the rest rules into the part corresponding to the action item in the process judgment 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 true CN110888803A (en) 2020-03-17
CN110888803B 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 (2)

* Cited by examiner, † Cited by third party
Title
快把钟哥带走: "10-用例设计方法", pages 1 - 8 *
毛养红: "测试用例设计中的判定表自动生成研究", vol. 2, no. 16, pages 114 - 120 *

Also Published As

Publication number Publication date
CN110888803B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US8020153B2 (en) Source code checker, source code checking method, program for causing execution of the method, and storage medium for storing the program
CN102636704B (en) Testing method, device and system for electronic product
CN109885499B (en) Robot automatic test system and test method
CN112306855B (en) Interface automation test method, device, terminal and storage medium
CN103019787B (en) Function calling relationship determines method, hot patch upgrade method and device
CN104572999B (en) Heterogeneous data-based error data detection method and device
CN112052169A (en) Test management method, system, device and computer readable storage medium
CN108875375B (en) Dynamic characteristic information extraction method for android system privacy leakage detection
KR100919222B1 (en) The method and apparatus for evaluating performance of test case
CN110347976B (en) Method, system, apparatus and storage medium for fast exporting device data model
CN103019943B (en) Software error positioning method catering to rare case of failed test cases
CN108897678B (en) Static code detection method, static code detection system and storage device
CN110888803A (en) Method and system for converting test decision table into test case
CN106886446A (en) The verification method and device of software source code
CN104536880A (en) GUI program testing case augmentation method based on symbolic execution
CN108828427B (en) Criterion searching method, device, equipment and storage medium for signal integrity test
LU500618B1 (en) Hotfix Synthesis Method for Dynamic Software Updating Based on Recombination of Program Source Code Slices
CN113688403A (en) Intelligent contract vulnerability detection method and device based on symbolic execution verification
CN114138669A (en) Software automatic testing method based on function level selection symbolized mixed execution
CN109002980B (en) Scenarioized knowledge inspection method and device
EP0638862A2 (en) Method and system for processing language
CN111077878A (en) Method and system for simplifying test judgment table of automobile controller
CN111324380A (en) Efficient multi-version cross-project software code clone detection method
CN111858720A (en) Bidirectional data mining method and device based on database
CN109976762B (en) Method and system for improving solid state disk firmware test efficiency

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