apache jmeter from the ground up
Post on 12-Jan-2017
39 Views
Preview:
TRANSCRIPT
World®’16
PreConLab:ApacheJMeter fromtheGroundUpRefaelBotbol – ServicesClientManager– CATechnologies
DO5X50L
DEVOPS
2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ForInformationalPurposesOnlyTermsofthisPresentation
©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.
Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.
3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Abstract
ApacheJMeter isaneasytouseopen-sourcetoolforloadandperformancetestingforwebandmobileapplicationsandAPIs.ForthoseofyoujustgettingtogripswithJMeter,thissessionwillprovideyouwithaquickintroductiontoJMeter andwalkthroughbasicJMeter conceptswithhands-onlabexercisesonbuildingandrunningbasicloadtests.
RefaelBotbol
CATechnologiesServicesClientManager
4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Agenda
JMETEROVERVIEW
JMETERDEMONSTRATION
JMETERLABS
Q&A
1
2
3
4
5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ OpenSourcesolutiontoperform– Performancetests– Businessfunctionaltest– Regressiontest,etc.
§ CreatedbyStefanoMazzocchi oftheApacheSoftwareFoundationin1998toexecuteperformancetestonwhatisnowTomcat.
Overview
6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ ApacheredesignedJMeter toenhanceGUIandothercapabilities
§ JMeter isa100%JavadesktopapplicationwithaJavaSwingbasedGUI
§ CanrunonanyenvironmentthatrunsJavavirtualmachine
Overview(Contd.)
7 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ Web−HTTP,HTTPSsites'web1.0'web2.0ajax§ WebServices−SOAP/XML-RPC,REST§ DatabaseviaJDBCdrivers§ Directory−LDAP§ MessagingOrientedserviceviaJMS§ Service−POP3,IMAP,SMTP§ FTPService§ ExtendableusingPlugins
SupportedProtocols
8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ Freelyavailable– OpenSourcesoftware§ Performautomatedfunctionalandperformancetesting§ Supportsmultipleservertypes/platforms– Linux,Win,OSX§ SimpleandintuitiveGUI§ TestplansarestoredinXMLformat§ Fullmulti-threadingframeworkallowsconcurrentsampling§ ExtensiblethroughPlugins– CAFoundedbyBlazeMeter Chief
Scientist AndreyPokhilko
KeyFeatures
9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ JMeter simulatesvirtualuserssendingrequeststotargetserver
§ Returnsstatisticsthatshowtheperformance/functionalityofthetargetserver/applicationviatables,graphs,etc.
Howitworks?
10 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ JavaJDK1.7(forJMeter 3.0)– JMeter isaframeworkforJavaandneedsJDKtorun
§ Windows,Linux,Unix,Mac
§ Systemresource(CPU,Memory,Disk,network)requirementsdependsontypeortestsexecutedandtestconfigurations(#ofthreadsetc.)
SystemRequirements
11 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
1. DownloadandinstallJDK.Verifyinstallation.AddJAVA_HOMEenvironmentvariableandaddJavabinarytoPATH
2. DownloadandinstallApacheJMeter -http://jmeter.apache.org/download_jmeter.cgi
3. RunJMeter usingjmeter.bat orjmeter.sh
InstallationandConfiguration
12 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeterInstallationDirectoryStructure
apache-jmeter-2.9apache-jmeter-2.9\binapache-jmeter-2.9\docsapache-jmeter-2.9\extrasapache-jmeter-2.9\lib\apache-jmeter-2.9\lib\extapache-jmeter-2.9\lib\junitapache-jmeter-2.9\printable_docs
13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
1. CreateTestPlan1. Recording,Manually
2. Add,Remove,Load,SaveElements3. ConfigureElements4. SaveTestPlan5. RunTestPlan6. StopTestRun7. ReviewTestResults
UsingJMeter
14 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
1. ThreadGroup
2. Controllers
3. Samplers
4. LogicControllers
5. TestFragments
6. Listeners
Elements
7. Timers
8. Assertions
9. ConfigurationElements
10. Pre-Processor
11. Post-Processor
15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeterElements
16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
1. Configurationelements
2. Pre-Processors
3. Timers
4. Sampler
5. Post-Processors
6. Assertions
7. Listeners
ElementsExecutionOrder
17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
1. StartJMeter2. RenameDefaultTestPlan3. AddThreadGroup4. AddSampler5. AddListener6. RunTestPlan7. Reviewoutput/results8. Saveresults
CreatingaSimpleWebTestPlan
18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ ConsistsofMasterSystem(GUI)whichcontrolsremoteSlaveSystems(runningJMeter Server)
§ UsesJavaRMIRegistry serviceforcommunicationacrossinstances
§ Listenson1099portbydefault
DistributedArchitecture
19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
Master– SystemrunningJMeter GUI
Slave– SystemrunningJMeterServerwhichtakescommandfromGUIandsendsrequeststotargetsystem(s)
Target– SystemUnderTest
DistributedArchitecture(Contd.)
SUTTargetWebServer
SlaveJMeterServer
SlaveJMeterServer
SlaveJMeterServer
MasterJMeterGUI
20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
§ ExtendJMeter tosupportvariouscapabilities
§ 60+plugins– Stepping&Ultimatethreadgroups– Dummysampler– Flexiblefilewriter– …
§ FoundedbyAndreyPokhilko,ChiefScientist,CABlazeMeter
§ Moreinformationat– https://jmeter-plugins.org/
CreatingaSimpleWebTestPlan
21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
ApacheJMeter
CreatebasicJMeter testscript
§ CreateandexecuteasimpleJMeter testcasetotestawebsitehttp://blazedemo.com
§ Increasethreadsfrom1to10
§ Addcookieandcachemangerstobettersimulaterealbrowser’sbehavior
§ Reviewresponsetimes
Labs
22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Questions?
23 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
RecommendedSessions
SESSION# TITLE DATE/TIME
DO5X26S What'sNewinCATestDataManager4.0? 11/16/2016at4:30pm
DO5T17SCaseStudy:NationwideBuildingSociety'sCATestDataManagerSuccessStory
11/17/2016at1:45pm
DO5X42STechVision:TestDataonDemand:DeliveringtheRightData,totheRightPlace,attheRightTime
11/17/2016at4:30pm
24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
MustSeeDemos
DataComplianceandTesting
CATDMDevOpsTheatre5
DeliverTestDataFaster
CATDMDevOpsTheatre5
UseModelBasedTesting
CAARDDevOpsTheatre5
AchieveMaximumTestCoverage
CAARDDevOpsTheatre5
25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD
Stayconnectedatcommunities.ca.com
Thankyou.
@CAWORLD#CAWORLD ©2016CA.AllRIGHTSRESERVED.26 @CAWORLD#CAWORLD
DevOps– ContinuousDelivery
FormoreinformationonDevOps– ContinuousDelivery,pleasevisit:http://cainc.to/PiTFpu
top related