# Detailed explanation of causality diagram in black box test case design

Time：2020-10-4

The partition equivalence method in black box testing was introduced before. Today, let’s talk about the causality diagram method.

The equivalence class partition method and boundary value analysis method introduced above all focus on the input conditions, but do not consider the relationship between the input conditions and their combination. Considering the combination of input conditions, some new situations may arise. But it is not easy to check the combination of input conditions. Even if all input conditions are divided into equivalent classes, there are quite a lot of combinations between them. Therefore, we must consider using a form suitable for describing the combination of multiple conditions and generating multiple actions to consider the design of test cases.

The final result of causality diagram method is decision table. It is suitable for checking various combinations of program input conditions

The basic steps of generating test cases with cause and effect diagram are as follows

1. Analyze those are causes and those are results, and assign an identifier to each cause and result.
2. Analyze the semantics of software specification description, find out the corresponding relationship between cause and result, cause and reason.
3. Due to grammatical or environmental constraints, it is impossible for some combinations of causes to causes or causes to result. In order to show these special cases, some symbols are used to indicate constraints or constraints on the cause and effect diagram.
4. The causality diagram is transformed into a decision table.
5. Each column of the decision table is taken out as a basis to design test cases.

The test cases generated from causality diagram include all the cases of true and false input data, and the number of test cases is the least, and the number of test cases increases linearly with the increase of input data.

It’s about decision tables. To be specific, it is a tool for analyzing and expressing different operations under multiple logic conditions. In the early stage of programming development, decision table has been used as an auxiliary tool for programming. Because it can express the complex logical relations and the situation of the combination of various conditions, it is concrete and clear. The judgment table is usually composed of four parts: condition pile, action pile, condition item and action item.

The specific value of any combination of conditions and the corresponding operation to be performed. In the decision table, the column running through the condition item and action item is a rule. Obviously, as many sets of condition values are listed in the judgment table, there are as many rules as there are condition items and action items.

Although it’s just some theoretical methods and principles, the actual testing is based on this theory. Whether it’s app testing or software testing, it’s almost the same, as long as you understand it.

Test platform and testapp

## Mysql database, how to deal with duplicate data?

preface In fact, there are two ways to solve the problem of whether duplicate data can be inserted, just like water control, the first is from the source, and the second is on the way of water flow. We continue to look down with these two ideas: problem In our MySQL database, there are often […]