apache j meter

15
Apache Jmeter Step 1 Apache Jmeter http://jmeter.apache.org/download_jmeter.cgi Step 2 Download the below Apache file apachejmeter2.11.zip md5 pgp step3 Now Running ur terminal: $cd /Users/Tamil/Downloads/apachejmeter2.11 $pwd $cd bin/ $java Xmx1024m jar ApacheJMeter.jar

Upload: miranda-valentine

Post on 17-Sep-2015

229 views

Category:

Documents


0 download

DESCRIPTION

Apache j Meter help guide for beginners

TRANSCRIPT

  • 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