World ® ’1 6 Case Study: Leveraging CA Service Virtualization to Accelerate Continuous Integration in Development Jeff De Meyer - Software Engineer - American Family Insurance DO5T04S DEVOPS
Apr 16, 2017
World®’16
CaseStudy:LeveragingCAServiceVirtualizationtoAccelerateContinuousIntegrationinDevelopment
JeffDeMeyer- SoftwareEngineer- AmericanFamilyInsurance
DO5T04S
DEVOPS
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
JeffDeMeyer(SoftwareEngineer)discusseshowleveragingServiceVirtualizationinUnitTestingacceleratescontinuousintegrationindevelopment.
Virtualservicesaregenerallymoreeffectivewhenputinthehandsoftalenteddevelopers.Leveragingvirtualservices,inlieuoflivesystems,duringcontinuousintegrationunittestinghasproventoreducetestingcycletimesfrom6+hourstounder1hour.Thisallowsformoretestingcyclestobeexecuted,alongwithnewcodebeingcheckedinearlierandmoreoften,duringasprint.Theresultsaremoretesting,defectsbeingfoundearlier,morerapiddevelopment,andbetterapplicationqualitybeingproducedindevelopmenttiers.
JeffDeMeyerAmericanFamilyInsuranceSoftwareEngineer
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
RELEASEEARLY,RELEASEOFTEN
RESEARCHTOFINDOUTWHEREITHURTSANDWHATCANBEDONE
Q&A
IMPLEMENTAPLANTOALLEVIATETHEPAIN
EXECUTETHEPLANSANDREAPYOURROI
OTHERAREASTHATHAVEBENEFITFROMSERVICEVIRTUALIZATION
1
2
3
4
5
6
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Almostallofushaveheardaboutthisbefore…
WhatisthetruecostoffindingabugearlyintheSDLCversuslater?Almostallofushaveseenapresentationthatchroniclesthisverysimpletruthaboutbugs.Findingthemearlierisbetter(andexponentiallycheapertofix)!
Yethowcanwetestmorecode,earlier,whenwearegivenlessandlesstimetodevelopandtestourcode?
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ReleaseEarly,ReleaseOften
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
TypicalSDLCReleaseofCode
Codegetscheckedintothedevregion’srepositoryanddeployedtothedevtier.
Thenextdeploymentofcodetothedevtiercannottakeplaceuntilthecurrentdeploymentfinishesupitsunittests.
Unittestsarerun.
Ifunittestspass,usuallyasmoketestisrunandthenthepackageispromotedtotheintegrationtier.
Youcanonlyreleaseasearlyandasoftenasthespeedatwhichyourunittestsarerun.
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ResearchtoFindoutWhereitHurtsandWhatCanBeDone
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ResultsofMeetingwithDevelopers
Developersidentifythatasingleunittestcycletakesmorethan6hourstocompleteinitscurrentstate.
Developersidentifythatrunningtheunittestsserially,inconjunctionwiththousandsofwebservicecallsbeingmadepercycle,addssignificanttimetothelengthofthecycle.
Developersareconcernedthatastheyaddafewthousandmoreunittests,thatunittestingwillsignificantlyimpedetheirabilitytoreleasecodeatthepaceneededtomeetdeliverables.
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImpactofWebServiceCallsonCycle
Therearemorethan25webservicesbeingcalledduringunittests.
Averageresponsetimeofwebservicecallsisabout2seconds.Thereareover3,000unittestsmakinganaverageof5webservicecallspertests.Thatis15,000webservicecallspercycle.
Totaltimespentonwebservicecallsis30,000secondsOR8.3Hours!
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImplementaPlantoAlleviatethePain
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ProposedPlan
Virtualizeallofthewebservicesand
set thethinktimeto“0”,makingtheaverageresponse time less
than50ms.
Runtheunittestsinparallelinstead
ofserially.
Developer(s)would beassignedtothecreation/maintenanceoftheservices.
1 2 3
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ExecutethePlanandReapYourROI
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ExecutethePlan
Developerspent100hoursbuilding27virtualservices(about2– 4hoursforeachservice)
Unittestscompletedinunderanhour(about50minutes).
Developerrantheunittestsinparallelagainstthedevenvironmentbackedbyvirtualservices.
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ReapYourServiceVirtualizationROI
Investment=100hrsSavings=7hrs percycleROI=14.2cycles(or,15cycles)
Giventhattheincreasewentfromonecycleadaytofivecyclesaday,yourROIissatisfiedin4days!
Ifyoursprintlengthis2weeks(or10days),yougofrom10codereleasespersprintto50codereleasespersprint.Thatisa400%increaseintheamountofcodereleasesinasprint.Thisequatestofindingbugssoonerandfixingthemearlierintheprojectversuslater,whichequalslessexpensivefixes.
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
OtherAreasThatBenefitFromServiceVirtualization
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
PlacesThatBenefitFromServiceVirtualization
OurmobiledevelopmentteamhastakenadvantageofusingServiceVirtualizationforvirtualizingAPIsusingSwaggerDocs,beforetheAPIsareevenavailable.
Ourtrainingenvironmentsarebackedbyvirtualservicestoreducethecostandmaintenanceoftrainingenvironments
1
2
Wehaveusedservicevirtualizationtocreatevirtual‘utilities’usedforcreatingvirtualservice,assigningtrainingIDs,andaddinguserstoJIRA.
3
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessions
SESSION# TITLE DATE/TIME
DO5T17S NationwideBuildingSociety'sCATDMSuccessStory 11/17/2016at01:45pm
DO5T22SINGDeliversUnprecedentedGlobalContinuousDeliveryasaService 11/17/2016at03:00pm
DO5T19SGMFinancialBuildsaSustainable,Holistic,ContinuousDeliveryPractice 11/17/2016at04:30pm
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MustSeeDemos
ModernizeAppDeliveryIntegratedCDTheater5- DOV501P
DeliverTestDataFasterCATestDataManagerTheater5- DOV511P
DeliverBetterAppsCAServiceVirtualizationTheater5- DOV507P
OrchestrateYourReleaseCAReleaseAutomationTheater5- DOV513P
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Stayconnectedatcommunities.ca.com
Thankyou.
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
DevOps– ContinuousDelivery
FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu