apache j meter
DESCRIPTION
Apache j Meter help guide for beginnersTRANSCRIPT
-
ApacheJmeterStep1ApacheJmeterhttp://jmeter.apache.org/download_jmeter.cgiStep2DownloadthebelowApachefileapachejmeter2.11.zipmd5pgp
step3NowRunningurterminal:$cd/Users/Tamil/Downloads/apachejmeter2.11$pwd$cdbin/$javaXmx1024mjarApacheJMeter.jar
-
NowApachejmeterToolwillbeopenedlikebelow,
Step4
-
AfteryoulaunchApacheJMeterwithJavayouwouldseefollowingwindow.
HereyouwouldseeTestPlanandWorkBench,butfortestingourwebapplicationwe
wouldbeconcentratingontheTestPlan.
Step5
BasicelementsofaJMetertestplanincludethreeelements:
ThreadGroup
Listeners
Samplers
-
ThreadGroupelementsimulatesagroupofusers,whichcontainsatleastoneuser.
Samplerelementmakesrequeststothetargetserver,therequestcanbeHTTP,FTPetc.
Listenerelementcapturestheresponsedataorpagefollowingeachrequest.
Step6 EverytestplancreatedinJMeterwouldstartbycreatinganthreadgroup.Threadgroup
wouldsimulatethenoofuserstryingtomakerequesttoyourwebapplication.Tocreatean
newthreadgroupyouhavetoperformfollowingsteps.
RightClickTestPlan,clickonAdd>Threads(User)>ThreadGroup
AfteraddingtheThreadGroup,theUIwouldlookasshownbelow:
-
AsyoucanseewhenwecreateanthreadgroupwewouldseetheoptionforaddingNumber
ofThreads,numbermentionedherewouldbenoofusersthatwearetryingtosimulatewhile
performingloadtesting.
NOTE:
WanttoRunningmoreUsers&Seconds
IncreaseYourThreadPropertiesusers50,100,200...Seconds10,20,30thenClicktoForever
loopcount..
Step6
-
CreatingHTTPRequestSampler FortestingwebapplicationwewouldbecreatinganHTTPRequestsampler,HTTPrequest
wouldholdallthedetailsessentialformakinganywebrequestcalllike:
URL
HTTPMethod
RequestParameter
HTTPPort
HTTPFilePost
TocreatenewHTTPRequestwewouldperformfollowingsteps:
RightClickThreadGroup,clickonAdd>Sampler>HTTPRequest
AfteraddingtheHTTPRequest,theUIwouldlookasshownbelow:
-
Importantinformationneededherewouldbe
ServerNameorIP
PortNumber
Protocol
Method
Path
-
SendParametersWiththeRequest
Ifyouseethescreenshotprovidediantryingtohitgoogle.comserverandcallingindex.html
pageusingHTTPGETmethod.
Step7
CheckingTestResultsinApacheJMeter FinallytochecktheresultsfortestplanwewouldbeaddingListeners,itcontainslistof
graphsandtablethatgivesthedetailedreport.FromHTTPrequestpointofviewthereare3
mainlisteners
-
SummaryReport
ViewResultsTree
ViewResultsinTable
ApacheJMeterListener:SummaryReport YoucanaddSummaryReportbyclickingon
TestPlan>Add>Listener>SummaryReport
-
ApacheJMeterListener:ResultTree YoucanaddViewResultsTreebyclickingon
TestPlan>Add>Listener>ResultTree
-
ApacheJMeterListener:ResultTable YoucanaddViewResultTablebyclickingon
TestPlan>Add>Listener>ResultTable
-
Step8
StoringResult:
Thelistenershowstheresults.
-
NOTE:
BeforeRunningJmeteryoumustgiventhefilenameforStoreResult.
looklike
/Users/Tamil/Downloads/apachejmeter2.112/bin/Result/table.csv
TableResult:
-
TreeResult:
SummaryResult:
-
ConfigureYourSavefileFormat:
ConfigureyourfileFormattoCSVfileformat
step9
FinallyCalculateYourPageorAPIdetailsfromStoredFile
Reference:
1http://www.hiteshagrawal.com/apache/loadtestingwithapachejmeter/2http://jmeter.apache.org/usermanual/index.html ThankYou