decrease test build time, not test quality with ca blazemeter

Post on 12-Jan-2017

24 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

World®’16

DecreaseTestBuildTimeNOTTestQualityRefaelBotbol- ServicesClientManager- CATechnologies

DO5X53E

DEVOPS

2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.

Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.

ForInformationalPurposesOnlyTermsofthisPresentation

3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Abstract

Today,yourbuildtimeconsistsofmuchmorethanjustthetimeittakesJenkinstobuildyourapplication.Italsoincludesregressiontests,deploymenttodifferentenvironments,andmaybeotherapplicationspecifictasksyouwanttoautomateaspartofyour“build”.

Yourbuildtimecansignificantlyinfluencehowoftenandwhenyoudecidetorunyourbuilds(i.e.whetheryourunyourbuildsweekly,nightly,twiceaday,orjustpercommit).Allofthishasadirectimpactonyourproductivityandefficiency.

Buthowcanyoudecreaseyourtestbuildtimewithouttriggeringadropinproductquality- oreventhenumberoftestsyourun?TakealookatanewapproachtotestautomationwithintheCIprocess,andlearnhowto:• Increasethequantityandtypeoftestsrunwhilereducingyourbuildtime• IncludeyourperformancetestsaspartofyourCIprocesstoidentifyperformance

degradationissuesearlyintheprocess• Shiftleftallthewaytothedeveloper.SeehowdeveloperscancreatetestswithDSLusing

theirexistingJSON/YAMLknowledge

Thissessionwillstartoffwithaninteractivediscussionbeforeturningintoademonstration/hands-onworkshop.Attendeeswantingtoparticipateinhands-onwillrequiretobringtheirownlaptopstoexecutetheexercises.

RefaelBotbol

CATechnologiesServicesClientManager

4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Agenda

SAVETIME:BYPARALLELING YOURTESTS

DELEGATE:ENABLEEACH PERSONACONTRIBUTETOTHEEFFORT

FOCUS:CONCENTRATEONBUILDING NOTONMAINTAININGTESTS

SCALE:EXECUTEBUILDSASMANYASYOURBUSINESSREQUIRES

1

2

3

4

REDUCETHEBUILDTESTINGPHASEWHILEINCREASINGTESTCOVERAGE

DEMONSTRATION/WORKSHOP5

5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Whichtypeoftestshouldwerun?

§ Functional(API/UI)

§ Regressions

§ CriticalBusinessProcesses

§ Performance

§ Smoketests

6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

OpenSourceToolsyouprobablyuseforTesting

§ Functional(API/UI)– Selenium/JMeter/PhantomJS

§ Regressions – Selenium/JMeter/PhantomJS

§ CriticalBusinessProcesses– Gatling/JMeter/Selenium

§ Performance – Gatling/JMeter/Locust/Tsung

§ Smoketests– Selenium/JMeter/Gatling

7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Agenda

SAVETIME:BYPARALLELING YOURTESTS

DELEGATE:ENABLEEACHPERSONACONTRIBUTETOTHEEFFORT

FOCUS:CONCENTRATEONBUILDINGNOTONMAINTAININGTESTS

SCALE:EXECUTEBUILDSASMANYASYOURBUSINESSREQUIRES

1

2

3

4

DEMONSTRATION/WORKSHOP5

REDUCETHEBUILDTESTINGPHASEWHILEINCREASINGTESTCOVERAGE

8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TestingLayers• Monitoring• Smoketests• FullscaleperformancetestsProd

• Criticalbusiness processes• PerformancetestsStaging

• FunctionalUI• Functionalbackend• Regressiontests• Criticalbusiness processes

Integration

9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Divide,Parallel&Conquer

§ Planyourtestsperlayerandparallelasmuchaspossible

§ Stopthebuildonceadesignatedcriticaltesthasfailedand…– Notifythedeveloperregardingtheissue– Freeresourcesforotherbuilds

§ Buildonce,runmany(evenwhenaddingnewtests)

10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DSLbasedTestCreationusingYAMLinTaurus

11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DescribeTestExecutionScenario

12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

DescribeTestExecutionScenario

13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SetPass/FailCriteria

14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SAVETIME:BYPARALLELINGYOURTESTS

DELEGATE:ENABLEEACH PERSONACONTRIBUTETOTHEEFFORT

FOCUS:CONCENTRATEONBUILDINGNOTONMAINTAININGTESTS

SCALE:EXECUTEBUILDSASMANYASYOURBUSINESSREQUIRES

1

2

3

4

REDUCETHEBUILDTESTINGPHASEWHILEINCREASINGTESTCOVERAGE

DEMONSTRATION/WORKSHOP5

15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Whocancontributetothebuild’stests?

§ Coders – ByprovidinglowleveltestsforAPI/UIandregressions

§ Testers – Byprovidingsystemwidetestsandregressions

§ Operations – Byprovidingcriticalkeypointsandcreatingtestswithpass/failcriteriaforthem

16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Whocancontributetothebuild’stests?

§ Product– Byprovidingpass/failcriteriaforbusinessprocesses

§ Marketers– Bycompletingtheproductviewandprovidingmarketingscenarios

§ Performance – Byimplementingperformancetests

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Thisishowwe(can)doit

§ Coders– UsingcodebasedenginesorevenYML/JSONDSL

§ Testers – TheywouldprobablytellyouhowJ

§ Operations– Automatingthescriptsandprovidingpass/failcriteriatomakesurenothingbreaks

18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TheHow– SurprisingPart

§ Product – Providingpass/failcriteriaforstagingandproductionenvironments(andafterseveralruns,evenfortheintegration..)

§ Marketers – Launchinganewevent?- WhynottestisbyusingaDSLwiththesepages?

§ Performance – Theseguysalreadyhavethescriptsandtheproductionvalues.Theonlythingthatisleft,istoincludeit.

19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Coders/TestersExamples

§ AsimpleAPIexample

§ Acomplexscenario

§ Java/Pythonseleniumtests

§ JMeter/Gatlingtests

20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Product/OperationsExamples

§ Createtestsandsetcriteria

§ Setpass/failcriteriaperenvironment

§ Easilyincludeitaspartofyourtestexecution

21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

MarketingExample

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

AddPerformanceTeststoyourbuild

23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Summary

§ First,takeadeepbreath…youhavemadeitsofar,youdeserveitJ

§ WecanuseDSLbasedonYML/JSONtocreatetests

§ Wecanchoosetheflavoroftoolswhichbestsuitsus,andreuseourexistingscripts

§ WecanalsousetheDSLtosetpass/failcriteriaanddescribethetestexecution

24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SAVETIME:BYPARALLELINGYOURTESTS

DELEGATE:ENABLEEACHPERSONACONTRIBUTETOTHEEFFORT

FOCUS:CONCENTRATEONBUILDING NOTONMAINTAININGTESTS

SCALE:EXECUTEBUILDSASMANYASYOURBUSINESSREQUIRES

1

2

3

4

REDUCETHEBUILDTESTINGPHASEWHILEINCREASINGTESTCOVERAGE

DEMONSTRATION/WORKSHOP5

25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

BuildOnce– UseMany

§ Option1:Separateeverything– Haveyourscriptsrepresentonetestatatime– HaveoneormoreDSLdescribingtheexecutionperbuildper

environment– HaveoneormoreDSLdescribingthepass/failcriteriaperenvironment

Thisgivesyoumaximumagilityoncontrollingyourbuildtests– Addingtestsisfast– Criteriaareappliedtotestsautomaticallyperenvironment

26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

BuildOnce– UseMany

§ Option2:Haveclustersoftests– Groupyourteststogetherbaseontype,functionalityorany

characteristicsthatfitsyou– Attachtherightexecutionandcriteriapergroup

Thisisthebestoptionforspecialprojectssuchas– Anewcampaign– Satelliteprojectswhicharen’tpartofeverybuild– Performancetests

27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Option1ExecutionExample

28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Option2ClusteredTestExample

29 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SAVETIME:BYPARALLELINGYOURTESTS

DELEGATE:ENABLEEACHPERSONACONTRIBUTETOTHEEFFORT

FOCUS:CONCENTRATEONBUILDINGNOTONMAINTAININGTESTS

SCALE:EXECUTEBUILDSASMANYASYOURBUSINESSREQUIRES

1

2

3

4

REDUCETHEBUILDTESTINGPHASEWHILEINCREASINGTESTCOVERAGE

DEMONSTRATION/WORKSHOP5

30 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

UsetheForce CloudtoScale

§ SometesttypescanconsumeallofyourJenkinsWorker’sresources

§ Sometimes,theamountoftestsissimplytoohighforoneWorker

§ Youshortenedthebuildtimeandnoweveryonewantstobuild…

31 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

OneWorkertoTestThemAll

§ TheJenkinsWorkerholdsthefilesandconfigurations

§ TheWorkerstartthetestsusingcloudresourcestoscaleit

§ ResultsaretransmittedtobacktotheWorker

§ BasedontheresultstheWorkerdecides:– Lunchingthenextpackoftests– Stoppingthebuildduetobadresults– Markthebuildassuccessfulandcontinuetothenextstep

32 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

UsetheForce CloudtoScale

33 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Seleniumgeo-locationscale

34 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

OneSmallThingBeforeWeGo

35 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

SAVETIME:BYPARALLELINGYOURTESTS

DELEGATE:ENABLEEACHPERSONACONTRIBUTETOTHEEFFORT

FOCUS:CONCENTRATEONBUILDINGNOTONMAINTAININGTESTS

SCALE:EXECUTEBUILDSASMANYASYOURBUSINESSREQUIRES

1

2

3

4

REDUCETHEBUILDTESTINGPHASEWHILEINCREASINGTESTCOVERAGE

DEMONSTRATION/WORKSHOP5

36 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

GettingTaurus

§ Overall,weinstallTaurusbyusingpip.

§ InformationperOScanbefoundhere:http://gettaurus.org/install/Installation/

37 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

GetyourTaurusupandrunning

§ Plugyourflashdrive

§ InstallVirtualBox

§ Installvagrant(.dmg file)

§ Openterminalandcreateafolder

§ Gotothatfolderanddovagrantboxaddmy-Taurus-boxfile:///d:/path/to/taurus/box.box

38 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

GetyourTaurusupandrunning

§ Onthatfolderdovagrantinit my-Taurus-box

§ Vagrantup

§ Vagrantssh

§ Onceyou’reinsidethevagrant,docdTaurusScript

§ Do:bzt TaurusScenario.yml

39 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

TheChallenge

1. RunaJMeterscriptwithTaurus

2. Createyourown(simple)YMLDSLfileandrunitwithTaurus

3. RunaGatlingtestwithTaurus

4. ParallelthemJ

5. RunyourYMLDSLwith3differentexecutors(JMeter,GatlingandSelenium)andseethedifferencebetweenthem

6. Use–reporttoseetheBlazeMeter’sreport

40 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Questions?DO5X53E

41 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

RecommendedSessions

SESSION# TITLE DATE/TIME

DO5T03PLeadershipPanel:ContinuousDeliveryintheFinancialServicesIndustry

11/16/2016at04:30pm

DO5T14SAnalystKeynote:ContinuousDelivery:MakingDevOpsAwesome

11/17/2016at10:30am

DO5X56SNext-GenerationPerformanceTestingwithBlazeMeter,ServiceVirtualizationandTestDataManagement

11/17/2016at04:30pm

42 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

MustSeeDemos

ModernizeAppDeliveryIntegratedCDTheater5- DOV501P

DeliverTestDataFasterTestDataManagerTheater5- DOV511P

DeliverBetterAppsServiceVirtualizationTheater5- DOV507P

OrchestrateYourReleaseReleaseAutomationTheater5- DOV513P

@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.43 @CAWORLD#CAWORLD

DevOps– ContinuousDelivery

FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu

top related