Cyclomatic Complexity:
The Cyclomatic complexity gives a quantitative measure of the logical complexity.
This value gives the number of independent paths in the Basis set, and an upper bound for the number of tests to ensure that each statement is executed at least once. An independent path is any path through a program that introduces at least one new set of processing statements or a new condition (i.e., a new edge).
Cyclomatic complexity (CC) = E - N + p
Where
E = the number of edges of the graph
N = the number of nodes of the graph
p = the number of connected components
Example has:
Cyclomatic complexity of 4.
Independent paths:
1. 1, 8
2. 1, 2, 3, 7b, 1, 8
3. 1, 2, 4, 5, 7a, 7b, 1, 8
4. 1, 2, 4, 6, 7a, 7b, 1, 8
Cyclomatic complexity provides upper bound for number of tests required to guarantee overage
of all program statements. As one of the more widely-accepted software metrics, it is intended to
be independent of language and language format.
Deriving Test Cases
1. Using the design or code, draw the corresponding flow graph.
2. Determine the Cyclomatic complexity of the flow graph.
3. Determine a basis set of independent paths.
4. Prepare test cases that will force execution of each path in the basis set.
TESTING PROCESS PART THREE
WHAT TEST PLAN SHALL HAVE ?
SOFTWARE RELIABILITY
TEST DESIGN
DEFECT CLASSIFICATION
DEFECT TRACKING
TEST METRICS
TEST REPORTS
CHANGE REQUEST MANAGEMENT
UNIT TEST SPECIFICATIONS
UNIT TEST SPECIFICATIONS PART TWO
FUNCTIONAL FLOW MATRIX PART ONE
FUNCTIONAL FLOW MATRIX PART TWO
PROGRAM INSPECTION AND REVIEWS
CODE INSPECTION IN SOFTWARE TESTING
The Cyclomatic complexity gives a quantitative measure of the logical complexity.
This value gives the number of independent paths in the Basis set, and an upper bound for the number of tests to ensure that each statement is executed at least once. An independent path is any path through a program that introduces at least one new set of processing statements or a new condition (i.e., a new edge).
Cyclomatic complexity (CC) = E - N + p
Where
E = the number of edges of the graph
N = the number of nodes of the graph
p = the number of connected components
Example has:
Cyclomatic complexity of 4.
Independent paths:
1. 1, 8
2. 1, 2, 3, 7b, 1, 8
3. 1, 2, 4, 5, 7a, 7b, 1, 8
4. 1, 2, 4, 6, 7a, 7b, 1, 8
Cyclomatic complexity provides upper bound for number of tests required to guarantee overage
of all program statements. As one of the more widely-accepted software metrics, it is intended to
be independent of language and language format.
Deriving Test Cases
1. Using the design or code, draw the corresponding flow graph.
2. Determine the Cyclomatic complexity of the flow graph.
3. Determine a basis set of independent paths.
4. Prepare test cases that will force execution of each path in the basis set.
TESTING PROCESS PART THREE
WHAT TEST PLAN SHALL HAVE ?
SOFTWARE RELIABILITY
TEST DESIGN
DEFECT CLASSIFICATION
DEFECT TRACKING
TEST METRICS
TEST REPORTS
CHANGE REQUEST MANAGEMENT
UNIT TEST SPECIFICATIONS
UNIT TEST SPECIFICATIONS PART TWO
FUNCTIONAL FLOW MATRIX PART ONE
FUNCTIONAL FLOW MATRIX PART TWO
PROGRAM INSPECTION AND REVIEWS
CODE INSPECTION IN SOFTWARE TESTING
No comments:
Post a Comment