Jmeter plugins - Advance scenarios - STeP-IN...
Transcript of Jmeter plugins - Advance scenarios - STeP-IN...
STeP-IN SUMMIT 2014
11th
International Conference on Software Testing
June 2014 at Bangalore, Hyderabad, Pune - INDIA
Jmeter plugins - Advance scenarios
by
Manish Sapariya, Architect,
kPoint
Copyright: STeP-IN Forum
Published with permission for restricted use in ‘STeP-IN SUMMIT 2014’ in agreement with
full copyrights from owner(s) / author(s) of material. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form
or by any means, electronic, mechanical, photocopying, recording or otherwise without the prior consent of the owner(s) / author(s). This edition is manufactured in India and is
authorized for distribution only during ‘STeP-IN SUMMIT 2014’ as per the applicable conditions.
Practices Experience Knowledge Automation
Produced By Hosted By
www.stepinforum.org www.qsitglobal.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
1
Produced by Hosted by
jMeter tutorial
By Manish Sapariya
Who am I?
Architect at kPoint Technologies Pvt Ltd.
• At kPoint we are developing video based training platform, to create
and distributed training videos with ease.
• Primary responsibilities are Testing of kPoint and managing kPoint
services cloud.
2 www.kpoint.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
2
Produced by Hosted by
Session I
jMeter basics
• Test plan components
• How to record script using jMeter
• Debug sampler
• Regex extractor
• Beanshell processor
jMeter plugins
• Ultimate thread groups
• Dummy sampler
• Graph listeners
How to run tests in console mode
How to run tests in distributed mode
3 www.kpoint.com
Session II
Hands on session
4 www.kpoint.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
3
Produced by Hosted by
Streaming test
Session III
Walk through of “kPoint kapsule streaming test”
Brief comparison of open source performance test tools
• jMeter
• Grinder
• Tsung
5 www.kpoint.com
jMeter Basics
Test Plan
• Thread group
• Controllers
• Samples
• Logical controllers
• Listeners
• Configuration elements
• Post processors
• Pre processors
• Assertions
Test Script Recorder
6 www.kpoint.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
4
Produced by Hosted by
jMeter basics
Debug sampler
Regex extractor
Beanshell processor
7 www.kpoint.com
Run from console
jmeter -n -t testplan.jmx -l listener.jtl
Few things to remember
• Generate log file using –l option, good for generating other test
results later
• Use jmeter plugins console status logger
• Gives current status of tests
• jMeter plugins graph listeners
8 www.kpoint.com
Press any key to continue
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
5
Produced by Hosted by
Run in distributed mode
Why to run in distributed mode
What are the indicators to go for distributed mode
Few things to take care of
• Same java version
• Same jMeter version
• Keep the time on all
machine synchronized
• Node specific data needs to managed
appropriately in test plan
• Higher duration for reporting results
9 www.kpoint.com
jMeter plugins
Extra set of jMeter plugins
Needs jMeter 2.8 and JRE 1.6 or above
We will discuss
• Few from Standard set
• Few from Extra set
10 www.kpoint.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
6
Produced by Hosted by
jMeter plugins
Ultimate thread group controller
Dummy sampler
Graph listeners
11 www.kpoint.com
Ultimate thread group controller
12 www.kpoint.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
7
Produced by Hosted by
Dummy sampler
Test writer can set • What is request data
• What is response code
• What is response message
• What is response time
• What is response data
Very useful for programming tests
Very useful for debugging tests
And more importantly learning jMeter
13 www.kpoint.com
Graph listeners
Graph listeners
• Hits per second
• Transactions per second
• Response time distribution
• Response time percentile
• Response time vs threads
Do try out ultimate group controller with dummy sampler
and various graph listener to
14 www.kpoint.com
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
8
Produced by Hosted by
Hands on time
15 www.kpoint.com
kPoint kapsule streaming test
What is the test
What is involved in kapsule view test
• Progressive video download
• Slide and application share data on the given timeline
• View progress updates
The purpose is to show you glimpse how comprehensive
test can be implemented using jMeter
Let’s look at the test
16 www.kpoint.com
Streaming test
STeP-IN SUMMIT 2014 Pre-Conference Tutorials Jmeter plugins - Advance scenarios
9
Produced by Hosted by
Tools comparison
jMeter/Grinder/Tsung
What's similar
• Open source
• Good community support
• Script recording support
• Support for http/https
• Support non-http protocols
What's different
• Programming interface
• jMeter -> UI based programming constructs (Underneath its XML)
• Grinder -> Jython
• Tsung -> XML
17 www.kpoint.com
Tools comparison Support for generating huge load
• jMeter -> supports distribute mode execution and result collection
• Grinder -> Very good support for running in cluster
• Tsung -> Apparently best of all 3
What's good for me, well depends
• Ease of usage
• jMeter has gui so easy to get started
• Grinder does require knowledge of python and leaves lots to the test writer
• Tsung is XML
• Application/Protocol to be tested
• jMeter has support for huge number of protocols
• Grinder do not support out of the box, but all kind of java/python libraries can be used to create different protocol tests
• Tsung has good enough set of protocol support
• Stress to be generated
• All are comparably capable
18 www.kpoint.com