Skip to content

JMeter

Reusable Sample JMeter Scripts

This blog post aims to be a collection of sample JSR223, Beanshell and other useful reusable scripts. Use them freely in your JMeter projects to leverage the power of JMeter! Reuse them in JSR223 samplers directly as is, or modify them to fit your needs.

Many other example JSR223 samples can be found in our documentation.

Log a Message

log.info("This is the log for INFOR level");
log.warn("This is the log for WARNING level");
log.error("This is the log for ERROR level");

How to Install JMeter on a Mac

You have always wanted to use JMeter, on your Mac, but you don't know how to get started. You might have downloaded JMeter so far, so now how do you get that software installed, up and running? Running a Java program on a Mac isn't obvious so we are going to explain how to install and run JMeter within minutes using a few command lines.

The great thing is JMeter is a Java program. Java programs are designed to be portable to Windows, Linux and MacOS.

Install HomeBrew

First, we are going to install HomeBrew:

Homebrew is a package manager for MacOS. It enables the user to install / update / remove applications at ease with a nice command line interface.

Enable Gzip Compression In JMeter

You're probably asking yourself: How can I enable Compression support in JMeter?

JMeter can use up to 10x more bandwidth when compression is disabled.

Learn how to configure JMeter to support Request and Response Compression like GZip.

HTTP Compression

As explained on HTTP Compression, the client advertises itself as capable of handling various compression formats:

GET /encrypted-area HTTP/1.1
Host: www.example.com
Accept-Encoding: gzip, deflate

JMeter Result Analysis: The Ultimate Guide

I'm sure you agree that: There are so many ways to collect and interpret JMeter Results, you feel lost.

Well, it turns out after reading this post, you will know 12 different ways to collect and analyze results!

We're going to explore every single possible way to get insightful metrics, including graphs, charts, tables, html reports and more. JMeter is such a complex tool with so many amazing possibilities that it becomes difficult to know what to do.

This ultimate guide about How To Analyze JMeter Results will jump start your JMeter knowledge.

JMeter Out Of Memory: 12 Actionable Fixes

If you're here, it's because you've probably experienced Java Heap Space exceptions while running JMeter. Isn't it?

JMeter Out Of Memory exceptions happen during a heavy load tests, with the following log lines appearing in jmeter.log:

2017/10/01 13:35:16 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.OutOfMemoryError: Java heap space

It can also be a message like Unable to create new native Thread. Don't panic!

You'll learn 12 ways to get ride of memory issues and get a better understanding of how the JVM works.