The Challenge of Testing A major challenge in testing is to determine a good starting set of test cases that: ·Eliminate redundant testing ·Provide adequate test coverage ·Allow more effective testing ·Make the most of limited testing resources
Graphical based Testing Method Each and every application is build up for some functionalities or requirements. All such functionalities are identified and a graph is prepared. From this control graph each independent path is identified and test cases are written specifically to identify errors.
When to use the technique: This technique is used to generate integration and end to end test cases for integrated modules or components - where there are lots of interdependencies between modules.
McCabe’s Basis Path testing
Is a unique path through the software where no iterations are allowed – all possible paths through the system are linear combinations of them.
Basis path testing is a hybrid between path testing and branch testing. Path Testing: Testing designed to execute all or selected paths through a computer system. Branch Testing: Testing designed to execute each outcome of each decision point in a computer program.
From functionality or requirement understanding, draw a corresponding control flow graph
Calculate Cyclomatic Complexity using methods
Determine a basis set of linearly independent paths.
Prepare or generate test cases that force the execution of each path in basis path. Note: Test cases derived from basis set are guaranteed to execute each path at least once during testing.
Step 1: Draw a Control Flow Graph Any procedural design can be translated into a control flow graph: • Lines (or arrows) called edges represent flow of control • Circles called nodes represent one or more actions • A predicate node is a node containing a condition
Step 2: Calculate Cyclomatic Complexity Formula 1: Basis Path formula V(G) = edges - nodes + 2p where p = number of unconnected parts of the graph Formula 2: Predicate Nodes Formula V(G) = Number of Predicate Nodes + 1 Formula 3:Node to Node Connectivity called Graph Matrix Step 3: Determine a basis set of linearly independent paths
Exercise - 1
Answer to Exercise
Create your own unique website with customizable templates.