AN INTRODUCTION TO PERFORMANCE TESTING USING JMETER

Similar documents
jmeter is an open source testing software. It is 100% pure Java application for load and performance testing.

SOFTWARE PERFORMANCE TESTING TIPS WITH JMETER

USING APPIUM FOR MOBILE TEST AUTOMATION

Performance Testing: A Comparative Study and Analysis of Web Service Testing Tools

Introduction Installation and Startup JMeter GUI

Web Hosting. Important features to consider

Word: Print Address Labels Using Mail Merge

Adobe Flex Tutorial i

THE AUDIENCE FOR THIS BOOK. 2 Ajax Construction Kit

Adding content to your Blackboard 9.1 class

Guide to Install J Meter

MD Link Integration MDI Solutions Limited

Using GitHub to Share with SparkFun a

Improved Web Development using HTML-Kit

Accuterm 7 Usage Guide

Getting Started. Excerpted from Hello World! Computer Programming for Kids and Other Beginners

Here we will look at some methods for checking data simply using JOSM. Some of the questions we are asking about our data are:

CheckBook Pro 2 Help

ENCM 339 Fall 2017: Editing and Running Programs in the Lab

Using JMeter. Installing and Running JMeter. by Budi Kurniawan 01/15/2003

Lesson 1 Raster Design. Successful Saving

CHAPTER 1 COPYRIGHTED MATERIAL. Finding Your Way in the Inventor Interface

Aim behind client server architecture Characteristics of client and server Types of architectures

Open source tools used in effective testing

Prepared by JMeter Group, Summer Interns

Microsoft Expression Web Quickstart Guide

The manufacturer has released new improved firmware which upgrades your O2 USB Modem. To install it follow the instructions below.

HERO LAB ONLINE FOR STARFINDER

Welcome Back! Without further delay, let s get started! First Things First. If you haven t done it already, download Turbo Lister from ebay.

Section 1. How to use Brackets to develop JavaScript applications

This section contains information you should review before using this book. Any updates to the information presented here will be posted at:

What is WordPress? WordPress.org vs. WordPress.com

SAMPLE CHAPTER SECOND EDITION. Don Jones Jeffery Hicks Richard Siddaway MANNING

INTRODUCTION. 2

Mehran Sahami Handout #5 CS 106A September 26, 2018 Downloading Eclipse

RouteOp. Step 1: Make sure requirements are met.

GW Box User Guide. Have additional questions? Visit community.box.com for more information and training resources. Contents... 1

Using HTML Kit to Debug Server-Side Scripts

S A M P L E C H A P T E R

Weebly 101. Make an Affordable, Professional Website in Less than an Hour

Launch Store. University

the NXT-G programming environment

Interface. 2. Interface Adobe InDesign CS2 H O T

Google Drive: Access and organize your files

Using Dreamweaver. 1 Overview. About the Web. About Dreamweaver

An administrator s guide

Nextcloud 13: How to Get Started and Why You Should

Web Server Setup Guide

Customizing DAZ Studio

How to Stay Safe on Public Wi-Fi Networks


G-WAN. Complete install process for Ubuntu (both for the 32 and the 64 OS versions).

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Good afternoon, everyone. Thanks for joining us today. My name is Paloma Costa and I m the Program Manager of Outreach for the Rural Health Care

Mehran Sahami Handout #5 CS 106A September 27, 2017 Downloading Eclipse

Workshop. Import Workshop

Etanova Enterprise Solutions

Hello World! Computer Programming for Kids and Other Beginners. Chapter 1. by Warren Sande and Carter Sande. Copyright 2009 Manning Publications

Mitchell Bosecke, Greg Burlet, David Dietrich, Peter Lorimer, Robin Miller

Introduction. 1.1 Who this book is for. This chapter covers. What the book will and won t teach The boundaries of this book Going beyond PowerShell

This is a book about using Visual Basic for Applications (VBA), which is a

Here we will look at some methods for checking data simply using JOSM. Some of the questions we are asking about our data are:

RavenDB & document stores

Choose OS and click on it

Getting Up and Running

CSCI 1100L: Topics in Computing Lab Lab 11: Programming with Scratch

How the Web Works. Chapter 1. Modified by Marissa Schmidt Pearson

COSC 2P95. Introduction. Week 1. Brock University. Brock University (Week 1) Introduction 1 / 18

Happy Birthday, Ajax4jsf! A Progress Report

CS354 gdb Tutorial Written by Chris Feilbach

Media-Ready Network Transcript

Welcome to the wonderful world of Dreamweaver 8. If you re an experienced

Here is a complete outline of the entire course as it is currently planned (contents approximate):

Creating Simple Links

TOP DEVELOPERS MINDSET. All About the 5 Things You Don t Know.

CSCI 201 Lab 1 Environment Setup

Are You Avoiding These Top 10 File Transfer Risks?

2 Initialize a git repository on your machine, add a README file, commit and push

Unlocking Hidden Outfits

Getting started with GitHub

IBM Atlas Policy Distribution Administrators Guide: IER Connector. for IBM Atlas Suite v6

(p t y) lt d. 1995/04149/07. Course List 2018

Web Host. Choosing a. for Your WordPress Site. What is web hosting, and why do you need it?

Ruby on Rails Welcome. Using the exercise files

Lifehack #1 - Automating Twitter Growth without Being Blocked by Twitter

COMMUNICATION PROTOCOLS

Programming: Computer Programming For Beginners: Learn The Basics Of Java, SQL & C Edition (Coding, C Programming, Java Programming, SQL

DOCS

Download Free Pictures & Wallpaper from the Internet

This book is about using Visual Basic for Applications (VBA), which is a

Mobile App:IT. Methods & Classes

Using Mail Merge in Microsoft Word 2003

Part 1 - Your First algorithm

Panopto Recording Guide

MDM is Calling: Does Your Business Have an Answer? arrival. Here To Go. Lunch Dinner. continue. Riiinnggg. Dec. 12

Reading How the Web Works

Chapter 3. Revision Control

How To Manually Uninstall Adobe Reader X Files Office

CLOUND COMPUTING II STUDY NOTES. Unit 1. Introduction to Cloud Computing

MICRO DIGITAL: TECHNICAL CRITERIA FOR MAKING THE RTOS CHOICE

Transcription:

AN INTRODUCTION TO PERFORMANCE TESTING USING JMETER

D eveloping online applications? Worried about performance? You should consider adding JMeter to your testing toolbox. In this tutorial, we re going to walk through the basics of setting up JMeter, one of the most popular open source tools used in performance testing for web-based applications. While this is a technical tutorial, it s meant to be introductory. If you re an experienced programmer, this will go pretty quickly. Even if you don t have programming experience, you ll be able to follow along, though JMeter has a graphical user interface. And if you re already familiar with JMeter, connect with us and tell us what aspects of JMeter you'd like more information about. And feel free to share JMeter problems you've encountered. WHY USE JMETER? J Meter isn t the only load testing or performance measuring tool out there, but it has a lot going for it. Part of that is due to the software s age. JMeter s first release was in 998, so it s had plenty of time to grow and evolve. JMeter keeps improving, especially when it comes to testing web applications: Open source: JMeter is open source. Anyone can update and modify JMeter for their own uses. It s adaptable and extensible to a wide variety of projects. all sorts of special cases, letting us quickly adapt existing technology to new projects. And the plugin-based architecture means that you don t need to mess around with configurations and tweaks that aren t relevant to whatever you re working on. Java-based Given that Java is one of the most popular programming languages out there, you can easily hire staff or contractors who can use JMeter (with a little bit of education). Well-maintained: While JMeter would be able to vote this year if it were a person, it s been thoroughly modernized. The most recent release, Version 3., came out in November and works with Java 7+. Reporting: JMeter has extensive built-in reporting capabilities. Good reports are invaluable because you can fix problems without sinking too much time into analysis. Extendable: JMeter is designed around plugins, even for core functionality. JMeter users have built plugins for CONTACT US AT SERVICES@

WHEN JMETER ISN T THE SOLUTION JMeter is a great tool, but it shouldn t be your only tool. While all problems may start to look like nails when you only have a hammer, life is a lot easier when you have other options in your toolbox. JMeter is best suited for testing web applications. In particular, you can design and execute load and performance tests with many different applications, servers and protocol types including: Web - HTTP, HTTPS (Java, NodeJS, PHP, ASP.NET, ) SOAP / REST Webservices FTP Database via JDBC LDAP Message-oriented middleware (MOM) via JMS Mail - SMTP(S), POP3(S) and IMAP(S) Native commands or shell scripts TCP Java Objects INSTALLATION T o start, you ll need to install JMeter on your computer. JMeter requires Java. Let s check if you have Java installed. Open the terminal or console for your operating system and type the following commands: If you get any sort of error message that shows you don t have Java installed, you can follow these instructions to set up the Java Development Kit on your computer. Next, you ll set the environment variable (so your computer knows where to look for JMeter files, once you install them). For Windows (in Command Console): c:\> java -version For Mac (in Terminal): machine ~ machinename$ java -version For Linux (in Command Terminal): $ java -version For Windows (in Command Console): Set the environment variable JAVA_HOME to C:\Program Files\Java\jdk.7.0_25 For Mac (in Terminal): export JAVA_HOME=/Library/Java/Home For Linux (in Command Terminal): export JAVA_HOME=/usr/local/java-current 2 CONTACT US AT SERVICES@

Now, you can install JMeter from the Apache Software Foundation. Follow their directions and get the downloadable files on their website. Once JMeter is installed, you can open the program. The file name will depend on your operating system: For Windows (in Command Console): jmeter.bat For Mac (in Terminal): jmeter.sh For Linux (in Command Terminal): jmeter.sh The graphical user interface for JMeter should launch. Figure shows the JMeter interface upon launching JMeter. Figure. Launching JMeter 3 CONTACT US AT SERVICES@

WRITING A TEST PLAN T est plans are the container JMeter uses for running your workbench. JMeter will set up a workbench automatically with tests. A test plan defines what you want to test and how to do so. your test plan, so you ll have a place to temporarily store test elements as you work. If you do recordings, this is when the workbench is most helpful as the workbench will Within a test plan, you ll have at least one thread group. If automatically store test elements. However and this is you re not familiar with Java, a thread group is a convenient important! when you save your test plan, your workbench way to group the tasks that a particular program performs. items are not saved with it. See Figure 2. When you first launch JMeter, you ll need to create a test plan. When you start up JMeter, there will be a blank test plan and Figure 2. Saving Your Test Plan 3 CONTACT US AT SERVICES@

Your new test plan is blank, though: it won t test much of anything until you add elements to it. You can either add, merge, or open new and existing elements to your test plan by right-clicking on your test plan in the JMeter File menu as shown in Figure 3. Figure 3. Adding Elements to Your Test Plan A test plan describes a series of steps JMeter will execute when run. A complete test plan will consist of one or more Thread Groups. Try adding a thread group element to your test plan: Right click on Test Plan on the existing tree elements. Choose Add > Threads (Users) > Thread Group. See Figure 4 on the next page. 4 CONTACT US AT SERVICES@

Figure 4. Adding Threads Next, let s save your new test plan. It may be early in the process, but saving early and saving often can prevent a lot of trouble down the line. Use either Save or Save Test Plan As, under the File menu shown in Figure 5. Figure 5. File Menu; Saving a Test Plan 5 CONTACT US AT SERVICES@

RUNNING A TEST PLAN R unning your test plan is easy when you have JMeter s interface open. Under the Run menu, just click Start as shown in Figure 6 on the next page. Figure 6. Running a Test Plan 6 CONTACT US AT SERVICES@

STOPPING A TEST U sually we will not stop a script. However sometimes we need to stop it for some instances, verifying an error, debugging a script, noting an incomplete or incorrect configuration, etc. You have two options in the Run menu: Stop, which will stop all threads immediately if possible. Shutdown, which will request all threads to stop at the end of any current work. See Figure 7. Figure 7. Stopping Execution 7 CONTACT US AT SERVICES@

These steps are just the beginning. You can do a lot more within JMeter, especially once you ve added some plugins. Some of the most common plugins that we use include: JSON Plugins (jp@gc - JSON Path Extractor): Allows extracting values from JSON responses using JSONPath syntax. It also has JSONPath Assertion. See Figure 8. Figure 8. JSON Plugin Stepping Thread Group: JMeter has only one out-of-the-box option for thread (users) scheduling: simple ramp-up. But many users, especially with HP LoadRunner experience miss a more flexible thread scheduling algorithm. Stepping Thread Group adds to JMeter thread scheduling similar to LoadRunner s. Some of the features of Stepping Thread Group include: preview graph showing estimated load initial thread group delay to combine several thread group activities increase load by portions of threads (users) with ramp-up period configurable hold time after all threads started decrease load by portions 8 CONTACT US AT SERVICES@

Figure 9. Stepping Thread Group plugin Parameterized Controller: if you need to reuse parts of a test plan like regular programming language functions and procedures, especially calling repeating sequences of the same action with different parameters, Parameterized Controller can provide this function. See Figure 0. Figure 0. Parameterized Controller These are just a few of the plugins available that we use often to customize and add to JMeter s capabilities. So click around, add some plugins, and experiment with all of JMeter s features. And if you run into problems, let us know. We ve seen most of them over our many years in working with JMeter and we re happy to help. Just contact us. 9 CONTACT US AT SERVICES@

ABOUT XBOSOFT XBOSoft is a software testing and quality assurance company that offers services in web, mobile and desktop applications, as well as broad domain experience with extended expertise in healthcare, finance, and software security. XBOSoft s quality process assessments and test methodologies speed products to market and improve our clients software quality and performance throughout the software s life cycle. With a proven track record working for Fortune 00 companies to small independent developers, XBOSoft today has over 00 employees in San Francisco and Beijing serving clients in the US and Europe. As the firm surpasses its tenth year of continuous growth, XBOSoft proudly offers its full range of testing and quality assurance as both on and off-shore services. CONTACT XBOSOFT PHONE: + 703 995 9896 0 EMAIL: services@xbosoft.com CONTACT US AT SERVICES@