Upload
others
View
12
Download
0
Embed Size (px)
Citation preview
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Test Automation: Agile Enablement for Data Warehousing and Business Intelligence Teams
PresentedtoAgile2016July26,2016Atlanta,GeorgiaLynnWinterboer,AgileAnaly4csEducatorandCoach,@AgileLynnCherFox,DW/BISolu4onArchitect,@TheDatanista
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Agenda
• Whyistestautoma4onimportantforagiledatateams?
• Whyaren’talldatateamsautoma4ngtheirteststoday?
• Whatisthepathtotestautoma4on?
• WhatdoessimpleDWtestautoma4onlooklike?
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Why is test automation important to agile data teams?
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Agile Demands Something Different Agilecallsforsmallincrementsof“poten4allyshippablecode”.ThatmeansQAisessen4alonaregular,frequentbasis.
Howcanwebesurethatsomethingwedo
here
Doesn’tbreaksomethingwedidback
here
Test Suite Test Suite Test
Suite Test Suite Test
Suite Test Suite Test
Suite
Manualtes4ngquicklybecomesinfeasible.Thetestsuitegrowslargereachitera4on.
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Testing is Central to Agile
AgileBIdevelopmentisdrivenbytests
Acceptancecriteriaarethedefini4onof“done”
Passingtestsarethemeasureof“done”
Regressiontestsarethemeasureof“s4lldone”
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Agile Teams Understand…
…thattestautoma4onis akeytechnicalenabler
to“beingagile”
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Why aren’t all data teams automating their tests
today?
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
DW/BI Test Automation Challenges Dataindustrydoesnotfocusontes4ngasmuchasotherdisciplines:
Educa4onTeamMembers
Skills&Discipline
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
DW/BI Test Automation Challenges Exis4ngtoolsarenoteasilyadaptedtothedataworld:
DevelopmentLanguages
Web,MobileandUIFocus
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
DW/BI Test Automation Challenges Goodtestdatasetsarehardtocomeby:
Largevolumes(onsmallenvironments)
SharedtestenvironmentsDatasensi4vity
Smallsetsneedextraplanninganddesign
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
What is the path to test automation?
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Exercise: Path to test automation Insmallgroups,discussthefollowingpre-requisitestotestautoma4onanddecideonthefirstthreestepsaDW/BIteamshouldtaketowardtestautoma4on:
BusinessDomainKnowledge LearningCulture TestMaintenance RepeatableTests
TestDesign TestFeedbackLoops DedicatedTesters UITests
ExploratoryTes4ng Tes4ngSkills TestDataSets UnitTests
TestEnvironment AutomatedBuilds Tes4ngisaTeamSport TestOrganiza4on
ManualTests BuildQualityIn AcceptanceTests TestAutoma4onTool
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Agile Testing Perspectives
HighQualityDW/BISystem
3) Tools & Automa/on
1) A2tudes & Culture
2) Skills & Prac/ces
Tes4ngisaTeamSportLearningCultureBuildQualityIn
Tes4ngSkillsTestDesign,Organiza4on&MaintenanceRepeatableTestsFeedbackLoops
TestEnvironmentBuildAutoma4onTestDataSetsTestAutoma4onTool
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Test Automation Pyramid
AppTests
AcceptanceTests
Unit&ComponentTests
ManualTests
Lisa Crispin & Janet Gregory, Agile Tes6ng: A Prac6cal Guide for Testers and Agile Teams
Pushasmanytestsaspossibletothislayer
Writetheseinbusinessdomainlanguage
BrieleteststhatareaffectedbyUIchanges
Subjec4veuserfeedbackisessen4al
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Good Places to Start § Unittestsonnewdevelopment
AGILETEAMSWRITETESTSBEFOREWRITINGANYCODE
§ Regressiontestsyouwishyouhad,beforebuildingsomethingnew
§ Deploymentteststoensureeachbuildmigratedcorrectly
§ Painfultestsetuportestexecu4onpronetoerror
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
What does simple data warehousing test automation
look like?
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Basic Approach
Componentundertest
SourceSchema
TargetSchema
ActualResults
TestData
TestRunner
Setup Execute Test Report CleanUp
Sta4cTestData
ExpectedResults
TestQueries
loadtestdata
compareresults
executetests
basedonsp
ecificinput
data
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
What Constitutes a Test?
ActualResult(fromtest)
ExpectedResult(queriedor
pre-calculated)
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com©KenCollier,2016,AllRightsReserved
Exercise: Test Data & Expected Results Insmallgroups,defineatleastonetest,withadescrip4onofthetestdatasetandhowyouwoulddeterminetheexpectedresults,forthefollowinguserstory:
AsaSalesManager,Iwanttoknowthe$totalofordersthathavesuccessfullyshipped,bysalesrepandsalesregion,SothatIcanmanagethesalesteam’sprogresstowardquarterlyrevenuegoals.
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Demonstration
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Testing Framework Func4onalityandComponents:§ Examplesourcesystem
§ SQLServerandrelatedmodel(“AdventureWorks”)§ Screensfordescribingandcrea4ngtestcases
§ MicrosoiAccessform§ Testexecu4on
§ SQLServerstoredprocedures(individualtests)§ PowerShellscripts(batchexecu4on)
§ BIReportsandDashboardsformonitoring§ MSPowerBI
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Demo Workflow 1) Define a test (MS Access form) 2a. Execute a single test (SQL Server stored procedure)
3. Report on test results (MS Power BI) 2b. Execute a batch of tests (PowerShell scripts)
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Summary and Resources
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Session Intent
1)Why: TestAutoma:oniskeytoDW/BIagilesuccess
2)How: Automateasolidtes:ngprac:ce;don’tautomatechaos
3)Show: DW/BItestautoma:onisnotthathard
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
DW/BI Test Automation References Reference Descrip,on
AgileAnaly*cs:AValue-DrivenApproachtoBusinessIntelligenceandDataWarehousingbyDr.KenCollier
Chapter7:Test-DrivenDataWarehouseDevelopment
AgileDataWarehousingfortheEnterprise:AGuideforSolu:onArchitectsandProjectLeadersByRalphHughes
PartV:AgileEDWQualityManagementPlanning
AutomatedDataWarehouseTes*ng:Beginner’sStep-by-StepGuidebyG.Suden
Java-basedtestautoma4onforsimpledatawarehousingtests
AgileTes*ng:APrac:calGuideforTestersandAgileTeamsbyLisaCrispinandJanetGregory
Greatintroduc4ontoagiletes4ngforanytypeofdevelopment
MoreAgileTes*ng:LearningJourneysfortheWholeTeambyLisaCrispinandJanetGregory
Includesseveralchaptersontestautoma4onaswellasonededicatedtoagiletes4ngforDW/BI
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
DW/BI Test Automation Tools Tool Descrip,on
DBFitdbfit.github.io/dbfit/
Opensourcedatabasetes4ngtool
iCEDQicedq.comQuerySurgeQuerySurge.comZuzenaZuzena.com
Testautoma4ontoolsdesignedspecificallyforDataWarehousingandrelatedprojects.
Informa,caDataValida,onwww.informa4ca.com/etl-tes4ng
AccelerateandautomateInforma4caETLtes4nginbothproduc4onenvironmentsanddev/test
Analy,xDataServicesanaly4xds.comWhereScapewherescape.comTimeXtender4meXtender.com
DWautoma4ontoolsthatincludetestautoma4oncapabili4es.
Tricen,sToscawww.tricen4s.com/tricen4s-tosca-testsuite/
DW-friendlytestautoma4ontool
©2016byWinterboerAgileAnaly4cs�www.WinterboerAgileAnaly4cs.com
Questions?
Lynn Winterboer Agile Analy/cs Educator & Coach
www.WinterboerAgileAnaly/cs.com lynn@WinterboerAgileAnaly/cs.com
@AgileLynn
Cher Fox DW/BI Solu/on Architect
www.foxconsul/ng.co cfox@foxconsul/ng.co
@TheDatanista
Special thanks for contribu6ng to this presenta6on:
Deborah Krinitzsky Brad Ewald
Ken Collier Joe Bernardini