You are on page 1of 10

UnderstandingTESTINGESTIMATIONusingUseCaseMetrics

AloomfortestingEstimation

Prepared By Sanjeev Kumar Sanjeevchauhan@qainfotech.net Date:-08Sept, 2009


Table of Content:1. PURPOSE 2. PREAMBLE 3. Testing Size and Effort Estimation using UCP

3.1 Size Estimation 3.1.1 Actor Weight [AW] 3.1.2 Use Case Weight [UCW] 3.1.3 Unadjusted Use Case Points [UUCP] 3.1.4 Technical Complexity Factor [TCF] 3.1.5 Environmental Complexity Factor [ECF] 3.1.6 Calculate Final Use Case Points [UCP] 3.2 Effort Estimation 3.2.1 Conversion Factor 3.2.2 Calculating Final Effort 4. BENEFITS 5. CASE STUDY 6. REFERENCES

UnderstandingTESTINGESTIMATIONusingUseCaseMetrics

Page1

1.Purpose:Thepurposeofthispaperistoexplainanewapproachtotheestimationofsoftware testingeffortsbasedonUseCasePoints[UCP]asafundamentalprojectestimationmeasure.Object orientedapplicationsfrequentlyrelyonUseCasestodescribethebusinessprocessesofasoftware application. Thismethodologyforestimationisinfactmorereliablethanfunctionalpoint[FP].Itworksonthebasic principlethatmorethecomplexityoftheusecasemoreisthetimetakentodesign,develop,testand implement.ThecaveathereisthattheVmodelmustbeinuseandusecasegenerationmuststart becomingavailablerightattherequirementsgatheringphase.Thispaperprovidesthestepswisetesting estimationprocessusingtheUseCasePoint[UCP]. 2.Preamble:EstimationeffortforSoftwaretestingisoneofthemostimportantfacetsofthe
entiretestinglifecycleasitisdirectlyproportionaltothecostoftheproject.Estimationhasgreat impactonallthemostimportantaspectsofacustomerexpectationTime,CostandQuality.Acorrect estimationhelpsindeliveringtheproductsatrighttime.Ifestimationiswrongitmightleadto unwanteddelayindeliverables,increasedcostandinappropriateresults. ThereareseveralmethodsavailablefortestingestimationlikeTestCasePoints,FunctionPointetc.Use Casemethodologyisgainingfarabovethegroundpopularityforestimatingsoftwareeffort.Itcouldbe veryusefulincaseofbiddingprojectsastheusecasesareoneofthefirstorsometimestheonly informationavailableinthebeginningofasoftwareproject.

Whyestimate?
Youcannotplanifyoucannotmeasure,andifyoufailtoplan,youhaveplannedtofail.

Anomelet,promisedintwominutes,mayappeartobeprogressingnicely.Butwhenithasnotsetin twominutes,thecustomerhastwochoices

Eitherwait&eat(or)eatitraw!
Ifthecustomerdoesnotwanttoeatitrawaswellashedoesnotwanttowait,thenthecookhastoo hasachoicehecanturntheheatonand

Gettheomeletburntinonepartandrawinanother!
Insoftwareindustrycustomers&vendorshavealsothesamechoices.Onemostimportantfactor thatrequiresconsiderationissettingtheexpectationsrightupfront.Thiscanbedonefirstby gettingtheestimationright.

3.EffortEstimationusingUCP:
3.1 Size Estimation:TheFirststepforeverytypeofestimationistocalculatethesizeofactivitytobeperformed.InUsecase methodology,thereare4majorcomponentswhichareimportantfordeterminingthesizeofaproject UnderstandingTESTINGESTIMATIONusingUseCaseMetrics Page2

1.ActorWeight[AW] 2.UseCaseWeight[UCW] 3.TechnicalcomplexityFactors[TCF] 4.EnvironmentalcomplexityFactors[ECF]

3.1.1 Actor Weight [AW]:TheActorWeight[AW]isclassifiedinto3differenttypesSimple,MediumandComplex.FigureA describesthecriteriaforeachtypeandalsothefactor(weightage)ornumericvalues. ThetotalActorweightcanbecalculatedbycategorizingalltheactorsassimple,mediumandcomplex andthenaddingupallthefactors(weightage). FigureA

ActorWeight
WeightageType
Simple

Factor(Weightage)
1

Criteria/Description
Representsanothersystemwith definedapplicationprogramming interface(API) TheActorrepresentsanother systeminteractingthrougha protocol,likeTCP/IP.Oraperson interactingthroughatextbased interface. Canbeapersoninteractingviaan interface(GUI)

Medium

Complex

3.1.2 Use Case Weight [UCW]:


UsagecaseweightcanbecalculatedinthesamewayasActorweightiscalculated.Alltheusecases needtobecategorizedassimple,mediumandcomplex.Thefinalweightisthesumofthefactorsforall thecategorizedusecases(SeeFigureB). Keepinmindthenumberofstepsinascenarioaffectstheestimate.Alargenumberofstepsinause casescenariowillbiastheUCWtowardcomplexityandincreasetheUCPs. UnderstandingTESTINGESTIMATIONusingUseCaseMetrics Page3

FigureB

UseCaseWeight
WeightageType
Simple

Factor(Weightage)
5

Criteria/Description
Verysimpleinterface,which touchesasingledatabaseentity, having3orlessertransitions/steps. Moreinterface,whichtouchestwo ormoredatabaseentities,having 47transitions/steps Verycomplexinterface,which touchesthreeormoredatabase entities,havingmorethan7 transactions/steps

Medium

10

Complex

15

3.1.3 Unadjusted Use Case Points (UUCP): UUCP = Actor Weight [AW] + Use Case Weight [UCW]

3.1.4 Technical Complexity Factor [TCF]:


Therearemainly7standardswhichimpactstheoverallestimationforaproject.TheFigureCshowsthe listofallthefactorsfromtestingperspectivewiththeirWeightage.Theweightofatechnicalfactor indicatesitsimpactontheoverallestimation.Technicalfactorsareevaluatedbythedevelopmentteam andassignedavaluebetweenzeroandfive.Aweightof0indicatesthefactorisirrelevantandthe value5meansthatthefactorhasthemostimpact. Technicalcomplexityfactoriscalculatedasbelow TCF = C1 + C2*(Total TF) AspertheUseCasePointmethod,theimpactofTCFonusecasepointsshouldvaryfromrangeof0.6 (40%reduction)to1.3(30%increase).InordertoachievethisrangethecoefficientC2needstobe modifiedfortheTestingEffort. C2fortesting=(1.30.6)/50=0.014 Where50isthemaxvalueofTCFfortesting. Where, C1=Constantwithvalue0.6 C2=Constantwithvalue0.014 TotalEF=TotalTechnicalFactor UnderstandingTESTINGESTIMATIONusingUseCaseMetrics Page4

FigureC

TechnicalFactors
S.No
1 2 3 4 5 6 7

Value(Weightage)
2 2 1 2 1 1 1

Criteria/Description
TestTools. DocumentInputs TestwareReuse DistributedSystem PerformanceObjectives SecurityFeatures ComplexInterfacing

3.1.5 Environmental Complexity Factor [ECF]:


Thereare7environmentalfactorswhichimpactstheoverallestimationforaproject.The FigureDshowsthelistofallthefactorsfromtestingperspectivewiththeirWeight.Aratingof0means theenvironmentalfactorisirrelevantforthisproject;3isaverage;5meanithasstronginfluence.The weightofatechnicalfactorindicatesitsimpactontheoverallestimation. Environmentalcomplexityfactoriscalculatedasbelow

ECF = C1 + C2*(Total EF)

AspertheUseCasePointmethod,theimpactofECFonusecasepointsismorethanTCFanditshould varyfromrangeof0.0425(57.5%reduction)to1.4(40%increase).Inordertoachievethisrangethe coefficientC2needstobemodifiedfortheTestingEffort. C2fortesting=(1.40.0425)/37.5=0.0362 Where37.5isthemaxvalueofECFfortesting Where, C1=Constantwithvalue1.4 C2=Constantwithvalue(0.0362) TotalEF=TotalEnvironmentalFactor UnderstandingTESTINGESTIMATIONusingUseCaseMetrics Page5

FigureD

EnvironmentalComplexity Factors
S.No
1 2 3 4 5 6 7

Value(Weightage)
1 2 1 0.5 1 2 1

Criteria/Description
ApplicationKnowledge TestEnvironment TestData TestLeadCapability Motivation StableRequirements PartTimeWorkers

3.1.6 Calculate Final Use Case Points (UCP):-

UCP = UUCP*TCF*ECF 3.2 Effort Estimation:-

3.2.1 Conversion Factor (CF):TheConversionFactor(CF)isaratioofthenumberofmanhoursperusecasepointbasedonpast projects.OncethesizeofaprojecthasbeencalculatedintermsofAdjustedUseCasePoints,thetotal sizeneedstobeconvertedtoeffortbymultiplyingitwithaConversionfactor.TheConversionfactor (Effort/Size)isdefinedasthetotaltestingtimerequiredtotestoneUseCasePoint. TheConversionfactorcanbederivedbyreverseengineeringtechniquei.e.byputtingthehistorical projectdataintheestimationtemplatefordifferenttechnologies.Itis20(hrs)forJavabased applications.Ifnohistoricaldatahasbeencollected,afigurebetween15and30issuggestedby industryexperts.

UnderstandingTESTINGESTIMATIONusingUseCaseMetrics

Page6

3.2.2 Calculating Final Effort:Final Effort = UCP * Conversion factor

4. Benefits of Use Case Point methodology: 1.Thisscientificmethodgivesmoreaccurateandpreciseresultsoveranytraditionalmethodavailable foreffortestimation. 2.Noanydetailrequirementsarerequiredforestimation. 3.Thismethodisverywellsuitedforbiddingprojectsasmostofthetimeusecaseistheonly informationavailableatthebeginningofaproject. 4.TheUseCasepointmethodconsidersthetechnicalandenvironmentalfactorswhichcanberefined furthertoachievemoreaccurateestimates. 5.Thiscanbeusedtoillustrateproductivitybenchmarksacrossanorganizationsinceitisindependent oftestcases.

5. Case Study:5.1 Actor Weight [AW]:-

ActorWeight
S.No
1 2 3 4

ActorName
Actor1 Actor2 Actor3 Actor4

Weight ageType
Simple Medium Complex Simple

Factor
1 2 3 1

5 Actor5 Medium 2 Total9 UnderstandingTESTINGESTIMATIONusingUseCaseMetrics Page7

5.2 Use Case Weight [UCW]:

UseCase Weight
S.No
1 2 3 4

UseCase Description
UseCase1 UseCase2 UseCase3 UseCase4

WeightageType
Simple Medium Complex Simple

Factor
5 10 15 5

5 UseCase5 Medium 10 Total45

5.3 Unadjusted Use Case Points (UUCP):UUCP = AW + UCW = 9 + 45 = 54

5.4 Technical Complexity Factor Calculation [TCF]:-

TechnicalFactors
S.No
1 2 3 4 5 6

Description
TestTools DocumentInputs Testwarereuse DistributedSystem Performance Objectives SecurityFeatures

Weightage
2 2 1 2 1 1

Perceived Complexity
1 2 3 4 5 1

CalculatedFactor
2 4 3 8 5 1

7 ComplexInterfacing 1 3 3 TotalFactor26

UnderstandingTESTINGESTIMATIONusingUseCaseMetrics

Page8

TCF = C1 + C2*Total TF = 0.6 + (0.014)*26 = 0.96

Aperceivedcomplexityof0meansthetechnicalfactorisirrelevantfortheproject;3isaverage;5 meansithasstronginfluence. Eachfactorsweightismultipliedbyitsperceivedcomplexitytoproduceitscalculatedfactor.The calculatedfactorsaresummedtoproducetheTotalFactor.

5.5 Environmental Complexity Factor Calculation [ECF]:-

Environmental Factors
S.No
1 2 3 4 5 6

Description
Application Knowledge TestEnvironment TestData TestLeadCapability Motivation StableRequirements

Weightage
1 2 1 0.5 1 2

Perceived Complexity
5 3 1 1 5 2

CalculatedFactor
5 6 1 0.5 5 4

7 PartTimeWorkers 1 2 2 TotalFactor19.5

ECF = C1 + C2*Total EF = 1.14 + (-0.0362)*19.5 = 0.43

UnderstandingTESTINGESTIMATIONusingUseCaseMetrics

Page9

5.6 Calculate Final Use Case Points (UCP):UCP = UUCP*TCF*ECF = 54*0.96*0.43= 22.29 5.7 Calculating Final Effort:Final Effort = UCP * Conversion factor Final Effort (Hrs) = UCP*20 = 22.29*20 = 445.8

6. References:http://www.codeproject.com/KB/architecture/usecasep.aspx http://www.stsc.hill.af.mil/crosstalk/2006/02/0602Clemmons.pdf

astitchintimessavesnine

UnderstandingTESTINGESTIMATIONusingUseCaseMetrics

Page10

You might also like