Cause effect graph: what it is and its creation with practical examples

Cause effect graph: what it is and its creation with practical examples

A?cause-effect graph?is a technique used in black-box testing. The cause-effect graph was created by Kaoru Ishikawa and thus, is known as the Ishikawa diagram. It is also known as the ‘fish-bone’ diagram because of the way it is structured. Now the "fishbone" structure is not the only one that can be used for cause-effect graph creation.

So what is it actually?

?? Cause-Effect Graph is a systematic and structured technique used to design test cases for functional testing. It focuses on identifying and testing the cause-effect relationships between different inputs and outputs of a system. The inputs are represented as causes, and the outputs are represented as effects. By analyzing these relationships, testers can derive a concise and efficient set of test cases to validate the software's behavior.

For example, while using email account, on entering valid email, the system accepts it but, when you enter invalid email, it throws an error message. In this technique, the input conditions are assigned with causes and the result of these input conditions with effects.

The general illustration of a cause-effect graph can be like that:

Альтернативный текст для этого изображения не предоставлен

?? What are the Benefits of Cause-Effect Graph?

1. Comprehensive Test Coverage:

Cause-Effect Graph enables testers to identify all possible combinations of inputs and outputs, ensuring comprehensive test coverage. By considering the cause-effect relationships, testers can determine the minimum number of test cases required to achieve maximum coverage, optimizing the testing process.

2. Efficiency and Time Savings:

By utilizing Cause-Effect Graph, testers can reduce redundancy in test cases. The technique helps in eliminating repetitive test cases by focusing on the unique combinations of causes and effects. This leads to significant time savings during the testing phase.

3. Early Bug Detection:

Cause-Effect Graph allows testers to identify potential defects and bugs early in the development cycle. By analyzing the cause-effect relationships, testers can pinpoint scenarios where specific inputs result in undesired outputs. This enables developers to address the issues promptly, reducing the overall cost of bug fixing.

?? How do testers use Cause-Effect Graph? What should you start with?

1. Identify Inputs and Outputs:

Start by understanding the system under test and identifying its inputs and outputs. Inputs can be user actions, external stimuli, or data values, while outputs represent the system's responses, outcomes, or changes.

2. Construct a Cause-Effect Graph:

Create a cause-effect graph by representing the identified inputs and outputs. Use nodes to represent inputs and outputs, and edges to represent the cause-effect relationships between them. Analyze the system's specifications, requirements, and behavior to determine these relationships accurately.

3. Define Test Cases:

Derive test cases from the cause-effect graph. Each test case should include specific combinations of inputs that trigger corresponding outputs. Aim for maximum coverage with minimal test cases, considering both positive and negative scenarios.

?? Note: Not only test cases, but decision table can be created for testing using your cause-effect graph. So it's up to you to decide actually.

4. Execute Test Cases:

Execute the derived test cases on the software system. Record the actual outputs and compare them with the expected outputs. Any discrepancies indicate potential defects or bugs.


But I suggest you to move to the most important and interesting point - let's create a cause-effect graph as an example.

?? Example

Let's imagine that you have to test a web form for user verification in mobile banking application. A user enters their login and password or bank account number and password to verify their identity. So, to log in to the mobile banking system, a password is required, but either a login or a bank account number should be entered along with it.

Альтернативный текст для этого изображения не предоставлен

How can you create a cause-effect diagram? Just follow these simple steps!

Step 1: Identify all possible causes and effects.

Possible?causes (C)?are:

  • C1: The client's username and password are entered correctly.
  • C2: The client's mobile phone number and password are entered correctly.

Possible?effect (E)?is:

  • E1: A client can pass the verification and log in to the system.

Still do not forget about negative scenarios when causes (C)?are:

  • C3: The client's login is entered incorrectly, the password is correct.
  • C4: The client's bank account number is entered incorrectly, the password is correct.
  • C5: The client's password is entered incorrectly, the login is correct.
  • C6: The client's password is entered incorrectly, the bank account number is correct.
  • C7: Both the client's login and password are inserted incorrectly.
  • C8: Both the client's bank account number and password are inserted incorrectly.

Possible?effect (E)?is:

  • E2: A client cannot pass the verification and log in to the system. Error message appears.

Step 2: Perform the cause-effect analysis and create a cause-effect graph.

Let's start with cause-effect analysis for positive testing. To make the effect true (E1):

  • One of the causes C1 or C2 should be true (OR logic).
  • Both conditions (login AND password or bank account number AND password) should be true.
  • The OR logic, in this case, implies that satisfying either cause C1 or C2 will make E1 true (that is, the user will be able to log in to the user session).

The cause-effect graph?for the positive testing will be the following:

Альтернативный текст для этого изображения не предоставлен
The cause-effect graph for the positive testing

But you can easily understand that this cause-effect graph should be extended with negative scenarios. Let's do cause-effect analysis for negative testing. To make the effect false (E2):

  • One of the causes C3-C8 should be true (OR logic).
  • Both conditions within this causes should be true.
  • The OR logic, in this case, implies that satisfying any cause C3-C8 will make E2 true (that is, the user will not be able to log in to the user session).

Here are I'll show how to continue the creation of the cause-effect graph. Note: it is not fully finished, as the main idea of this exercise to show you the logic of this technique. So feel free to finish it by yourselves!)

Альтернативный текст для этого изображения не предоставлен
The cause-effect graph for the positive + negative testing

Step 3: Create test cases or a checklist based on the cause-effect graph.

Remember that you should select the type of test documentation to be used based on the specific of your project.


? The cause-effect testing is a great choice for:

  • Finding the possible root causes
  • Detecting the reasons for a particular effect, issue, or outcome
  • Investigating the problems identified to correct them as soon as possible


?? While Cause-Effect Graph is a powerful black box testing technique, like any methodology, it also has some limitations or potential drawbacks. Here are a few cons to consider:

1. Complexity in Large Systems:

Cause-Effect Graph can become complex and challenging to implement in large-scale systems with numerous inputs and outputs. As the system's complexity increases, the cause-effect relationships may become more intricate, making it difficult to construct an accurate and manageable graph. This can result in increased effort and time required to derive test cases effectively.

2. Dependency on System Understanding:

The effectiveness of Cause-Effect Graph heavily relies on a thorough understanding of the system being tested. Testers need to have a clear understanding of the system's specifications, requirements, and behavior to accurately identify the cause-effect relationships. Lack of sufficient knowledge about the system can lead to incomplete or incorrect cause-effect graphs and, consequently, inadequate test coverage.

3. Limited Scope:

Cause-Effect Graph primarily focuses on functional testing, emphasizing the cause-effect relationships between inputs and outputs. While this technique is valuable for validating the system's behavior, it may not address other aspects of testing, such as performance, security, or usability. To ensure comprehensive testing, additional techniques or methodologies may need to be employed alongside Cause-Effect Graph.

4. Dependency on Test Data:

The effectiveness of Cause-Effect Graph is influenced by the quality and diversity of the test data used. The derived test cases depend on the identified inputs and their combinations. If the test data is not representative of real-world scenarios or lacks diversity, the test coverage may be limited, leading to potential defects being missed.

5. Maintenance Challenges:

As the system evolves over time, the cause-effect relationships may change, requiring updates to the cause-effect graph and corresponding test cases. Maintaining the graph and test cases can become challenging, especially in dynamic and agile development environments. Failure to keep the cause-effect graph up to date may result in outdated or ineffective test cases.


Despite these potential drawbacks, Cause-Effect Graph remains a valuable black box testing technique. By understanding its limitations and considering the specific context and characteristics of the system being tested, testers can effectively leverage the benefits of Cause-Effect Graph while mitigating its drawbacks.

Justin N.

Analyste de tests logiciels, assurance qualité | Certifié Agile

1 周

Exemple simple et très bien illustré. Merci ??

要查看或添加评论,请登录

Liudmila A.的更多文章

社区洞察

其他会员也浏览了