the whole team approach to testing in continuous delivery...ways to engage the whole team in a...

53
@lisacrispin The Whole Team Approach to Testing in Continuous Delivery Lisa Crispin With material from Abby Bangser, Ashley Hunsberger, Lisi Hocke & more It takes a village… Copyright 2018 Lisa Crispin

Upload: others

Post on 26-Apr-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

TheWholeTeamApproachtoTestinginContinuousDelivery

LisaCrispinWithmaterialfromAbbyBangser,AshleyHunsberger,Lisi Hocke &more

It takes a village…

Copyright2018LisaCrispin

Page 2: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Alittleaboutme...

Page 3: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Howaboutyou?Who’salreadydoingcontinuousdelivery?Who’sworkingtowardsit?Whatcompetenciesdoyouhave?● Coding● Testing● Operations/sysadmin● Datascience/database● Coaching● ????

Page 4: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Learningintentions● WaystoengagethewholeteaminaDevOps(DevTestOps)culture● Sometoolstohelpshortenfeedbackloops&mitigaterisks● Howtofitallnecessarytestingactivitiesintothecontinuousworld

Page 5: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Expectations

● Pleaseaskquestionsandcontributeyourstories!

● Thereareno“bestpractices”,thereare“leadingpractices”.

● Readmore,andexperimentwiththeseideastoreallylearnthem.

● DevOpsisabigarea.We’llfocusonpipelines.

Page 6: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Whatdoyouthinkwhenyouhear“DevOps”?

Howabout“ContinuousDelivery”?

Page 7: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Whatdoyouthinkwhenyouhear“Continuoustesting”?

Page 8: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Wholeteamresponsibility forquality

● Commitmenttoalevelofconfidence○ Bugpreventionoverbugdetection○ Learningfromproductionuse,errors○ …andrespondingfast○ Focusonwhat’svaluabletocustomers

● Diverseperspectives,skillsets,biases

Page 9: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Let’sagreeonsomecommonterminology

Page 10: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

“DevOps”

● Termcoinedin2009,buttheconceptgoesbacktoearlydays● Devs,testers,ops,otherscollaborate

○ Create,test, maintaininfrastructureforCI,deployments,test&prodenvironments

○ Supportcontinuousdelivery&testing○ Makeourcustomers’dayabitbetter

Page 11: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

It’sallabout:

● Collaboration

● Continuousimprovement

● Continuouslearning

TestingistheheartofDevOps

Page 12: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Measuring our flow of work

Work identified

Work started

Work completed

Lead Time

Process / Cycle Time

Cycletime:howlongfromstarttodelivery?● Re-workslowsusdown● Sharedunderstandingspeedsusup

Page 13: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

ContinuousIntegration

● Integrate code into a shared repository multiple times per day

● Preferably on trunk/master, but on branches too● Typically the start of a pipeline● Each check-in can be verified by an automated build with

automated regression tests

Page 14: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Deploymentpipeline● Breakthebuildintostagestospeedupfeedback● Eachstagetakesextratime&providesmoreconfidence● Earlystagescanfindmostproblems->fasterfeedback● Laterstagesprobemorethoroughly● Automateddeploymentpipelinesarecentraltocontinuous

delivery

From A Practical Guide to Testing in DevOps, Katrina Clokie

Page 15: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

ContinuousDelivery(CD)

● Ability to get many types of changes into production safely, quickly and sustainably (Jez Humble)○ eg. new features, configuration changes, bug fixes, experiments

● Heavily benefits from, but not dependent on, automated regression tests

● Each commit is independently verified as a deployable release candidate

● A deployable release candidate is always available

Page 16: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Compile & Unit Testing

Static Analysis

Integration Testing

GUI &End to End Testing

Exploratory Testing

User Acceptance Testing (UAT)

Perf Testing

Penetration Testing

Deploy to Production

Deploy to QA Env

Deploy to StagingEnv

Deploy to Stress Env

Deploy to Security Env

ContinuousDeliveryExample

Steps outlined in blue in this example are manual

Page 17: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Manualstepsinthepipelinemightbe…

● Deploys● Exploratorytesting● Visualchecking● …whatelsecanyouthinkof?● Moreonthislater

Page 18: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

PrinciplesofcontinuousdeliveryFromJezHumbleandDavidFarley,continuousdelivery.com:

● Buildqualityin● Workinsmallbatches● Computersperformrepetitivetasks,peoplesolve

problems● Relentlesslypursuecontinuousimprovement● Everyoneisresponsible

Page 19: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

ContinuousDeployment(alsoCD:-/)● Deploymentsoccuroneverysuccessfullyverifiedcommit.

Oftenmanyaday.● Heavily fromautomatedtestingandContinuousDelivery

environment,butdoesnotactuallyrequireeither

Image: www.squirrelpicnic.com

Page 20: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Compile & Unit Testing

Static Analysis

Integration Testing

GUI &End to End Testing

Exploratory Testing

User Acceptance Testing (UAT)

Perf Testing

Penetration Testing

Deploy to Production

Deploy to QA Env

Deploy to StagingEnv

Deploy to Stress Env

Deploy to Security Env

ContinuousDeploymentExample

Steps outlined in blue in this example are manual

Page 21: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

CD(eitherone)withoutautomation…

Likedrivingatnightwithoutyourheadlights.It’spossible… butheadlightsreducetherisk.

Thewholeteamapproachisoneheadlight…Automatedregressiontestsaretheother.

Props to Ashley Hunsberger for the analogy

Page 22: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

To sum up the terms again…

Page 23: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

DeploymentPipeline

DeveloperCommit

DeployedtoProduction

Stage Stage Stage Stage Stage Stage

Page 24: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

DeploymentPipeline

DeveloperCommit

DeployedtoProduction

Codeismerged(master/trunk)

Stage Stage Stage

ContinuousIntegration(CI)

Stage Stage

Page 25: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

Businessapproval

Compilation/unittesting

Createdeploymentartifact

Testingstage1

Testingstage2

DeploymentPipeline

DeveloperCommit

DeployedtoProduction

Codeismerged(master/trunk)

ContinuousIntegration(CI)

ContinuousDelivery(CD)

Page 26: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

ContinuousDeployment(confusingly,thisisalsoCD)

Businessapproval

Compilation/unittesting

Createdeploymentartifact

Testingstage1

Testingstage2

DeploymentPipeline

DeveloperCommit

DeployedtoProduction

Codeismerged(master/trunk)

ContinuousIntegration(CI)

ContinuousDelivery(CD)

Page 27: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Visualizeyourpipeline

● Trygettingacross-functionalgroupofteammemberstogether● Devs,testers,productfolks,ops

● Writeyourpipelinestepsonbigstickies (realorvirtual)● Arrangethemonatable,wall,virtualwhiteboard● Talkaboutit!

Page 28: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Howcouldyoudeliverfaster?

● Parallelizingsteps?● Newtools?Moreautomation?Movingtothecloud?● Whatregressiontestsdoyouneedtorunforconfidence?

Page 29: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

TheTestSuite Canvas (fromAshleyHunsberger,inspiredbyKatrinaClokie)

https://github.com/ahunsberger/TestSuiteDesign

Page 30: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Let’sexploreafewcanvasdiscussionpoints

Confidence

Page 31: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Agoodplacetostartis…

dowedoeachstepinourcurrentpipeline?

Page 32: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Whatdowewanttolearnfromeachstep?

Whatbusinessquestionscaneachstepinourpipelineanswer?● Integrationandbuild● Staticcodeanalysis● Automatedtestsuites● ManualtestingWhocanbenefitfromtheinformation?Howshouldtheybeinformed?Whatriskscanwemitigatewitheachstep?

Page 33: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Afewrealworldexamples…

APITestSuite● AmIgettingproperresponsesthatwarrantUItesting?StaticCodeAnalysis● Arewemeetingaccessibilitystandards?BuildInstallerTesting● Doesthebuildinstallwithouterrorsothatitisworth

furthertesting?

Page 34: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Dependencies

Whatneedstobeinplaceforagivensteptorunsuccessfully?○ Othersystems○ Tools○ Data,environments...

Page 35: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Constraints● What’spreventingusfromoptimizingagivenstep?● Forexample:isitamanualstepwecouldautomate?● Dowehaveautomation,butit’sslowandflaky?● Whatareourknownworkarounds?

Page 36: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Triggeringeachstepinyourpipeline

• Whatkicksoffeachstepinyourpipeline?

• Canyouparallelizetoshortenyourfeedbackloop?

• Ifoneprerequisitestepfailsbutanotherpasses– doyourunthesharednextstep?Orstop?

Page 37: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Gates

● Automaticallystopdefectsfrommakingitanyfurtherdownstream – fastfeedback

● Trustyourtests– flakytestsareuseless● Usenewtechnologytohelpmaketeststrustworthy

Page 38: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Testdata

Howdowemanagetestdata?● Tradeoffofspeedvs.simulatingproduction● Unittestsusetestdoubles- fakes,stubs,mocks● Higherleveltestsusefixtureorcanonicaldata

○ whichsimulatesproddata● Setupandteardownforeachtest

Page 39: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

There’smoretothecanvas

• Useittogenerateconversations• Makesureyouaddresseverythingimportanttogiveyou

confidenceforcontinuousdelivery

Page 40: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

BuildingaDevOpsCulture

DevOpsisn’taroleorateam

It’scollaborationbetweenthesoftwaredeliveryteam(includingtesters)andthesystemadministrationandoperationsteam

Page 41: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Buildingrelationships

Thiswholeteamapproachsoundsnice,but…● Howcanweengageotherstocollaborate?

Whatareyourideas?

Page 42: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

We’rehumans!(orpossiblydragons,donkeys,unicorns…)

● Startwithcasual,friendlyconversations● Dofood● Sharesomethinguseful● Askpeopleinotherroles/teamsto

participate,sharetheirknowledgeKatrinaClokie hasexcellenttipsinAPracticalGuidetoTestinginDevOps

Page 43: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Cross-disciplinepairing,mobbing

Picture from Mob Programming Guidebook, MaaretPyhäjärvi and Llewellyn Falco

Page 44: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

“Stoptheline”mentality- fromToyota

● Everyemployeeontheassemblylinehasaresponsibilityto“stoptheline”whentheyseeadefect● Benefitofwholeteamapproach

● Pushingthe“bigredbutton”isaninvestmentthatleadstoimprovements:○ Knowledgesharing○ Cost,speed○ Reliability

Page 45: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Learningfromproductionuse

Page 46: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Monitoring,observing

● Testinginproductionisanecessity● Bigdataandthetoolstomonitoritarehere● ANI,MLallowustoprocessthedata● Needabilitytorespondquicklytopainpoints● Teamdisciplinetorespondtoalerts● Usagetrendscaninspirenewfeatures● “Learningreleases”aka“MVP”● A/B,betatesting

Page 47: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Exposurecontrol

● Yourteamneedstomasterfeaturetoggles!● Dogfooding,canaryrelease,stagedrollout,darklaunch

Page 48: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

HowDOwefitinallthosedifferenttypesoftesting?● Thosefeaturetoggles● Developersexploratorytest&moreatstorylevel● Storiesforalltypesoftestingatfeature/epiclevelgointo

thebacklogwithfeaturestories● ExploratorytestchartersAND● A11y,i18n,security,reliability,performance… storiesgo

intothebacklogwithfeaturestories● Testerspair&mobwithdevs,designers,productpeople…● Anyonecanpickupatestingtask

Page 49: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

ImportantDevOpstopicsI’mnotcoveringtoday

● Infrastructureascode● Configurationmanagement● Containers● Cloud● Environmentmanagement● Infrastructuretesting… SeeContinuousDeliveryandAPracticalGuidetoTestinginDevOps

Page 50: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

● Collaboratingtocontinuouslyimprovepipelines,feedback● Wholeteamcommitment,engagement● Visualizetogether,experiment● Babysteps- it’saprocess● Not“shiftingleftorright”– it’sinfinite!

Succeeding with the whole team approach

Ellen Gottesdiener and Mary Gorman, Discover to Deliver

Page 51: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Anymorequestions?

Whatwillyoutrywithyourownteam?

Page 52: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin

Afewresources

• AgileTesting,MoreAgileTesting(LisaandJanet)• ContinuousDelivery:ReliableSoftwareReleasesThroughBuild,Test,and

DeploymentAutomation (JezHumble andDavidFarley)• APracticalGuidetoTestinginDevOps(KatrinaClokie)• Accelerate:TheScienceofLeanSoftwareandDevOps:BuildingandScaling

HighPerformingTechnologyOrganizations(NicoleForsgren,JezHumble,GeneKim)

• https://github.com/ahunsberger/TestSuiteDesign• CharityMajors’blog,lotsonmonitoring:https://charity.wtf/

Page 53: The Whole Team Approach to Testing in Continuous Delivery...Ways to engage the whole team in a DevOps (DevTestOps) culture Some tools to help shorten feedback loops & mitigate risks

@lisacrispin