JMeter Training

Functional and Stress Testing

with Jmeter

Peter Lin

Jmeter Committer

Goals of Testing

The goal of stress testing

How to measure load: request/sec vs page/sec

Using access logs

Generating nightly statistics

Recording session information

How to estimate expected load

New project

Taking an educated guess

Understanding the relationship between functional requirements and performance

The goal of functional testing

Determining what functionality to test

Limits of functional testing

Measuring Capacity

Defining Capacity

Number of concurrent users

Number of unique page views

Number of requests per second

Measuring Capacity

Capacity for a specific hardware configuration

Capacity for a given cluster

Capacity for a NOC (network operations center)

Capacity and load balancing

NOC capacity and application capacity

Estimating Capacity

Network

Hardware

Application

Users

Capacity Planning

Converting performance into capacity

Using the data to plan for the future

Writing a formal plan

Determining when to purchase hardware

Consider deployment over head

Consider crisis scenarios

Set reasonable expectations

Providing regular feedback

Monitoring

Monitoring

Active monitoring

Snmp tools

Heart beat

Clustering

Passive monitoring

Access logs

System logs

What to monitor

The impact of monitoring

Running nightly statistics

Measure the growth rate

Apache Traffic

Apache downloads

Apache 30 hits

Apache 30 day page views

Log analysis

List of tools http://www.uu.se/Software/Analyzers/Access-analyzers.html

Webtrends http://www.webtrends.com/

Page level statistics

Session level statistics

Request Parameter level statistics

Methodology

User centric

Based on Http session

Based on functional specifications

Based on user profile

Examples

Randomly generated

Yellow pages/White pages

Search

ECommerce

Hybrid

Kinds of site that might need hybrid tests

Distributed testing

Generating sufficient load

Limitations of distributed testing

JMeter Basics

Test Plan

Workspace

Thread group

Controllers

Configuration

Samplers

Listeners

Assertions

Timers

Pre-processor

Post-processor

Enable/Disable

Limitations

Test Plan

User defined Variables

Run each thread group separately

Functional Test Mode

What goes in a Test Plan

Merging test plans

Workbench

JMeter Proxy

Temporary work area

Disabling thread groups vs moving to workbench

Thread Group

Name

Action to be taken after a sample error

Thread properties

Number of threads

Ramp up period in seconds

Loop count

Scheduler

Start time

End time

Duration

Delay in seconds

Controller

Controller manage test logic

Interleave Controller

Loop Controller

Once Only Controller

Simple Controller

Random Controller

Recording Controller

Module Controller

Throughput Controller

If Controller

Random Order Controller

ForEach Controller

Transaction Controller

Runtime Controller

While Controller

Switch Controller

Configuration

HTTP Authorization Manager

HTTP Cookie Manager

HTTP Proxy Server

HTTP Request Defaults

FTP Request Defaults

JDBC Connection Configuration

JDBC SQL Query Defaults

Mail Reader Sampler

HTTP Header Manager

Login Config Element

Simple Config Element

LDAP Request Defaults

LDAP Extended Request Defaults (ALPHA)

Java Request Defaults

User Defined Variables

TCP Sampler Config

CSV Data Set Config

Sampler

FTP Request

HTTP Request

JDBC Request

Java Request

SOAP/XML-RPC Request

LDAP Request

LDAP Extended Request (ALPHA)

WebService(SOAP) Request

Access Log Sampler

BeanShell Sampler

BSF Sampler

TCP Sampler

JMS Publisher

JMS Subscriber

JMS Point-to-Point

Test Action

Listener

Mailer Visualizer

Graph Full Results

Graph Results

Spline Visualizer

Assertion Results

View Results Tree

Aggregate Report

View Results in Table

Simple Data Writer

Monitor Results

Distribution Graph

Assertion

Response Assertion

Duration Assertion

Size Assertion

XML Assertion

BeanShell Assertion

MD5Hex Assertion

HTML Assertion

XPath Assertion

XML Schema Assertion

Timer

Constant Timer

Gaussian Random Timer

Uniform Random Timer

Constant Throughput Timer

Synchronizing Timer

peter lin

2005-06-18T21:41:01