performance testing using jmeter

21
Performance Testing Using Jmeter - By Rachappa Bandi

Upload: rachappa-bandi

Post on 09-May-2015

304 views

Category:

Software


8 download

DESCRIPTION

Presentation is added to know what is performance and required parameter to measure it. How load testing with Jmeter and its elements.

TRANSCRIPT

Page 1: Performance testing using jmeter

Performance Testing Using Jmeter

- By Rachappa Bandi

Page 2: Performance testing using jmeter

Testing to determine how a system performs in terms of responsiveness and stability under the given workload.

It can also serve to investigate scalability, reliability and resource usage.

What is Performance Testing

Page 3: Performance testing using jmeter

To demonstrate that the system meets performance criteria. To compare two systems to find which performs better. To measure what parts of the system or workload causes the

system to perform badly.

Speed - Does the application respond quickly enough for the intended users?

Scalability – Will the application handle the expected user load and beyond? (AKA Capacity)

Stability – Is the application stable under expected and unexpected user loads? (AKA Robustness)

Confidence – Are you sure that users will have a positive experience on go-live day?

Why we do performance testing

Page 4: Performance testing using jmeter

Performance Testing Load Testing Stress Testing Capacity Testing Endurance Testing Spike Testing

Performance Test Types

Page 5: Performance testing using jmeter

Load Testing behavior of the system under a specific

expected load Concurrency Speed/Throughput

Stress Testing the upper limits of capacity within the system

Scalability/Stability

Performance Test Types

Page 6: Performance testing using jmeter

• Benchmark testing Compare competitive product Check performance with previous builds

Performance Test Types

Page 7: Performance testing using jmeter

Response time User concerns

Throughput Business concerns

Resource utilizations System concerns

What we measure

Page 8: Performance testing using jmeter

Project assessment Goals/Scoping: “What do you want to achieve?”

Methodology/Planning “How do you plan to achieve it?”

Implementation/Execution “Doing what you planned”

Validation/Evaluation “Did you achieve your goals?”

Results/Interpretation “What does the output of the testing mean?”

Phases of Performance Testing

Page 9: Performance testing using jmeter

Performance Test Cycle

Page 10: Performance testing using jmeter

Tools

Free/Open source tools JMeter

Commercial tools Load Runner Webload

Other useful tools Httpwatch YSlow

Page 11: Performance testing using jmeter

Introduction to JMeter

Page 12: Performance testing using jmeter

What is JMeter

Performance testing tool (like LoadRunner, WebLoad, OpenSTA , etc)

It supports performance testing of:

Web application Web services (SOAP and REST) Database query performance Mail - SMTP(S), POP3(S) and IMAP(S) JMS Mobile

Apache Project - http://jmeter.apache.org/

100% pure Java desktop application

Originally developed by Stefano Mazzocchi

Page 13: Performance testing using jmeter

Features of JMeter

• Load and performance test various protocols - HTTP(S), FTP, JDBC, JMS, LDAP, SOAP

•HTTP proxy server for recording test scripts

•Platform Independent

•Execution can do in batch mode and analyze offline.

•Distributed testing.

•Extensible. – Plugins (https://code.google.com/p/jmeter-plugins/)

Page 14: Performance testing using jmeter

Test Architecture

Page 15: Performance testing using jmeter

Strengths

• Free and open source

• Active development/ community

• Extensibility

• Capability of dynamic scripting/ generate load/ and reporting

• Supports automation (Maven with Jenkins CI for performance testing in regression mode)

• Cloud compatibility

Page 16: Performance testing using jmeter

Weaknesses

• Memory management issuesBut …adjust Heap memory/ use 64-bit version/ run non-GUI

mode

• Reports are a bit lackingBut... Plugins provides many

• Steep learning curveLack of Training opportunities and require technical skills

• Limited Support No dedicated support like commercial tools

Page 17: Performance testing using jmeter

• The latest version of JMeter can be downloaded from the project website: http://jmeter.apache.org/download_jmeter.cgi

• JMeter requires a fully compliant JVM 1.6 or higher.You need Java, with the JAVA_HOME environment variable set.

• To install a release build, simply unzip the zip/tar file into the directory where you want JMeter to be installed.

• To run JMeter, run the jmeter.bat (for Windows)• or jmeter.sh (for Unix) file.

Setting Up and Running JMeter

Page 18: Performance testing using jmeter

• Test Plan: where the overall settings for a test are specified.

• Thread groups: defines a pool of users that will execute a particular test case against your server.

• Samplers: sends requests to a server• Logical controllers : control flow of test plan (loops, conditionals, ordering,

etc.)• Listeners: record, summarize and display record and response data• Timers: introduce delays in test plan• Assertions: assert facts about responses, for functional testing• Configuration elements: Configuration Elements set default values for other

parts of the Test Plan as well as configure variables.• Pre-processors and post-processors

• Workbench :It provides a place to temporarily store test elements while not in use for copy/paste purposes • JMeter Proxy Server : watch and record your actions while you browse your

web application with your normal browser

JMeter Elements

Page 19: Performance testing using jmeter

Demo

Page 20: Performance testing using jmeter
Page 21: Performance testing using jmeter