- 14 Aug 2024
- 2 Minutes to read
- Print
- DarkLight
Testing with JMeter
- Updated on 14 Aug 2024
- 2 Minutes to read
- Print
- DarkLight
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:
- 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.
- 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 threads Can be used to represent the number of concurrent users accessing the system Ramp-up period Can be set to the same value as the number of threads Loop count Governs 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:
Protocol Can be http or HTTPS Server Name or IP Include only the base server name, for example, localhost. Do not include /decisions or any path variables. HTTP Request Can be either GET or POST request types Path The 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:
- Run a GET call with a cookie manager to load the Page or Form
- 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.
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.