0% found this document useful (0 votes)
15 views5 pages

Transaction Dataflow Testing

The document provides detailed notes on Transaction Flow Testing and Dataflow Testing, two white-box testing methodologies. Transaction Flow Testing focuses on the logical control flows of user-initiated transactions, while Dataflow Testing analyzes the lifecycle of variables in a program. Both methodologies aim to enhance software quality by detecting logical and data-related defects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views5 pages

Transaction Dataflow Testing

The document provides detailed notes on Transaction Flow Testing and Dataflow Testing, two white-box testing methodologies. Transaction Flow Testing focuses on the logical control flows of user-initiated transactions, while Dataflow Testing analyzes the lifecycle of variables in a program. Both methodologies aim to enhance software quality by detecting logical and data-related defects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

**Software Testing Methodologies - Detailed Notes (10 Marks | 20 Pages)

Topic: Transaction Flow Testing & Dataflow Testing**

Unit: Transaction Flow Testing

1. Introduction to Transaction Flow Testing

Transaction flow testing is a white-box testing technique used to test logical control flows in software
through user-initiated transactions. It is particularly useful in business applications where multiple
transaction paths exist. It ensures the correctness of software logic for each transaction.

2. What is a Transaction?

• A transaction is a user-initiated operation that performs a meaningful task in a system.


• Examples: Login, Booking a Ticket, Processing a Payment.

3. Transaction Flow Graph (TFG)

• A directed graph representing the logical flow of a transaction.


• Nodes: processing steps or decisions
• Edges: control flow between nodes
• Used to visualize all possible paths of a transaction.

4. Steps to Perform Transaction Flow Testing

1. Identify all possible user transactions.


2. Construct Transaction Flow Graphs.
3. Select test paths from TFG.
4. Sensitize paths using test inputs.
5. Instrument the code for monitoring.
6. Design supporting test database.
7. Execute tests and analyze results.

5. Transaction Flow Testing Techniques

5.1. Get to the Transaction Flow

• Understand the application’s functionality.


• Identify all key transaction points.

5.2. Inspection, Reviews, and Walkthroughs

• Peer reviews and walkthroughs to detect logical and control flow issues.
• Helps refine TFG.

1
5.3. Path Selection

• Select important paths that need to be tested.


• Use basis path testing and cyclomatic complexity.

5.4. Path Sensitization

• Provide inputs that force the execution of a specific path.


• Ensures that selected paths are reachable.

5.5. Path Instrumentation

• Insert monitoring statements into the code to trace path execution.


• Helps verify test coverage.

5.6. Design and Maintain Test Database

• Prepare input data sets that reflect real-world scenarios.


• Include both valid and invalid test data.

5.7. Test Execution

• Run the selected test paths.


• Monitor which path was executed.
• Compare actual and expected outputs.

6. Example: Login Transaction

Start -> Enter Username -> Enter Password -> Validate


-> [Valid -> Dashboard]
-> [Invalid -> Error Message -> Retry]

• Paths:
• Valid login
• Invalid login
• Retry scenario

7. Benefits of Transaction Flow Testing

• Detects control flow defects


• Improves logic coverage
• Useful for high-risk transaction paths

8. Summary Table

Technique Purpose

TFG Visualize flow

2
Technique Purpose

Reviews & Walkthroughs Detect logical flaws

Path Selection Choose effective test paths

Path Sensitization Provide inputs to activate path

Instrumentation Monitor path execution

Test DB Provide required inputs

Test Execution Run and validate selected paths

Unit: Dataflow Testing

1. Introduction to Dataflow Testing

Dataflow Testing is a white-box testing technique focused on the lifecycle of variables in the program. It
targets definition, usage, and killing (deactivation) of variables.

2. Basics of Dataflow Testing

• Analyzes the flow of data between variables and operations.


• Checks if variables are properly defined, used, and killed.
• Prevents issues like:
• Use of undefined variables
• Redefinition without use
• Defined but unused variables

3. Key Terms in Dataflow Testing

Term Meaning

Definition Variable assigned a value

Usage Variable used in a computation or condition

Kill Variable goes out of scope or redefined

DU Pair Definition-Use pair

4. Dataflow Testing Criteria

4.1. All-Defs Criterion

• Every variable definition must be used at least once.

3
4.2. All-Uses Criterion

• For each definition, all uses must be tested.

4.3. All DU-Paths Criterion

• All possible definition-use paths must be tested.

4.4. All P-Uses and C-Uses

• P-Use: Predicate Use (in conditions)


• C-Use: Computation Use (in expressions)

5. Strategies in Dataflow Testing

5.1. Identify Variables

• List all variables used in the code.

5.2. Create Control Flow Graph (CFG)

• CFG represents the execution flow with nodes and edges.

5.3. Determine DU Pairs

• Mark where each variable is defined and used.

5.4. Select DU Paths

• Create test cases that cover each DU pair.

5.5. Sensitize Paths

• Choose inputs to activate these paths.

5.6. Execute and Analyze

• Run tests, verify outputs, and check coverage.

6. Example of DU Pair

int x = 5; // Definition (d)


if (x > 0) // Predicate Use (p-use)
y = x + 1; // Computation Use (c-use)

• DU Pairs: (d, p-use), (d, c-use)

4
7. Application of Dataflow Testing

• Critical in safety-sensitive systems (e.g., medical, automotive).


• Ensures no unintended side effects or data leaks.
• Helps in static analysis tools.

8. Comparison: Transaction Flow vs Dataflow Testing

Feature Transaction Flow Testing Dataflow Testing

Focus Control flow of transactions Variable usage and behavior

Tools Used Flow graphs, instrumentation DU pair analysis, CFG

Best For Business systems Logic-heavy or secure systems

Detects Logical path errors Data-related bugs

9. Advantages of Dataflow Testing

• Finds deep data-related defects


• Improves code optimization
• Ensures correctness of variable usage

10. Limitations

• Requires full access to source code


• Complex for large systems
• Needs automated tools for better management

11. Tools for Dataflow Testing

• CodeSonar
• KLEE
• GCC Dataflow Plugin

12. Conclusion

Dataflow and Transaction Flow Testing are powerful white-box testing methods. While transaction flow
focuses on the logical flow of user operations, dataflow testing emphasizes the correct handling of data
inside the code. Both help in building robust and error-free systems.

End of Notes.

You might also like