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:
Possible?effect (E)?is:
领英推荐
Still do not forget about negative scenarios when causes (C)?are:
Possible?effect (E)?is:
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):
The cause-effect graph?for the positive testing will be the following:
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):
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!)
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:
?? 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.
Analyste de tests logiciels, assurance qualité | Certifié Agile
1 周Exemple simple et très bien illustré. Merci ??