getting started with apache jmeter

20
Getting Started with Apache-Jmeter Presenter: Charan Sethi, Mindfire Solutions Date: 19/05/2014

Upload: mindfire-solutions

Post on 10-May-2015

875 views

Category:

Software


2 download

DESCRIPTION

This presentation provides an Overview on Performance Testing and Getting Started with Apache Jmeter.

TRANSCRIPT

Page 1: Getting Started with Apache Jmeter

Getting Started with Apache-Jmeter

Presenter: Charan Sethi, Mindfire SolutionsDate: 19/05/2014

Page 2: Getting Started with Apache Jmeter

Name: Charan SethiOrganization: Mindfire Solutions

Skills : ManualTesting FunctionalTesting TestCaseCreation TestCaseExecution WebApplicationTesting JMeter DeviceTesting BankingAndFinanceDomain BasicKnowledgeOfAdobeInsdesign BasicsOfFinancialMarkets ExploratoryTesting

Connect Me :Facebook : https://www.facebook.com/charan.sethi.7Google+ : https://plus.google.com/u/0/108017116741601716455/about

Contact Me :Email : [email protected] / [email protected]: mfsi_charansethi

ABOUT ME

Page 3: Getting Started with Apache Jmeter

AGENDA

-Performance Testing and Objectives-Initial steps before starting the Project.-Examples of Client Requests and scenarios.-Jmeter Installation-A Basic Jmeter Test

Page 4: Getting Started with Apache Jmeter

Performance Testing

In software engineering, performance testing is in general testing performed to determine how a system performs in terms of responsiveness and stability under a particular workload. It can also serve to investigate, measure, validate or verify other quality attributes of the system, such as scalability, reliability and resource usage.

Goal is to find Bottlenecks and improve the User Experience

Page 5: Getting Started with Apache Jmeter

Testing types

Load testing: A type of performance testing conducted to evaluate the behavior of a component or system with increasing load, e.g. numbers of parallel users and/or numbers of transactions, to determine what load can be handled by the component or system

Stress testing: A type of performance testing conducted to evaluate a system or component at or beyond the limits of its anticipated or specified workloads, or with reduced availability of resources such as access to memory or servers

Spike Testing: Spike testing is done by suddenly increasing the number of or load generated by users - by a very large amount - and observing the behaviour of the system. The goal is to determine whether performance will suffer, the system will fail, or it will be able to handle dramatic changes in load.

Page 6: Getting Started with Apache Jmeter

Volume Testing: Testing where the system is subjected to large volumes of data

Soak testing: Soak testing, also known as endurance testing, is usually done to determine if the system can sustain the continuous expected load. During soak tests, memory utilization is monitored to detect potential leaks. Also important, but often overlooked is performance degradation. That is, to ensure that the throughput and/or response times after some long period of sustained activity are as good or better than at the beginning of the test. It essentially involves applying a significant load to a system for an extended, significant period of time. The goal is to discover how the system behaves under sustained use.

Testing types

Page 7: Getting Started with Apache Jmeter

Performance Goals:

->It can demonstrate that the system meets performance criteria.-->It can compare two systems to find which performs better.→ It can measure what parts of the system or workload causes the system to perform badly.

Performance Goals and Important terms

Concurrency/throughputIf a system identifies end-users by some form of log-in procedure then a concurrency goal is highly desirable. By definition this is the largest number of concurrent system users that the system is expected to support at any given moment. The work-flow of a scripted transaction may impact true concurrency especially if the iterative part contains the log-in and log-out activity.

If the system has no concept of end-users then performance goal is likely to be based on a maximum throughput or transaction rate. A common example would be casual browsing of a web site such as Wikipedia.

Server response timeThis refers to the time taken for one system node to respond to the request of another. A simple example would be a HTTP 'GET' request from browser client to web server. In terms of response time this is what all load testing tools actually measure. It may be relevant to set server response time goals between all nodes of the system.

Page 8: Getting Started with Apache Jmeter

Many performance tests are undertaken without due consideration to the setting of realistic performance goals. The first question from a business perspective should always be "why are we performance testing?". These considerations are part of the business case of the testing

Performance Objectives

→ Reliability: To know how reliable the application is.→ Determine if the application complies with contracts, regulations, and service level

agreements (SLAs).→ Detect bottlenecks to be tuned.→ Assist the development team in determining the performance characteristics for various configuration options.→ Provide input data for scalability and capacity-planning efforts.→ Determine if the application is ready for deployment to production.→ Review the architecture→ Review the Test Plan→ Ask Team Members

Page 9: Getting Started with Apache Jmeter

Questions to ask:

What is our anticipated average number of users (normal load) ?

What is our anticipated peak number of users ?

When is a good time to load-test our application (i.e. off-hours or week-ends), bearing in mind that this may very well crash one or more of our servers ?

Does our application have state ? If so, how does our application manage it (cookies, session-rewriting, or some other method) ?

What is the testing intended to achieve?

Initial steps before starting the Project.

Understanding the application is a must. Understanding the Business Scenarios can really help clear up the mind and aligning with what needs to be done and how this can be achieved

Page 10: Getting Started with Apache Jmeter

Examples of Client Requests and scenarios.

Page 11: Getting Started with Apache Jmeter

About Jmeter The Apache JMeter™ desktop application is open source software, a 100% pure Java application designed to load test functional behavior and measure performance. It was originally designed for testing Web Applications but has since expanded to other test functions.

Apache JMeter features include:

Ability to load and performance test many different server/protocol types:Web - HTTP, HTTPSSOAPFTPDatabase via JDBCLDAPMessage-oriented middleware (MOM) via JMSMail - SMTP(S), POP3(S) and IMAP(S)MongoDB (NoSQL)Native commands or shell scriptsTCPComplete portability and 100% Java purity .Full multithreading framework allows concurrent sampling by many threads and simultaneous sampling of different functions by separate thread groups.Careful GUI design allows faster Test Plan building and debugging.

Page 12: Getting Started with Apache Jmeter

Jmeter Installation

→ Jmeter is a Java application, so a JRE or SDK first needs to be installed

→ Go to http://jmeter.apache.org/download_jmeter.cgi

→ Download Jmeter, and install by unzipping the .zip or .tgz file in any directory.

→ Go to jakarta-jmeter Directory (Directory in which the .zip of .tgz file is unzipped)

→ Type ./bin/jmeter on command prompt(for Unix) or Run bin/jmeter.bat (for Windows)

→ JMeter is ready to test application.

Page 13: Getting Started with Apache Jmeter

A Basic Test

Page 14: Getting Started with Apache Jmeter

Jmeter Basic test

→ Add Thread Group element

→ Define Number of Users and Ramp up Time

→ Adding Cookie Support

→ Adding Samplers

→ Adding Listeners

Page 15: Getting Started with Apache Jmeter

Record and Play

Page 16: Getting Started with Apache Jmeter

→ Set up proxy in Browser

→ Add Test Script Recorder from in workbench from Non Test Elements

→ Select Recording Controller/HTTP Test Script Recorder/Test Plan on Test Script Recorder

Window to tell Jmeter where to Capture results

→ Click Start

→ Perform Action on Application under Test and see whether Actions are being captured

Page 17: Getting Started with Apache Jmeter

Question and Answer

Page 18: Getting Started with Apache Jmeter

Presenter: Charan Sethi, Mindfire Solutions

Thank you

Page 19: Getting Started with Apache Jmeter

Presenter: Charan Sethi, Mindfire Solutions

References→ apache.jmeter.org

→ wikipedia

→ ISTQB Glossary

Page 20: Getting Started with Apache Jmeter

www.mindfiresolutions.com

https://www.facebook.com/MindfireSolutions

http://www.linkedin.com/company/mindfire-solutions

http://twitter.com/mindfires