Top 10 JMeter Plugins- Part 2

Top 10 JMeter Plugins- Part 2

2019 / 8 / 13

Jmeter, Plugins, Top 10, Load Testing, Performance Testing

      In the last blog post, we have discussed 5 Plugins out of Top 10 JMeter Plugins. Now it’s time to discuss the remaining 5 Plugins.

6. Throughput Shaping Timer

This plugin adds 3 functionality to the JMeter:

  • Throughput Shaping
  • Special Property Processing
  • Schedule Feedback Function

a. Throughput Shaping Timer:

How To Install:

  • The Plugin can be installed via Plugins Manager by simply selecting the checkbox in front of Throughput Shaping Timer Option in the list of Available Plugins.

JMeter Shaping timer

How To Add:

JMeter Throughput shaping

JMeter Throughput shaping

As you can see from the image above, the Timer has a fixed schedule table and a preview graph which makes it easier to control a load during the test run.

b. Special Property Processing:

This feature provides users with the ability to process a JMeter property “load_profile”. This property specifies a load pattern with a set of function-like declarations. These Declarations can be of 3 types:

  • const(N, T): const holds a constant hold of N requests per second for T number of seconds.
  • line(N, K, T): line generates a linear increase of the load from requests increasing from N to K per second for T number of seconds.
  • step(N, K, S, T): step generates a stepping load from N requests per second to K requests per second, each step height to will be of S requests per second, each step duration will be T seconds.

The main advantage of reading about this property is we can setup requests per second throughput with jmeter.properties file or we can setup requests per second with the command line while running the JMeter.

Example: load_profile=const(30,20s) line(30,100,1m)step(5,20,5,5m)

c. Schedule Feedback Function:

This function enables a feedback loop for the number of threads. The job of the feedback loop is to see if enough number of threads are running at any time. It also provides additional threads if the criteria are not met i.e. if requests per second schedule are not achieved during test runs.

Example: ${tstFeedback(ThroughputShaping(1,500,50)}

Here, Throughput_Shaping is the Throughput Shaping Timer to integrate with. 1 is the number of starting threads. 500 is the number of max threads allowed. 50 is the number of spare threads to be kept in the thread pool. So, this function will be able to increase the number of threads upto 500 in case the request per second schedule not met during the test run.

7. Custom JMeter Functions

This plugin extends JMeter functionality with a number of functions:

  • strReplace: This function replaces a part of the string with another string.
  • strReplaceRegex: This function is like Find and Replace All where all occurrences of a substring matching a regular expression are replaced with a replacement string.
  • Uppercase and lowercase: this function changes the case of the string or variable value.
  • Env: this receives an environment variable value.
  • chooseRandom: chooses a random value from the list of arguments.
  • doubleSum: This function calculates the sum of floating-point values.
  • isDefined: This function checks to see if the variable is previously defined.
  • iterationNum: This function returns the number of current iteration in the thread group.
  • caseFormat: This function provides a changing string case format.
  • base64Encode: Uses Base64 algorithm to encode a string or variable value.
  • base64Decode: This function decodes a string or variable value using Base64 decoding.
  • MD5: This function computes the MD5 hash of string or variable value.
  • If: This function provides if syntax.

How To Install:

  • The plugin can be installed via Plugins Manager by simply selecting the checkbox and pressing “Apply changes and Restart JMeter” button.

Custom JMeter Function

8. Flexible File Writer

This plugin extends JMeter with a Listener “Flexible File Writer”. This listener enables us to write JMeter test results to a file in a flexible format, which can be specified via JMeter GUI.

How To Install:

  • The plugin can be installed via Plugins Manager by simply selecting a checkbox in front of Flexible File Writer option in the list of Available Plugins and press “Apply changes and Restart JMeter” button.

JMeter Flexible file writer

How To Add:

JMeter Flexible file writer

Example: JMeter Flexible file writer

The Listener provides some options to configure the output file. By using those options we can change file header, file footer and log content. For example, I have changed the File footer to “Top 10 JMeter Plugins: Flexible File Writer.”

By default, log contains following values for each sample run: endTimeMillis, responseTime, latency, isFailed, isSuccessful, latencyMicros etc. An example of the output file content can be seen below: JMeter Flexible file writer

9. Inter-Thread Communication

Inter-Thread Communication post-processor, Inter-Thread Communication preprocessor, and a number of functions. Inter-Thread Communication help us to synchronize various thread groups. In this method a string value is put into a queue from one thread group and then get that value into another thread group.

How To Install:

  • The plugin can be installed via Plugins Manager by following the same old rule, simply clicking the checkbox and selecting Apply changes and Restart JMeter button.

JMeter Interthread

How To Add:

  • Right Click on the Test Plan→Add→Post Processors→[email protected] Communication PostProcessor JMeter Interthread
  • Right Click on the Test Plan→Add→Pre Processors→[email protected] Communication PreProcessor

JMeter Interthread

10. 5 Additional Graphs

This plugin provides 5 different types of Graphs.

  • Response Code
  • Byte Throughput
  • Connect Times
  • Latency
  • Hits/s

How To Install:

  • Select the checkbox with the name 5 Additional Graphs in the list of Available Plugins and then press the button “Apply changes and Restart JMeter”.

JMeter 5 Additional Graphs

For all the examples we will consider below Thread Group settings and with Sampler HTTP Request having Server IP: www.frugaltesting.com.

JMeter 5 Additional Graphs

a. Response Code Graph:

How To Add:

  • Right Click on the Thread Group→Add→Listener→[email protected] Response Codes per Second

JMeter ResponseCode

Example: Below Graph shows the result in accordance with the Thread Group Scenario and Sampler discussed above.

JMeter ResponseCode

b. Bytes Throughput:

How To Add:

  • Right Click on the Thread Group→Add→Listener→[email protected] Bytes Throughput per Second

JMeter Throughput

Example: Sample run for the same Thread Group and Sampler.

JMeter Throughput

c. Connect Times:

How To Add:

  • Right Click on the Thread Group→Add→Listener→[email protected] Connect Times per Second

JMeter Connect Times

Example: JMeter Connect Times

d. Latency:

How To Add:

  • Right Click on the Thread Group→Add→Listener→[email protected] Response Latencies per Second

JMeter Latency Plugin

Example:

JMeter Latency Plugin

e. Hits/s:

How To Add:

JMeter Hits per second

Example:

JMeter Hits per second

With this, we have completed all the Top 10 Plugins of JMeter. Now it’s your turn to get started and try these plugins on a Test Plan.


You might also like