1. IMPLEMENTATION OF McCABEâS METRICS
AIM:
.
To measure the given software implementation using McCabeâs metrics and test it by
path testing method.
TEST PLANNING:
1. Test strategy
ï Scope of testing
To test the path of implementation using McCabeâs metrics.
ï Test deliverables
To test the measurements of the given program using C language.
âą the cyclomatic complexity using the formula
V(G)=e-n+2
ï Tools used win runner & C programming.
2. Test plan
It is a document to say what to test, when to test, how to test, who to test.
âą What to test- cyclomatic complexity using
McCabeâs metrics.
âą How to test-by using Win Runner.
âą who to test- Developer.
3. Test bed- Win Runner and C programming language.
TEST DEVELOPMENT:
Test cases
i. Edges
ii. Nodes
iii. Regions
2. TEST EXECUTION:
Step1: Draw a flow chart for given software implementation (to find greatest of 3
numbers).
Step2: Draw a flow graph for the program from the flow chart.
Step3: Count the no of edges (e) and no of nodes (n) and regions(r).
Step4: Find the cyclomatic complexity using the formula
V(G)=e-n+2
MCCABEâS METRICS FLOWCHART:
START
INPUT a,b,c
If a >b If b>a
&b>c &b>c
b is grater c is grater
a is grater
STOP
4. TEST RESULT ANALYSIS:
Step1: Initialize the win runner
Start programs win runner win runner
Step2: Create a new html document to be tested and save it on the desktop
Step3: In win runner create a new task
Step4: Click on record button and open the saved html file
Step5: Then click on stop button the file will be recorded automatically
Step6: Then click on the button Run from top,
This will automatically give the test result as
Pass: If executed with out errors
Fail: If executed with some errors
And the execution time will also be displayed
Step7: Then go to Tools GUI Map Editor
And save the file at some location say for example âdesktopâ.
5. RESULT:
Once the test meets the exit criteria the activities such as capturing the key output
lessons learned result,logs,documents related to the project are achieved and used as
reference for next project .