apache jmeter from the ground up

26
World ® ’1 6 Pre Con Lab: Apache JMeter from the Ground Up Refael Botbol – Services Client Manager – CA Technologies DO5X50L DEVOPS

Upload: ca-technologies

Post on 12-Jan-2017

37 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Apache JMeter from the Ground Up

World®’16

PreConLab:ApacheJMeter fromtheGroundUpRefaelBotbol – ServicesClientManager– CATechnologies

DO5X50L

DEVOPS

Page 2: Apache JMeter from the Ground Up

2 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ForInformationalPurposesOnlyTermsofthisPresentation

©2016CA.Allrightsreserved.Alltrademarksreferencedhereinbelongtotheirrespectivecompanies.

Thecontentprovidedinthis CAWorld2016presentationisintendedforinformationalpurposesonlyanddoesnotformanytypeofwarranty. The informationprovidedbyaCApartnerand/orCAcustomerhasnotbeenreviewedforaccuracybyCA.

Page 3: Apache JMeter from the Ground Up

3 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Abstract

ApacheJMeter isaneasytouseopen-sourcetoolforloadandperformancetestingforwebandmobileapplicationsandAPIs.ForthoseofyoujustgettingtogripswithJMeter,thissessionwillprovideyouwithaquickintroductiontoJMeter andwalkthroughbasicJMeter conceptswithhands-onlabexercisesonbuildingandrunningbasicloadtests.

RefaelBotbol

CATechnologiesServicesClientManager

Page 4: Apache JMeter from the Ground Up

4 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Agenda

JMETEROVERVIEW

JMETERDEMONSTRATION

JMETERLABS

Q&A

1

2

3

4

Page 5: Apache JMeter from the Ground Up

5 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

§ OpenSourcesolutiontoperform– Performancetests– Businessfunctionaltest– Regressiontest,etc.

§ CreatedbyStefanoMazzocchi oftheApacheSoftwareFoundationin1998toexecuteperformancetestonwhatisnowTomcat.

Overview

Page 6: Apache JMeter from the Ground Up

6 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

§ ApacheredesignedJMeter toenhanceGUIandothercapabilities

§ JMeter isa100%JavadesktopapplicationwithaJavaSwingbasedGUI

§ CanrunonanyenvironmentthatrunsJavavirtualmachine

Overview(Contd.)

Page 7: Apache JMeter from the Ground Up

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

Page 8: Apache JMeter from the Ground Up

8 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

§ Freelyavailable– OpenSourcesoftware§ Performautomatedfunctionalandperformancetesting§ Supportsmultipleservertypes/platforms– Linux,Win,OSX§ SimpleandintuitiveGUI§ TestplansarestoredinXMLformat§ Fullmulti-threadingframeworkallowsconcurrentsampling§ ExtensiblethroughPlugins– CAFoundedbyBlazeMeter Chief

Scientist AndreyPokhilko

KeyFeatures

Page 9: Apache JMeter from the Ground Up

9 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

§ JMeter simulatesvirtualuserssendingrequeststotargetserver

§ Returnsstatisticsthatshowtheperformance/functionalityofthetargetserver/applicationviatables,graphs,etc.

Howitworks?

Page 10: Apache JMeter from the Ground Up

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

Page 11: Apache JMeter from the Ground Up

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

Page 12: Apache JMeter from the Ground Up

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

Page 13: Apache JMeter from the Ground Up

13 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

1. CreateTestPlan1. Recording,Manually

2. Add,Remove,Load,SaveElements3. ConfigureElements4. SaveTestPlan5. RunTestPlan6. StopTestRun7. ReviewTestResults

UsingJMeter

Page 14: Apache JMeter from the Ground Up

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

Page 15: Apache JMeter from the Ground Up

15 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeterElements

Page 16: Apache JMeter from the Ground Up

16 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

1. Configurationelements

2. Pre-Processors

3. Timers

4. Sampler

5. Post-Processors

6. Assertions

7. Listeners

ElementsExecutionOrder

Page 17: Apache JMeter from the Ground Up

17 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

1. StartJMeter2. RenameDefaultTestPlan3. AddThreadGroup4. AddSampler5. AddListener6. RunTestPlan7. Reviewoutput/results8. Saveresults

CreatingaSimpleWebTestPlan

Page 18: Apache JMeter from the Ground Up

18 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

§ ConsistsofMasterSystem(GUI)whichcontrolsremoteSlaveSystems(runningJMeter Server)

§ UsesJavaRMIRegistry serviceforcommunicationacrossinstances

§ Listenson1099portbydefault

DistributedArchitecture

Page 19: Apache JMeter from the Ground Up

19 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

Master– SystemrunningJMeter GUI

Slave– SystemrunningJMeterServerwhichtakescommandfromGUIandsendsrequeststotargetsystem(s)

Target– SystemUnderTest

DistributedArchitecture(Contd.)

SUTTargetWebServer

SlaveJMeterServer

SlaveJMeterServer

SlaveJMeterServer

MasterJMeterGUI

Page 20: Apache JMeter from the Ground Up

20 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

§ ExtendJMeter tosupportvariouscapabilities

§ 60+plugins– Stepping&Ultimatethreadgroups– Dummysampler– Flexiblefilewriter– …

§ FoundedbyAndreyPokhilko,ChiefScientist,CABlazeMeter

§ Moreinformationat– https://jmeter-plugins.org/

CreatingaSimpleWebTestPlan

Page 21: Apache JMeter from the Ground Up

21 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

ApacheJMeter

CreatebasicJMeter testscript

§ CreateandexecuteasimpleJMeter testcasetotestawebsitehttp://blazedemo.com

§ Increasethreadsfrom1to10

§ Addcookieandcachemangerstobettersimulaterealbrowser’sbehavior

§ Reviewresponsetimes

Labs

Page 22: Apache JMeter from the Ground Up

22 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Questions?

Page 23: Apache JMeter from the Ground Up

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

Page 24: Apache JMeter from the Ground Up

24 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

MustSeeDemos

DataComplianceandTesting

CATDMDevOpsTheatre5

DeliverTestDataFaster

CATDMDevOpsTheatre5

UseModelBasedTesting

CAARDDevOpsTheatre5

AchieveMaximumTestCoverage

CAARDDevOpsTheatre5

Page 25: Apache JMeter from the Ground Up

25 ©2016CA.ALLRIGHTSRESERVED.@CAWORLD#CAWORLD

Stayconnectedatcommunities.ca.com

Thankyou.

Page 26: Apache JMeter from the Ground Up

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

DevOps– ContinuousDelivery

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