Method determination table

Method determination table

1. Scene

And is adapted to have, in combination with a mutual relationship between the input and output of a plurality of input to output, constraints have mutual dependencies between the input and the output

2. Definitions

Decision table, also known as decision tables, analysis and presentation tools that perform different operations under multiple logical conditions.

It can be in a variety of complex issues enumerated all the possible scenarios, concise and to avoid missing. Thus, the table can be determined using a complete set of test design. Among some data processing problems, the operation depends on the implementation of certain logical combination of a plurality of conditions, namely: for a combined value of different logical conditions, different operations are performed. Decision table suited to handle such problems.

3. Composition

A condition determination table is a pile, the pile operation condition items, the action item composed of four parts, as shown below.

Conditions pile Conditions for entry
Action pile Action Item

1) Conditions pile (Condition Stub): lists problems have all conditions. Generally considered the order of the conditions listed does not matter.

2) Action pile (Action Stub): list problem provisions may be taken. The order of these operations is not bound.

3) Condition (Condition Entry): The left column lists the values ​​for which conditions. True and false values ​​in all possible cases.

4) action item (Action Entry): action listed under various items of value when conditions should be taken.

4. Rules of merger

Rule 4.1

Any particular combination of conditions and a value corresponding to the operation to be performed is referred to as rules.

Condition and operation through items in a list is determined rule. How many sets of conditions listed in the table values ​​is clear determination, also has how many rules, terms and conditions of both the number of action items listed.

4.2 Simplification

Rules associated with two or more rules that have the same operation, and there is very similar to the relationship between the condition items.

5. Test Case Design

step:

  1. The number of clear rules
  2. List all conditions of piles and piles action
  3. Fill in Condition
  4. Action item is filled until the initial determination table
  5. Simplify, merge similar rules

6. Case

1. Case 1

Problems require: for machine power greater than 50 horsepower, maintenance records were incomplete or run the machine for more than 10 years, should be given priority maintenance.

Test case design

1.1. The number of clear rules

There are three conditions: more than 50 horsepower, maintenance records were incomplete, running for more than 10 years, there are two kinds of values ​​each condition, so there are eight rules.

1.2. Lists the conditions and operation of the pile the pile

Conditions pile Power greater than 50 horsepower?
  Maintenance records were incomplete?
  Running for more than 10 years?
Action pile Priority

1.3. Fill in Condition

1.4 Fill action items until the initial determination table

Conditions pile Conditions for entry 1 2 3 4 5 6 7 8
  Power greater than 50 horsepower? Y Y Y Y N N N N
  Maintenance records were incomplete? Y Y N N Y Y N N
  Run more than 10 years? Y N Y N Y N Y N
Action pile Priority? X X X   X   X  
  Other treatment       X   X   X

1.5. Simplified determination table

The initial determination table we find:

  1. When two of the three conditions is not satisfied, the remaining one is no reference value, can be simplified.

    Only power greater than 50 horsepower, complete maintenance records, operating more than a decade before the priority;

    The other processes are: to meet power greater than 50 horsepower, maintenance, fully functional, no run more than 10 years as long as two

  2. Later shortened

Conditions pile Conditions for entry 1 2 3 4 5
  Power greater than 50 horsepower? Y Y N N Y
  Maintenance records were incomplete? Y N - - N
  Run more than 10 years? - Y Y N N
Action pile Priority? X X X    
  Other treatment       X X

Note:. "-" indicates that the value does not affect the operation of the trigger or not, that does not affect rules

2. Case 2.

Bus Card automatically recharge system requirements:

  • The system receives only the 100-yuan banknotes or 50, can only use a bill, the amount of recharge time of only 50 or $ 100.
  • If the input 50 yuan bill, and select the top-50, to complete the recharge card back, suggesting successful recharge;
  • If the input 50 yuan bill, and select the top-100, an error and return 50;
  • If the input 100-yuan banknotes, and select the top-50, to complete the recharge card back, suggesting successful recharge, the change 50;
  • If the input 100-yuan banknotes, and select the top-100, reload the card back, suggesting successful recharge;
  • If the input is not selected after the bill credit button within a predetermined time, the change, with an error;
  • Do not enter the currency, an error If you select a credit button
Test cases to achieve the following

2.1 The number of clear rules

Number (Condition pile) RULES Enter the 50 yuan
  Enter 100 yuan
  Top-50
  Top-100

2.2 List the conditions and actions pile pile

Action pile Tips successful recharge
  Successful recharge and back of the card
  check out
  Keep the change

2.3. Conditions included items

2.4 Fill action items, waits for an initial determination table

Input conditions   1 2 3 4 5 6 7 8
  Enter the 50 yuan Y Y     X      
  Enter 100 yuan     Y Y   X    
  Top-50 Y   Y       X  
  Top-100   Y   Y       X
                   
Action pile Successful recharge and back of the card X   X X        
  Tips successful recharge X   X X        
  Keep the change   X X   X X    
  An error   X     X X X X

2.5 simplified

This case is independent of each condition, no simplified

2.6. Test Case Design

Each table above is a test case.

 

 

 

7. Summary

Advantages and disadvantages

advantage

  • Can complex problems in a variety of possibilities - include two, concise and easy to understand, to avoid missing

Shortcoming

  • Expression of action can not be performed repeatedly, e.g. cyclic structure

Guess you like

Origin www.cnblogs.com/zhanghan123/p/11671781.html