Presentation JMeter

You might also like

You are on page 1of 15

Overview

SUMMARY
y Introduction y What is Jmeter ? y Why ? y Preparing tests y Step 1 Proxy server y Step 2 Organization y Step 3 Genericity y Step 4 Assertions y Running tests y Non GUI mode y Distributed testing y Analyzing Test

Introduction
y Definition : y JMeter is an Apache Jakarta project that can be used as a load testing tool for analyzing and measuring the performance of a variety of services, with a focus on web applications. y Why ? : y JMeter can be used as a unit test tool for JDBC database connection, FTP, LDAP, WebServices,J MS, HTTP and generic TCP connections. JMeter can also be configured as a monitor, although this is typically considered an adhoc solution in lieu of advanced monitoring solutions.

Proxy Server
Role
Record Http requests run by users. y Stick to the exact http request a lambda user . y Record only what is meaningful. y To be organized.
y

y Warning y Doesn t record https.

Organization
Thread groups
y Determine
How many users, will concurrently run the tests y How long between 2 launch of the test y How many times the tests will be run
y

Loop controllers
y Determine in a thread group
y

How long between 2 launch of the same sampler How many times the set of tests will be run.

Organization
Thread groups Loop controllers

Organization
Throughput Controller
y Make variable pause during

the test run to simulate better a client behavior.


y Because the thread group

doesn t take in count the server, can take several seconds before responding.

Genericity
y Variabilisation : y In order not to modify a test to run it on different machines y Example : user and password changing from a shelf to an other

Genericity
y Http default Request y Allows you to put a default ip port and path for all the Http Request contained in the scope y Gives you an easy way to run your test from a device to an other one just by changing the default adress.

Genericity
y Regular Expression extractor y If the data has to be used several times along the test
y

Like a sessionId for instance.

Assertions
y Response assertion y To match a pattern in the response code
y

The response code for instance.

y Xpath assertion y Using the DOM of the response to check if an element appear.
y

A research result for instance.

y Size assertion y To know if the size of the response received match with the size expected
y

To verify if the file received is the good one.

Running tests
y Non Gui Mode
y Why?
y

The stress due to test and display is too high when running distributed tests.

y How ?
y

By running command line


Example : jmeter -n -t my_test.jmx -l log.jtl -H my.proxy.server P 8000

Distributed testing
y Why ?
y To simulate stressed environment with a lot of clients.

y How ?
y Edit remote_hosts=127.0.0.1 in jmeter.properties y Start jmeter_server.bat on the host machines y Run jmeter.bat

Analyzing Test
Aggregated graph
y Gives all the statistics

Result tree
y Gives in a tree form, all the

concerning the tests y May be recorded in a specified file for further treatment (data mining)

samplers results, the requests, and the sampler data. y May also be recorded in a specified file for further treatment

Analyzing Test
Aggregated graph Result tree

You might also like