Skip to content
  • Services
  • About
  • Partners
  • Work
  • Insights
  • Careers
  • Contact
  • Services
  • About
  • Partners
  • Work
  • Insights
  • Careers
  • Contact
August 4, 2015

Jmeter for Performance Testing

DevOps, Quality Assurance

We all agree how important functional automated testing is, however not many applications go through a complete round of performance testing. Here are some of the reasons why everyone should make Performance testing an integral part of their software development process.

    • – Capacity Planning

 

    • – Scalability & Stability

 

    • – Average online shopper expects your site to load in 2 seconds

 

    • – Consumers will not wait for more than 3 seconds fro a page to load

 

    – Revenues lost due to poor performing applications

JMeter

There are a ton of tools and services that are available to meausre your application performance, but we will be talking about Jmeter and it’s concepts.

Why Jmeter?

    • – Open Source – no licensing cost

 

    • – Portable. Runs on any OS that supports Java

 

    • – Easy to use (little or no Programming)

 

    • – Very Large user community, easy to find answers to questions.

 

    • – Can be integrated with any CI tool

 

    • – Can be extended to fit your needs.

 

    • – JSR232 support

 

    – Can be easily scaled to test large scale applications.

Steps for designing a succesful load test

  1. Record a transaction using the proxy
  2. Save the recorded session as a thread group
  3. Modify or update the samples to handle dynamic content
  4. Add other necessary config elements to the test plan.
  5. Setup duration and number of threads/Users to simulate
  6. Add listeners to view results

This will be a series of blog posts of various techniques on performance testing using jmeter. In this post I will walk you through how to get started and record your first script.

Installation

    • – The only prerequisite is java, so make sure you have the most recent version of Java installed

 

    • – Download the binaries from the apache Jmeter’s site (http://jmeter.apache.org/)

 

    • – Extract the archive and extract to a folder

 

    • – There are scripts in the bin folder which you can use to open the Jmeter UI

 

    • – If you are using a Mac or Linux desktop you will need to make the jmeter.sh is executable (chmod +x jmeter.sh)

 

    – Running the jmeter.sh or the jmeter.bat file will open up the Jmeter GUI.

JMeter GUI

Recording

To record your first script right click on the workbench -> add -> Non Test Elements -> Http Test Script Recorder
There are various options to choose when you are recording a transaction. I feel the best option to chosse is “Store 1st Sampler”. This option helps us record just the first request and is more than sufficient to simulate the intended action. You can leave the rest of the options as is.

Http Test Script Recorder

Click the Start button and your Jmeter Recorder is ready to start capturing http traffic. Now setup a browser to use port 8080 as a proxy. You can do that by going to your browser network settings and entering localhost:8080 for you proxy. Navigate to any application using that browser instance and you should see samplers being captured under the HTTP test script recorder

Thread Group

Add a new thread group under your Test Plan and drag and drop all the recorded samples to your newly created thread group.

Thread Group

This is just a very basic test. Feel free to click the Green arrow and run it but you will not see much as there are no listeners added. In the next post I will show you how to edit a thread group to handle dynamic content and also how to debug the scripts.

Posted in DevOps, Quality Assurance
Share this

Bharath Khambadkone

Bharath Khambadkone loves to automate and break systems by writing automated functional and performance tests. His favourite test frameworks/tools are cucumber, watir-webdriver, selenium, and JMeter. When Bharath is away from the keyboard he loves to spend time with family, hit the links, and aspires to be a Champions Tour Player. During his time with Modus Create, Bharath was a Sr. QA/DevOps Engineer.
Follow

Related Posts

  • Performance Remediation using New Relic and JMeter: To Fix Bad Performance, You Have To Profile
    New Relic and JMeter Performance Remediation - Part 1

    When everything is on fire, where should you throw the first bucket of water? To…

  • Performance Remediation using New Relic and JMeter: To Fix Bad Performance, You Have To Profile
    New Relic and JMeter Performance Remediation - Part 1

    When everything is on fire, where should you throw the first bucket of water? To…

Subscribe to the Modus Newsletter

Receive the latest blog articles and insights every month from the Modus team.

Let's Chat

If forms aren’t your thing, you can always call us (+1-855-721-7223).

Modus-Logo-Primary-White.svg
  • Services
  • About
    • Newsroom
  • Partners
  • Work
  • Insights
    • Blog
    • Modus Labs
  • Careers
Virginia (US)

12100 Sunset Hills Road
Suite 150
Reston, Virginia, 20190
Tel: +1-855-721-7223

California (US)
12130 Millennium Dr

Los Angeles, CA 90094

Missouri (US)
609 E High St

Jefferson City, MO 65101

Romania

Str. Mihai Veliciu, no. 17
Cluj-Napoca, Romania
Tel: +40-0786-887-444

Costa Rica

2nd Floor, Plaza Koros, Av 3
San José, Santa Ana, Costa Rica

© 2021 Modus. All Rights Reserved.

Privacy Policy | Accessibility Statement | Sitemap

This website uses cookies.
These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information in order to improve and customize your browsing experience, and for analytics and metrics about our visitors both on this website and other media. To find out more about the cookies we use, see our Privacy Policy.

Accept
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.

Scroll To Top