Advanced test case design (on)

Judgment table method to design test cases - decision table concepts

Decision table

Expression and analysis tools to perform different operations in multiple logical conditions.
A condition determination table is a pile, the pile motion, Condition table an action item composed of four parts.

Conditions pile (Condition Stub)

It lists all the conditions of the problem. Generally considered the conditions listed in the order does not matter.

Action pile (Action Stub)

List problem provisions may be taken. The order of these operations is not bound.

Condition (Condition Entry)

The value listed for the conditions listed. True and false values ​​in all possible cases.

Action item (Action Entry)

Action listed under various items of value when conditions should be taken.

Determination rule table

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.

Determination of the profile of

The combined determination table in two or more strips having the same operation, and there is very similar to the rules of the relationship between the process condition items.

Test method determination table designed - using decision tables test cases

Decision table usage scenarios

If the program multiple actions in multiple criteria decision, and the value of each condition is only logical relationship between the two, and clear conditions and actions.

Table advantages determination

It can be complex issues in a variety of possible scenarios of all listed, concise and to avoid missing.

Determination step of establishing a table:

1. List all the conditions and actions

2, to determine the number of rules (if there are n number of conditions, each has two values ​​(0,1), can produce n-th power of 2 kinds of rules)

3. Fill decision table

4, simplified determination table

Example 1 issue request: "...... the machine power greater than 50 horsepower, maintenance records were incomplete or has been in operation for more than 10 years of machine, we should give priority to maintenance treatment ......." It is assumed here, "incomplete maintenance records" and "priority repair process" has been more rigorous definition elsewhere.
1) List all the conditions and actions

Conditions: power greater than 50 hp / maintenance records were incomplete / has been in operation for more than 10 years???

Action: Priority Maintenance treatment / other treatments

Number 2) determines rule

There are three conditions, each have two values, it should be eight kinds of rules.

3) Fill decision table

4) Simplification of decision table
first of all, to find a similar determination rule table.

5) combining the similar rule, the determination table is obtained after simplification.

Cause and effect diagram method to design test cases - cause and effect diagram related concepts

Cause and effect diagram

The method of analysis of the relationship between the link between the combination of input conditions and mutual input and output of the analysis. Here's why the input, the output is the result, so this method of analysis is called causal FIG.

The relationship between cause and effect diagram

Identity: Ci = 1, Ei = 1; Ci = 0, Ei = 0.

非: C = 1, No = 0, C = 0, No = 1.

Or: C1, C2, C3 there is a 1, Ei is 1; C1, C2, C3 are all 0, Ei is zero.

And: C1, C2, C3 there is a 0, Ei is 0; C1, C2, C3 are all 1, Ei 1.

constraint

There may also be some dependencies between each input or output state, called constraints.

Constraints of cause and effect diagram

Large column  test advanced design (upper) class: "class =" headerlink "title =" constraint A, the input conditions are the following four categories: "> A, the input constraint conditions are the following four categories:

E constraint (iso): a and b may be at most a 1, i.e., a and b are not simultaneously 1.

I constraint (or): a, b and c must be at least one of 1, i.e. a, b and c are not simultaneously 0.

O constraints (unique): a and b must have one, and only one is 1.

R constraint (required): a is 1, b must be 1, that it is impossible a is 1 and b is 0.

B, the output conditions of constraint: M constraints (mandatory): If the result is a 1, b the result is forced to zero.

Cause and effect diagram method to design test cases - test cases using causal map

Cause and effect diagram usage scenarios

For various combinations of input conditions where the inspection procedure, to analyze the relationship between input and output.

Advantage causality diagram

A graphical manner the relationship between the mutual constraint between the input and output, the input conditions, the output condition marked, easy determination table generation, and to avoid missing.

FIG cause the test method design steps:

1, software specification description, identify the cause (i.e., the input conditions or equivalence class of input conditions) and the results (i.e., output conditions), and the result is assigned to each cause and an identifier.

2, software specification semantic description, find the corresponding relationship between cause and effect, between the same reasons, these relationships, causal shown in FIG.

3, because the syntax or environmental constraints, some between cause and reason, combinations between cause and effect can not be

Appears to indicate that these special cases, in view of the few symbols indicates that the causal constraints or limitations.

4, FIG convert causal determination table, and determination of the profile table.

5, the final determination of each table as a basis for design of test cases.

Example 2 required when a user login user name, user password, authentication code, and authentication code is valid within 1 minute. If the user name entered by the user, and the user password are correct codes can be logged into the system; If the user name, user password and a code has not input a corresponding message is given, if the input is not more than one, then prompted preceding entry sequence; if the user name or user password is incorrect, the prompt "the user password is incorrect or does not exist"; if the codes fail failure message is given.

Entry is empty logic not taken into account when drawing cause and effect diagram, we analyze the case of input errors and correct.

1) identify the causes and results

Reason: a, username, b, user password, c, codes

Results: ab, the user password is incorrect or does not exist, c1, verification code is not correct, c2, failure codes, d, logged

2, 3) analysis of causality, draw cause and effect diagram, and add the relevant constraints on the cause and effect diagram

4) into causal FIG determination table, and simplification

5) In each final determination table according to the design of test cases as

Guess you like

Origin www.cnblogs.com/dajunjun/p/11711236.html