Escolar Documentos
Profissional Documentos
Cultura Documentos
ETLTestScenariosandTestCases
21stNovember2012 ETLTestScenariosand
TestCases
BasedonmyexperienceIpreparedmaximumtestscenariosand
testcasestovalidatetheETLprocess.Iwillkeeponupdatethis
content.Thanks
TestScenario
TestCases
Mappingdocvalidation
VerifymappingdocwhethercorrespondingETLinformationisprovidedor
not.Changelogshouldmaintainineverymappingdoc.
DefinethedefaultteststrategyIfmappingdocsaremissedoutsome
optionalinformation.Ex:datatypeslengthetc
Structurevalidation
1.Validatethesourceandtargettablestructureagainstcorresponding
mappingdoc.
2.SourcedatatypeandTargetdatatypeshouldbesame.
3.Lengthofdatatypesinbothsourceandtargetshouldbeequal.
4.Verifythatdatafieldtypesandformatsarespecified
5.Sourcedatatypelengthshouldnotlessthanthetargetdatatypelength.
6.Validatethenameofcolumnsintableagainstmappingdoc.
ConstraintValidation
Ensuretheconstraintsaredefinedforspecifictableasexpected.
DataConsistencyIssues
1.Thedatatypeandlengthforaparticularattributemayvaryinfilesor
tablesthoughthesemanticdefinitionisthesame.
Example:Accountnumbermaybedefinedas:Number(9)inonefield
ortableandVarchar2(11)inanothertable
2.MisuseofIntegrityConstraints:Whenreferentialintegrityconstraints
aremisused,foreignkeyvaluesmaybeleftdanglingor
inadvertentlydeleted.
Example:Anaccountrecordismissingbutdependentrecordsarenot
deleted.
DataCompletenessIssues
Ensuresthatallexpecteddataisloadedintotargettable
1.Comparerecordscountsbetweensourceandtarget.Checkforany
rejectedrecords.
2.CheckDatashouldnotbetruncatedinthecolumnoftargettable.
3.Checkboundaryvalueanalysis(ex:only>=2008yeardatahastoload
intothetarget)
4.Comparinguniquevaluesofkeyfieldsbetweensourcedataanddata
loadedtothewarehouse.Thisisavaluabletechniquethatpointsouta
varietyofpossibledataerrorswithoutdoingafullvalidationonallfields.
DataCorrectnessIssues
1.Datathatismisspelledorinaccuratelyrecorded.
2.Null,nonunique,oroutofrangedatamaybestoredwhentheintegrity
constraintsaredisabled.
http://testingdwh.blogspot.in/2012/11/etltestscenariosandtestcases.html
1/4
07/10/2015
ETLTestScenariosandTestCases
Example:Theprimarykeyconstraintisdisabledduringanimport
function.Dataisenteredintotheexistingdatawithnulluniqueidentifiers.
DataTransformation
1.Createaspreadsheetofscenariosofinputdataandexpectedresults
andvalidatethesewiththebusinesscustomer.Thisisanexcellent
requirementselicitationstepduringdesignandcouldalsobeusedaspart
oftesting.
2.Createtestdatathatincludesallscenarios.UtilizeanETLdeveloperto
automatetheentireprocessofpopulatingdatasetswiththescenario
spreadsheettopermitversatilityandmobilityforthereasonthat
scenariosarelikelytochange.
3.Utilizedataprofilingresultstocomparerangeandsubmissionofvalues
ineachfieldbetweentargetandsourcedata.
4.ValidateaccurateprocessingofETLgeneratedfieldsforexample,
surrogatekeys.
5.Validatethatthedatatypeswithinthewarehousearethesameaswas
specifiedinthedatamodelordesign.
6.Createdatascenariosbetweentablesthattestreferentialintegrity.
7.Validateparenttochildrelationshipsinthedata.Createdatascenarios
thattestthemanagementoforphanedchildrecords.
DataQuality
1.Numbercheck:ifinthesourceformatofnumberingthecolumnsareas
xx_30butifthetargetisonly30thenithastoloadnotpre_fix(xx_).we
needtovalidate.
2.DateCheck:TheyhavetofollowDateformatanditshouldbesame
acrossalltherecords.Standardformat:yyyymmddetc..
3.PrecisionCheck:Precisionvalueshoulddisplayasexpectedinthetarget
table.
Example:Insource19.123456butinthetargetitshoulddisplayas19.123
orroundof20.
4.DataCheck:Basedonbusinesslogic,fewrecordwhichdoesnotmeet
certaincriteriashouldbefilteredout.
Example:onlyrecordwhosedate_sid>=2008andGLAccount!=CM001
shouldonlyloadinthetargettable.
5.NullCheck:FewcolumnsshoulddisplayNullbasedonbusiness
requirement.
Example:TerminationDatecolumnshoulddisplaynullunless&untilifhis
ActivestatusColumnisTorDeceased.
Note:Datacleannesswillbedecidedduringdesignphaseonly.
NullValidation
Verifythenullvalueswhere"NotNull"specifiedforspecifiedcolumn.
Duplicatecheck
1.Needstovalidatetheuniquekey,primarykeyandanyothercolumn
shouldbeuniqueasperthebusinessrequirementsarehavingany
duplicaterows.
2.Checkifanyduplicatevaluesexistinanycolumnwhichisextracting
frommultiplecolumnsinsourceandcombiningintoonecolumn.
3.Sometimeaspertheclientrequirementsweneedsensurethatno
http://testingdwh.blogspot.in/2012/11/etltestscenariosandtestcases.html
2/4
07/10/2015
ETLTestScenariosandTestCases
duplicatesincombinationofmultiplecolumnswithintargetonly.
Example:Onepolicyholdercantakemultiplepolicesandmultiple
claims.InthiscaseweneedtoverifytheCLAIM_NO,CLAIMANT_NO,
COVEREGE_NAME,EXPOSURE_TYPE,EXPOSURE_OPEN_DATE,
EXPOSURE_CLOSED_DATE,EXPOSURE_STATUS,PAYMENT
DATEValidation
DatevaluesareusingmanyareasinETLdevelopmentfor:
1.Toknowtherowcreationdateex:CRT_TS
2.IdentifyactiverecordsaspertheETLdevelopmentperspectiveEx:
VLD_FROM,VLD_TO
3.IdentifyactiverecordsasperthebusinessrequirementsperspectiveEx:
CLM_EFCTV_T_TS,CLM_EFCTV_FROM_TS
4.Sometimesbasedonthedatevaluestheupdatesandinsertsare
generated.
PossibleTestscenariostovalidatetheDatevalues:
a.From_DateshouldnotgreaterthanTo_Date
b.Formatofdatevaluesshouldbeproper.
c.Datevaluesshouldnotanyjunkvaluesornullvalues
CompleteDataValidation
(usingminusand
intersect)
1.Tovalidatethecompletedatasetinsourceandtargettableminusquery
isbestsolution.
2.Weneedtosourceminustargetandtargetminussource.
3.Ifminusqueryreturnsanyvaluethoseshouldbeconsideredas
mismatchingrows.
4.Andalsoweneedstomatchingrowsamongsourceandtargetusing
Intersectstatement.
5.Thecountreturnedbyintersectshouldmatchwithindividualcountsof
sourceandtargettables.
6.Ifminusqueryreturnsorowsandcountintersectislessthansource
countortargettablecountthenwecanconsideredasduplicaterowsare
exists.
SomeUsefultestscenarios
1.Verifythatextractionprocessdidnotextractduplicatedatafromthe
source(usuallythishappensinrepeatableprocesseswhereatpointzero
weneedtoextractalldatafromthesourcefile,buttheduringthenext
intervalsweonlyneedtocapturethemodified,andnewrows.)
2.TheQAteamwillmaintainasetofSQLstatementsthatare
automaticallyrunatthisstagetovalidatethatnoduplicatedatahavebeen
extractedfromthesourcesystems.
Datacleanness
Unnecessarycolumnsshouldbedeletedbeforeloadingintothestaging
area.
Example2:Ifacolumnhavenamebutitistakingextraspace,wehaveto
trimspacesobeforeloadinginthestagingareawiththehelpof
expressiontransformationspacewillbetrimmed.
Example1:SupposetelephonenumberandSTDcodeindifferentcolumns
andrequirementsaysitshouldbeinonecolumnthenwiththehelpof
http://testingdwh.blogspot.in/2012/11/etltestscenariosandtestcases.html
3/4
07/10/2015
ETLTestScenariosandTestCases
expressiontransformationwewillconcatenatethevaluesinonecolumn.
Posted21stNovember2012bysatishkumar
0 Addacomment
Enteryourcomment...
Commentas:
Publish
Unknown(Google)
Preview
http://testingdwh.blogspot.in/2012/11/etltestscenariosandtestcases.html
Signout
Notifyme
4/4