Upload
ca-technologies
View
54
Download
2
Embed Size (px)
Citation preview
World®’16
TestAutomationacross9OpenSourceTools:TaurusAndreyPokhilko- ChiefScientist,BlazeMeter- CATechnologies
DO5X52L
DEVOPS
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
ForInformationalPurposesOnlyTermsofthisPresentation
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
Inthenotsodistantpast,loadtestingtoolshadoneclearpurpose:togenerateload.Allthetoolscreatedatthattimeansweredthisrequirementperfectly.Therationalehasevolvedaswediscovered,fine-tuned,andextendedaspectsoftheprocess.Now,thetestpreparationstageissocomplexandcrucialthatwespendmoretimepreparingteststhanrunningtheload.Wewanttoseelivetestresultsalongsidethehardwaremonitoringdata.Finally,thepost-testphaserequirescheckingSLAconditions,sendingautomatednotifications,andstoringresultsforfutureanalytics.The'goodold'toolswerenotdesignedwellforsuchabroadusecase.Butitisn'tjustthescopeofworkthathaschanged.Eventhehabitsofthepeoplebuildingtheserviceshavealsochanged.Theyprimarilyusetwotypesoftools:command-linetoolsandWeb2.0services.ThinkhowoftenyouencounterLinux,Git andAnsible,Wget andcURL.Orhowmanyofthesetabs- GmailandAWS,GitHubandSplunk,SalesforceandHubspot,NewRelic andJenkins- youcurrentlyhaveopen?The"cherryontop"isthe"continuous"aspectofmoderndevelopmentprocesses.Teamswanttoautomateallpossiblepartsoftheflow,and,insuchcases,thetestingtoolshouldnaturallyfitintothe"pipelinechain"oftheCImachine.We'releftwithtwopossiblesolutions:modernizingoldtoolsorcreatingnewtoolsfromscratch.Neithersolutionisperfect,bothrequirespendingalotofresourcesonredoingsomethingthathasalreadybeendone.Inthissession,AndreyPokhilkowillexploreathirdapproach- anopensourcehybridtoolcalled"Taurus".Thistoolmeetsthebroadusecasesmentionedabove,whileenablingyoutoutilize'triedandtested'toolsforgeneratingload.Tosuittheuser'shabits,Taurusisasimple-to-learncommand-linetoolthatalsoconnectstoWeb2.0services.Thissessionwillhaveahand-onsectionthatwillprovideyouwithanopportunitytocreate,configureandexecuteSeleniumscriptsforperformancetestsintheCloudusingTaurus.
AndreyPokhilkoCATechnologiesChiefScientist,BlazeMeter
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
http://gettaurus.org
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
WHYLEARNTAURUS?
TAURUSOVERVIEW
9TOOLSSUPPORTED
Q&A
1
2
3
4
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WhyLearnTaurus?
§ DevOps-styleusageofloadtestingtools(CLI+SaaS)
§ Freedomtochoosetoolthatfitsuse-case
§ Enable“shiftleft”forloadtesting
§ EnableautomationandCIforloadtesting
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Taurusis:
§ Text-basedconfigurationfileformat
§ Executedbythecommand-linetool
§ Thatwrapsexistingloadgeneratingtools
§ AndconnectstoSaaSforreportingandscale
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
YAMLSyntaxIntro
§ Whitespacematters <=mainsourceofmistakes
§ Dictionaries,listsandscalars
§ Noneedtoquotestringsunlessspecialcharsused
§ YAML-awareeditorhelps(Notepad++)
§ IfYAMLdoesnotworkforyou,youcanuseJSONwithTaurus
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
TaurusConfig Structure
§ Scenarios - collectionofscripts
§ Execution - whichscenariosexecuteandhow
§ Reporting - howtoanalyzedata
§ Services - extraactionsondifferentstages
§ Modules - changesettingsforallabove
§ Generalsettings- sometop-leveloptions
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
GoodDefaults
§ Youcanomitalmosteveryoption
§ Almosteverythinghasmeaningfuldefaults
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
WritingFirstConfig
run> bzt first.yml
---execution:- scenario:
requests:- http://blazedemo.com/
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Understandingwhathappensinside
1. Loadconfigs:basedefaults,personalpreferences,config itself
2. GenerateJMXfromYAMLscenario
3. ModifyJMXtointegratewithTaurus
4. RunJMeterasparallelprocess
5. Analyzeresultsandoverwatch JMeter
6. Reportstatsintocommandlineattheend
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApplyingSomePressure
---execution:- scenario: blazedemoconcurrency: 10ramp-up: 1mhold-for: 2m
scenarios:blazedemo:requests:- http://blazedemo.com/
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
LearningQuickOverrides
run> bzt first.yml ⇒
-o execution.0.concurrency=20
-o modules.console.disable=true
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
UsingOnlineReports
run> bzt first.yml -report
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ImportantFilesandDirectories
§ Artifactslocation,configurable,showntwicearun:– merged.yml,effective.yml,logs
... ... ...04:03:26 INFO: Artifacts dir: /tmp/bzt-artifacts/1107-035917... ... ...
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScalingWithCloudProvider
run> bzt first.yml –cloudYouwillneedtheAPIkeyin~/.bzt-rc forthis
---execution:- scenario: blazedemoconcurrency: 50hold-for: 5mlocations:us-west-1: 2eu-west-1: 3
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScenarioBuilding:DSLinYAML
§ Scenariobuildingisalotspecificforeachtool
§ JMetersupportisthemostrich:– extractors,– assertions,– logic,– config elements– JSR223– threadactions
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScenarioBuilding:DSLinYAML
---scenarios:from-script:requests:- url: http://blazedemo.comassert:- Welcome
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ScenarioBuilding:SourceFiles
---scenarios:from-script:script: my-predefined.jmxmodifications:disable:- Constant Timer
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
9ToolsSupported
§ Somearecross-platform:JMeter,Gatling,Selenium,Grinder,Locust,ab
§ SomeareLinux/Unix-only:Siege,Pbench,Tsung
§ Seleniumisveryspecial:Java,Python,JavaScript,Rubysupported
§ YoucanwriteyourownandplugitintoTaurus
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
SwitchingTools
Available:JMeter,Gatling,Selenium,Grinder,Locust,ab,Siege,Pbench,Tsung
---execution:- scenario: blazedemohold-for: 1mexecutor: gatling
23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Taurus• OpenSourceinitiativesponsoredbyCABlazeMeter• Automation-friendlyframeworkforContinuousTesting• DefinescenariosinTaurusYAMLorexecuteexistingtests• Widevarietyoftestexecutors,includingJMeter,Selenium,Gatling,…• Abilitytogenerateloadlocallyorinthecloud• ConsistentreportingthroughTaurusUIorBlazeMeter• EasyintegrationwithContinuousDeliverysystems
Summary
scenarios:home-page:requests:- label: Homeurl: /method: GETthink-time: 500msassert:- contains:- Welcomesubject: bodyregexp: false
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
FreePlayTime!
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
26 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessions
SESSION# TITLE DATE/TIME
DO5T03P FinancialIndustryPanel– Theater5 11/16/2016at04:30pm
DO5X39SGM'sRemovingTestingConstraintswithRespecttoTestModelingandTDM– LagoonL
11/16/2016at04:30pm
DO5X55S WalmartBrasil—SeasonalPeakTrafficReadiness 11/16/2016at04:30pm
27 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MustSeeDemos
ModernizeAppDeliveryIntegratedCDTheater5- DOV501P
DeliverTestDataFasterTestDataManagerTheater5- DOV511P
DeliverBetterAppsServiceVirtualizationTheater5- DOV507P
OrchestrateYourReleaseReleaseAutomationTheater5- DOV513P
28 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Thankyou.
Stayconnectedatcommunities.ca.com
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.29 @CAWORLD#CAWORLD
DevOps– ContinuousDelivery
FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu