presentation j meter

Upload: kumard205

Post on 03-Jun-2018

223 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Presentation j Meter

    1/15

    Overview

  • 8/12/2019 Presentation j Meter

    2/15

    SUMMARY Introduction

    What is Jmeter ? Why ?

    Preparing tests Step 1 Proxy server Step 2 Organization Step 3 Genericity Step 4 Assertions

    Running tests Non GUI mode Distributed testing

    Analyzing Test

  • 8/12/2019 Presentation j Meter

    3/15

    Introduction Definition :

    JMeteris an Apache Jakarta project that can be used as aload testing tool for analyzing and measuring theperformance of a variety of services, with a focus on webapplications.

    Why ? :

    JMeter can be used as a unit test tool for JDBC databaseconnection, FTP, LDAP, WebServices,J MS, HTTP andgeneric TCP connections. JMeter can also be configuredas a monitor, although this is typically considered an ad-hoc solution in lieu of advanced monitoring solutions.

  • 8/12/2019 Presentation j Meter

    4/15

    Proxy ServerRole

    Record Http requests run byusers.

    Stick to the exact httprequest a lambda user .

    Record only what ismeaningful.

    To be organized. Warning

    Doesnt record https.

  • 8/12/2019 Presentation j Meter

    5/15

    OrganizationThread groups Loop controllers

    Determine

    How many users, willconcurrently run the tests

    How long between 2 launchof the test

    How many times the testswill be run

    Determine in a thread group

    How long between 2 launchof the same sampler

    How many times the set of

    tests will be run.

  • 8/12/2019 Presentation j Meter

    6/15

    OrganizationThread groups Loop controllers

  • 8/12/2019 Presentation j Meter

    7/15

    OrganizationThroughput Controller

    Make variable pause duringthe test run to simulate bettera client behavior.

    Because the thread groupdoesnt take in count the

    server, can take severalseconds before responding.

  • 8/12/2019 Presentation j Meter

    8/15

    GenericityVariabilisation :

    In order not to modify a test to run it on differentmachines

    Example : user and password changing from a shelf to another

  • 8/12/2019 Presentation j Meter

    9/15

    Genericity Http default Request

    Allows you to put a default ip port and path for all theHttp Request contained in the scope

    Gives you an easy way to run your test from a device toan other one just by changing the default adress.

  • 8/12/2019 Presentation j Meter

    10/15

    Genericity Regular Expression extractor

    If the data has to be used several times along the test

    Like a sessionId for instance.

  • 8/12/2019 Presentation j Meter

    11/15

    Assertions Response assertion

    To match a pattern in the response code

    The response code for instance.

    Xpath assertion

    Using the DOM of the response to check if an elementappear.

    A research result for instance. Size assertion

    To know if the size of the response received match withthe size expected

    To verify if the file received is the good one.

  • 8/12/2019 Presentation j Meter

    12/15

  • 8/12/2019 Presentation j Meter

    13/15

    Distributed testingWhy ?

    To simulate stressed environment with a lot of clients.

    How ?

    Edit remote_hosts=127.0.0.1 in jmeter.properties

    Start jmeter_server.bat on the host machines

    Run jmeter.bat

  • 8/12/2019 Presentation j Meter

    14/15

    Analyzing TestAggregated graph Result tree

    Gives all the statisticsconcerning the tests

    May be recorded in aspecified file for furthertreatment (data mining)

    Gives in a tree form, all thesamplers results, therequests, and the samplerdata.

    May also be recorded in aspecified file for further

    treatment

  • 8/12/2019 Presentation j Meter

    15/15

    Analyzing TestAggregated graph Result tree