Apache JMeter Introduction on MAC

Commend Version

You can install by HomeBrew

  1. Install HomeBrew

To install HomeBrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

It should take only a couple of minutes. Before installing JMeter, let’s now update HomeBrew package definitions:

brew update

Make sure to update brew before installing JMeter, otherwise you may run into issues like this one:

==> Downloading http://www.apache.org/dyn/closer.cgi?path=jmeter/binaries/ap‌ache-jmeter-2.11.tgz ==> Best Mirror http://apache.mirrors.hoobly.com/jmeter/binaries/apache-jmet‌er-2.11.tgz curl: (22) The requested URL returned error: 404 Not Found Error: Failed to download resource "jmeter" Download failed: http://apache.mirrors.hoobly.com/jmeter/binaries/apache-jmet‌er-2.11.tgz

This issue happens often when a new JMeter version is available, but your local HomeBrew package definition still points to the old version.

It’s almost finished now, run:

brew install jmeter

If you wish to install jmeter-plugins along with JMeter, add the --with-plugins flag. After a couple of minutes, JMeter should be installed and ready to use.

  1. Launch HomeBrew

JMeter should be now available as a command-line, try jmeter -? and you should see something like:

macos:~ macos$ jmeter -?
Writing log file to: /Users/macos/jmeter.log
    _    ____   _    ____ _   _ _____       _ __  __ _____ _____ _____ ____     
   / \  |  _ \ / \  / ___| | | | ____|     | |  \/  | ____|_   _| ____|  _ \   
  / _ \ | |_) / _ \| |   | |_| |  _|    _  | | |\/| |  _|   | | |  _| | |_) | 
 / ___ \|  __/ ___ \ |___|  _  | |___  | |_| | |  | | |___  | | | |___|  _ <  
/_/   \_\_| /_/   \_\____|_| |_|_____|  \___/|_|  |_|_____| |_| |_____|_| \_\ 3.3 r1770033

Copyright (c) 1999-2017 The Apache Software Foundation


....

To Launch JMeter, simply run:

macos:~ macos$ jmeter

  1. Configure JMeter

JMeter’s configuration files are located in the following directories:

Item Standard
Plugins folder JMETER_HOME/lib/ext/

Library folder for plugin dependencies Configuration folder | JMETER_HOME/bin/

Item Homebrew
Plugins folder CELLAR_HOME/jmeter/3.1/libexec/lib/ext
Library folder for plugin dependencies CELLAR_HOME/jmeter/3.1/libexec/lib/
Configuration folder CELLAR_HOME/jmeter/3.1/libexec/bin/

With the following constants:

  • JMETER_HOME: JMeter’s home, usually like /home/ubuntu/jmeter-3.x
  • CELLAR_HOME: should be /usr/local/Cellar.

GUI Version

Excute the commond: sh jmeter

Writing log file to: /path/apache-jmeter-3.1/bin/jmeter.log
================================================================================
Don't use GUI mode for load testing, only for Test creation and Test debugging !
For load testing, use NON GUI Mode & adapt Java Heap to your test requirements
================================================================================

And you will see the GUI model:

jmeter

Leave a Reply

Your email address will not be published. Required fields are marked *