## What is JMeter? From: [Apache JMeter's homepage](https://jmeter.apache.org/index.html) > The Apache JMeter™ 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. ## What is JMeter ISO-8583? From: [JMeter ISO-8583 Readme.md](https://github.com/tilln/jmeter-iso8583#overview) > Apache JMeter plugin for load testing of payment gateways and switches via ISO-8583 messaging, based on the excellent jPOS framework ## Installation > NOTE: We recommend using release 1.1 and above, as it includes a new [Crypto PreProcessor](https://github.com/tilln/jmeter-iso8583#crypto) and a set of [Crypto functions](https://github.com/tilln/jmeter-iso8583#functions) to handle things such as PIN Block encryption, MAC Generation, etc. 1. Install [apache-jmeter](https://jmeter.apache.org/) 1. Download latest binary release from [jmeter download page](https://jmeter.apache.org/download_jmeter.cgi) 2. Untar/unzip downloaded file 2. Starting the GUI 1. Just execute `jmeter` in JMeter’s `bin` directory. 3. [Install](https://github.com/tilln/jmeter-iso8583#installation) [jmeter iso8583 plugin](https://github.com/tilln/jmeter-iso8583). To use the latest stable release you can perform one of the following steps: * Use [JMeter PluginsManager plugin](https://github.com/tilln/jmeter-iso8583#via-pluginsmanager) (**recommended** although sometimes the plugins manager doesn't work on a fresh install) * If the above doesn't work, you can download a **prebuilt package** ([release 1.1](https://jmeter-plugins.org/files/packages/tilln-iso8583-1.1.zip)) and unzip it into JMeter's root directory (where `lib` resides) . You will need to restart jMeter. * [Manual Download](https://github.com/tilln/jmeter-iso8583#via-manual-download), you need to download the iso8583 jar and dependencies manually one by one. You will need to restart jMeter. ## Basic Usage ### Starting the GUI and Creating a Test Plan Just execute `jmeter` in JMeter’s `bin` directory. > NOTE: The GUI mode is mostly for defining test plans, it's not recommended to use the GUI for performance testing, especially on a slow machine with little memory. It works OK if you only define one or two light listeners. JMeter is relatively simple, but it has lots of options, built-in and custom plugins, each with many options. In its simplest form, the first thing we need to do is create a [**Test Plan**](https://jmeter.apache.org/usermanual/build-test-plan.html) (a default, empty one is already created when you start, but you can rename it) and then start adding **elements** to it by doing *right-click* on the Test Plan. ### Add a Thread Group Right-click on the Test Plan to [add a Thread Group](https://jmeter.apache.org/usermanual/build-test-plan.html) The Thread Group has controls for the number of concurrent threads, a loop count to specify the number of times each thread group will be used, etc. ### Create an ISO8583 Configuration for the thread group This configuration is mandatory to test ISO8583 interfaces using jpos. For more details see [ISO8583 Connection Configuration](https://github.com/tilln/jmeter-iso8583#iso8583-connection-configuration) Right-click on the Thread Group, and add a **Config Element** of the **ISO8583 Config** type as shown in the image: ![iso8583-config](https://user-images.githubusercontent.com/1316018/84091749-bc403080-a9cb-11ea-87a5-4ec80820cb42.png) This will configure a jPOS Channel of different types. You can set things like: - Channel class to use (the channel select combo doesn’t work very well at least in gnome shell). - Packager configuration. > It only seems to support `GenericPacakger` at this moment, even if you choose an `XMLChannel` - Channel header - Hostname. Lleave it blank for testing as a server, for instance when simulating a message generator that acts as a server. - Port - Special MUX keys for different MTI's - etc ### Add a Message Sampler Each message (sample) that will be sent by your Thread Group threads needs to be added to it by right-clicking on the Thread Group and choosing **Add --> ISO8583 Sampler**. You should give your sampler a meaningful name such as "0200 Sampler". For each ISO8583 Sampler you will configure headers, if applicable, and all the fields with their field id and value. You can use any of JMeter's built-in [functions](https://jmeter.apache.org/usermanual/functions.html) plus the ones contributed by the installed plugins, such as [ISO8583 functions](https://github.com/tilln/jmeter-iso8583#functions). Also, at the bottom of the screen you need to add the **success response condition** (Success Response Code), which in this case will be a `00` in field 39. This is used by the Reports to check for a successful response. In the image below, we can see that field 7's value is `${__time(MMddHHmmss,)}` and we choose a random value for field 41, and a user-defined variable `${STAN}` for field 11. ![ISO8583 Sampler](https://user-images.githubusercontent.com/1316018/84093269-1fcc5d00-a9d0-11ea-89ec-a631fea18b1e.png) ### Adding a Report Listener In JMeter, you add **Listeners** to your Test Plan, that will listen to each sample result and produce all kinds of reports and graphs for you to analyze. We'll add a simple Listener called **Aggregate Report** by right-clicking on your Test Plan and choosing **Add-->Listeners-->Aggregate Report** ### Running the Test Plan When all is set up, and you have the server that you wish to test ready, you can **run** the Test Plan by clicking on the green Run button on the toolbar at the top. If all goes well, after the tests is finished, you can analyze the result in the report listeners and graphs you have added to your Test Plan

Other posts