Testing with JMeter
  • 14 Aug 2024
  • 2 Minutes to read
  • Dark
    Light

Testing with JMeter

  • Dark
    Light

Article summary

Overview

JMeter is a Java application designed to load test behavior and measure performance for web applications. JMeter can be used as another method for testing web service integrations of Flows that will be used in service calls outside of Decisions. 


Example

To generate a Jmeter script: 

  1.  Right-click the Flow in Decisions. Select Run[Advanced] > Integration > View Integration Details.
    If the View Integration Details displays "Integration is not configured for this Flow.", then the Flow has not been configured to be used for integration. Please visit View Integration Details to enable this setting to enable the integration for Flows and other Designer objects.
  2.  A new tab should open, containing the integration details of the Flow. Select download JMeter Script. A file containing the integration details of the flow will be generated and automatically begin downloading.


JMeter Testing

Once the script has been downloaded, testing in JMeter can begin. Below are some guidelines for using JMeter with Decisions. For more information on the uses of JMeter, please visit the official JMeter documentation here.

User Defined Variables

  • Used to setup variables that will be used throughout the tests
  • The generic test is set up to easily allow the configuration of protocol, server, and named session in one place
  • Variables are used in tests with the following format: ${VariableName}

Thread Groups

  • Used to group calls that should occur together, such as a Flow Run Part and a Report to represent calling from a dashboard
  • Can be used to determine how many users and how often the system will be called
  • Below are the thread properties:
    Number of threadsCan be used to represent the number of concurrent users accessing the system
    Ramp-up periodCan be set to the same value as the number of threads
    Loop countGoverns how many times each thread will call the system


    HTTP Requests

  • Where individual calls are configured
  • Below are key fields that need to be set: 
    ProtocolCan be http or HTTPS
    Server Name or IPInclude only the base server name, for example, localhost. Do not include /decisions or any path variables.
    HTTP RequestCan be either GET or POST request types
    PathThe remaining path of the URL after the server name. The path can be found in the integration details in Decisions. 

Testing UI

Currently, there are two main ways to test UI elements from Decisions in JMeter:

  1. Run a GET call with a cookie manager to load the Page or Form
  2.  Run multiple GET/POST calls to simulate that all of the reports, data flows, and visibility rules are running correctly

For method 1, a cookie manager needs to be added to the thread group. No additional configuration is needed for the cookie manager. For method 2, multiple calls need to be set up in the thread group to test each component.

Running Tests

Tests can be run using the play button in JMeter. To stop tests, we can use the stop button. Items that do not need to be run can be disabled by right-clicking the item and selecting Disable from the drop-down menu.

Running tests through the UI is only useful for validating the test plan. For full-scale load tests, please use the command line.

Results

To view the results in JMeter, a listener needs to be enabled. By default, two listeners are configured Summary Report and View Results Tree. The View Results Tree provides detailed information on each call being made. This result can be useful with a limited thread/loop count to validate that the calls are returning data The Summary Report provides summed timings of the calls being made. This can be used to determine the speed and throughput of a test.


Was this article helpful?