Create a test based on the JMeter script#
JMeter is an open source load testing tool capable of recording HTTP requests via a built–in HTTP proxy. The JMX file is a saved JMeter script in XML format. PFLB Platform supports JMX files import.
To create a test based on the JMeter script, follow these steps:
Run the debug test and edit the script if needed.
To upload tests from PFLB Platform and edit them in Apache JMeter, you can use a special plugin.
For more information about limitations of PFLB Platform when working with JMeter scripts, see Supported plugins and elements of JMX scripts.
Record a script#
To create a script in JMeter, use the Apache JMeter documentation.
Import a script#
Open a PFLB Platform test.
In the Import data pane, click . The dialog opens:
Use one of the following methods:
Click to upload a JMX file and select the JMX file. The file size should not exceed 100 MB.
Using Drag & Drop, move the file from the local folder to the area for uploading the JMX file.
Use Click to upload supporting files.
Click Import. The Requests tab opens:
To view the timer settings for the request, hover over the icon.
To view the request settings, click .
Note
If the script contains unsupported plugins, then the script is not imported. For more information, see Supported plugins and elements of JMX scripts.
Edit the load profile for each step for the Thread Group jp@gc - Ultimate Thread Group, if needed:
Start delay (min). Delay before starting testing. Specified in minutes.
Duration (min). Test duration at maximum load with all VUsers running. Specified in minutes.
Ramp-up time (min). Time allocated to start all VUsers. If set to 0, all VUsers will start simultaneously. Specified in minutes.
Number of VUsers. The number of load threads. The intensity of the load depends on the number of virtual users, timers, and response time of the testing system.
Ramp-down time (min). Time allocated to stop all VUsers. If set to 0, all VUsers will stop simultaneously. Specified in minutes.
Redefine the timer’s settings if needed:
In the Default settings pane, click . The dialog opens:
Click the On/off timers toggle.
Enter the multiplication coefficient. The timer’s values are multiplied by the specified value.
Note
Multiplication by a coefficient are supported for Constant Timer, Gaussian Random timer, Poisson Random timer, Uniform Random timer.
Click Apply.
Configure the profile graph display if needed:
To merge the graphs of several steps, click the Merge steps toggle. The toggle becomes available when there are several steps in the transaction.
Select the testing time that you want to consider in detail on the graph.
Apache JMeter Plugin#
The plugin allows you to upload tests from PFLB Platform to edit them in Apache JMeter
The plugin supports Apache JMeter 5.4.1 and higher.
Install the plugin#
Request a JAR file of the plugin from the Technical support.
Copy the JAR file to the folder:
JMETER_HOME\lib\ext
.Create the
JMETER_HOME\bin\pflb.properties
file and fill in the file before Apache JMeter runs:pflb_url. URL of the platform.
api_token. API token.
tmp_dir. The folder where tests downloaded from PFLB Platform.
Example of the config file:
pflb_url=https://mycompany.pflb.us api_token=<API token> tmp_dir=/home/jmeter/
Use the plugin#
To edit the PFLB Platform test in Apache JMeter, follow these steps:
Run Apache JMeter.
In the upper-right corner of the Apache JMeter window, click . The list of the PFLB Platform OWN_JMX tests opens. To refresh the list, click Reload if needed.
Expand the required test and select the version:
Click Download. The JMX file downloaded from PFLB Platform will open:
Note
If the Name and Comments fields are not filled in for the script element, then PFLB Platform generates unique values of these fields. For example:
Edit and save the JMX file.
To change the plugin settings, go to the Settings tab:
Supported plugins and elements of JMX scripts#
Supported plugins#
BlazeMeter – HLS Plugin
Custom Thread Groups
Random CSV Data Set
WebSocket Samplers by Peter Doornbosch
WebSocket Samplers by Maciej Zaleski
Custom JMeter Functions
Working with files#
Uploading#
File types that may be required for JMX to work:
a script file
files that are sent in the request from the script
CSV parameters file
You don’t need to change the paths in JMX.
For more information, see Import a script.
Test results#
You can unload JMeter LOG files when JMX is done. For more information, see View detailed data about requests and responses.
Threads#
jp@gc - Ultimate Thread Group is recommended thread type for JMX scripts imported into PFLB Platform.
For jp@gc - Ultimate Thread Group the following features are supported:
load profile display:
Start Threads Count
Initial Delay
Startup Time
Hold Load For
Shutdown Time
changing the load profile by the user
displaying group activity:
Enabled
Disabled
changing the load profile by the user.
If you set the load profile by the parameters:
parameter values are changed to default values:
Start Threads Count = 10
Initial Delay = 0
Startup Time = 300
Hold Load For = 600
Shutdown Time = 300
Step is marked as modified: isChanged = true.
Groups that are supported, but you can’t change them in the GUI:
bzm - Arrivals Thread Group
bzm - Concurrency Thread Group
bzm - Free-Form Arrivals Thread Group
jp@gc - Stepping Thread Group (deprecated)
setUp Thread Group
TearDown Thread Group
Thread Group
Samplers#
For HTTP Request the following features are supported:
displaying request details:
URL
protocol
parameters
headers
body
timers that affect this request:
type of the timers
the min and max boundaries of delays for timers that generate random delays
duration of constant timers
On/off timers
editing timers affecting this HTTP request
Samplers that are supported, but you can’t them in the GUI:
Flow Control Action
Debug Sampler
JSR223 Sampler
AJP/1.3 Sampler
Access Log Sampler
BeanShell Timer
Bolt Request
FTP Request
GraphQL HTTP Request
JDBC Request
JMS Point-to-Point
JMS Publisher
JMS Subscriber
JUnit Request
Java Request
LDAP Extended Request
LDAP Request
Mail Reader Sampler
OS Process Sampler
SMTP Sampler
TCP Sampler
bzm – Streaming Sampler
WebSocket Close
WebSocket Open Connection
WebSocket Ping/Pong
WebSocket Sampler
WebSocket Single Read Sampler
WebSocket Single Write Sampler
WebSocket request-response Sampler
Config element#
HTTP Header Manager:
The scope of visibility is determined.
Headers are added to the display in the HTTP Request. JMX doesn’t change.
HTTP Request Defaults:
The scope of visibility is determined.
The settings are added to the display in the HTTP Request. Their priority works according to the principle that the “closer” the configuration element is in terms of nesting, the higher its priority is. The highest priority configuration is in the HTTP Request itself.
Config elements that are supported, but you can’t change them in the GUI:
CSV Data Set Config
bzm - Random CSV Data Set Config. For more information, see Add a CSV parameter and Add a settings set
HTTP Cookie Manager
HTTP Cache Manager
Bolt Connection Configuration
Counter
DNS Cache Manager
FTP Request Defaults
HTTP Authorization Manager
JDBC Connection Configuration
Java Request Defaults
Keystore Configuration
LDAP Extended Request Defaults
LDAP Request Defaults
Login Config Element
Random Variable
Simple Config Element
TCP Sampler Config
User Defined Variables
Listeners#
After importing the JMX script, Listeners are disabled in PFLB Platform.
Logic controllers#
Logic controllers that are supported, but you can’t change them in the GUI:
If Controller
Transaction Controller
Loop Controller
While Controller
Critical Section Controller
ForEach Controller
Include Controller
Interleave Controller
Once Only Controller
Random Controller
Random Order Controller
Recording Controller
Runtime Controller
Simple Controller
Throughput Controller
Module Controller
Switch Controller
Pre-Processors#
Pre-Processors that are supported, but you can’t change them in the GUI:
JSR223 PreProcessor
User Parameters
HTML Link Parser
HTTP URL Re-writing Modifier
JDBC PreProcessor
RegEx User Parameters
Sample Timeout
BeanShell PreProcessor
Post-Processors#
Post-Processors that are supported, but you can’t change them in the GUI:
CSS Selector Extractor
JSON Extractor
JSON JMESPath Extractor
Boundary Extractor
Regular Expression Extractor
JSR223 PostProcessor
Debug PostProcessor
JDBC PostProcessor
Result Status Action Handler
XPath Extractor
XPath2 Extractor
BeanShell PostProcessor
Assertions#
Assertions that are supported, but you can’t change them in the GUI:
Response Assertion
JSON Assertion
Size Assertion
JSR223 Assertion
XPath2 Assertion
Compare Assertion
Duration Assertion
HTML Assertion
JSON JMESPath Assertion
MD5Hex Assertion
SMIME Assertion
XML Assertion
XML Schema Assertion
XPath Assertion
BeanShell Assertion
Test Fragments#
Test Fragments that are supported, but you can’t change them in the GUI:
Test Fragment
Timers#
Timers that are supported for all types of the tests:
Constant Timer
Gaussian Random timer
Poisson Random timer
Uniform Random timer
In uploaded JMX, these timers are displayed with all parameters.
For all timers, the following features are supported:
On/off timers.
Changing values.
Multiplication by a coefficient in the timer settings at the test level, along with all other timers.
Adding to any request.
Deleting a timer added to PFLB Platform. When the test starts, a new JMX is created, so to add or remove the timer installed on the frontend side, change the YAML file.
Timers that are displayed in the GUI in all requests that are affected:
Precise Throughput Timer
Constant Throughput Timer
Synchronizing Timer
When one timer acts on several requests, the timer is displayed in the GUI in each of the requests with the same ID. If you change the timer in one of the requests, the change will affect all the requests in the scope.
Timers that are supported, but you can’t change them in the GUI:
JSR223 Timer
BeanShell Timer
Supported JMeter properties#
XML Parser:
xpath2query.parser.cache.size
SSL Configuration:
https.sessioncontext.shared
https.default.protocol
https.socket.protocols
https.use.cached.ssl.context
httpclient.reset_state_on_thread_group_iteration
https.keyStoreStartIndex
https.keyStoreEndIndex
Apache HttpClient common properties:
post_add_content_type_if_missing
httpclient.timeout
httpclient.version
httpclient.socket.http.cps
httpclient.socket.https.cps
httpclient.loopback
httpclient.localaddress
HTTP Java Configuration:
http.java.sampler.retries
Apache HttpComponents HTTPClient configuration (HTTPClient4):
httpclient4.default_user_agent_disabled
httpclient4.auth.preemptive
httpclient4.retrycount
httpclient4.request_sent_retry_enabled
httpclient4.idletimeout
httpclient4.validate_after_inactivity
httpclient4.time_to_live
httpclient4.gzip_relax_mode
httpclient4.deflate_relax_mode
HTTP Cache Manager configuration:
cacheable_methods
cache_manager.cached_resource_mode
RETURN_200_CACHE.message
RETURN_CUSTOM_STATUS.code
RETURN_CUSTOM_STATUS.message
CSVDataSet configuration:
csvdataset.eofstring
csvdataset.file.encoding_list
Miscellaneous configuration:
cssselector.parser.cache.size
oro.patterncache.size
propertyEditorSearchPath
jmeter.expertMode
httpsampler.max_bytes_to_store_per_request
httpsampler.max_buffer_size
httpsampler.max_redirects
httpsampler.max_frame_depth
httpsampler.separate.container
httpsampler.ignore_failed_embedded_resources
httpsampler.embedded_resources_use_md5
httpsampler.parallel_download_thread_keepalive_inseconds
httpsampler.user_defined_methods
sampleresult.default.encoding
CookieManager.delete_null_cookies
CookieManager.allow_variable_cookies
CookieManager.save.cookies
CookieManager.name.prefix
CookieManager.check.cookies
javascript.use_rhino
jmeter.regex.engine
jmeter.regex.patterncache.size
jmeterengine.threadstop.wait
jmeterengine.stopfail.system.exit
jmeterengine.force.system.exit
jmeter.exit.check.pause
jmeterthread.rampup.granularity
document.max_size
text.kerning.max_document_size
JMSSampler.useSecurity.properties
jsr223.compiled_scripts_cache_size
httpJettyClient.maxBufferSize
Features of debugging mode for tests with the OWN_JMX type#
The supported thread group is the same as for a regular test. In them, the parameters change as follows:
ArrivalsThreadGroup:
Target Rate (arrivals/min) = 30. Bandwidth limitation, since it is impossible to limit the number of iterations.
Ramp Up Time (min) = 0.
Ramp-Up Steps Count = 0.
Hold Target Rate Timer (min) = 5. Duration is 5 minutes.
Log Threads Status into File = “”. Absence of log files.
Thread Iterations Limit = “”. The number of iterations for the thread, after which it is destroyed and created anew.
Concurrency Limit = 1.
Time Unit = minutes. The unit of measurement of time. It is recommended to use minutes, since it is impossible to set a fractional number in the target rate, and the minimum bandwidth of 1/sec is too much.
ConcurrencyThreadGroup:
Target Concurrency = 1.
Ramp Up Timer (sec) = “”.
Ramp-Up Steps Count = “”.
Hold Target Rate Time (sec) = 300. Duration is 5 minutes.
Time Unit = seconds. The unit of measurement of time.
Thread Iterations Limit = “”. The number of iterations for the thread, after which it is destroyed and created anew.
Log Threads Status into File = “”. Absence of log files.
FreeFormArrivalsThreadGroup:
Time Unit = seconds. The unit of measurement of time.
Thread Iterations Limit = “”. The number of iterations for the thread, after which it is destroyed and created anew.
Log Threads Status into File = “”. Absence of log files.
Concurrency Limit = 1.
Steps:
First step:
Start Value = 1. At the beginning of the test, 1 virtual user is started.
End Value = 1. At the end of the test, 1 virtual user is stopped.
Duration = 300. The duration of iterations is 5 minutes.
Second step - Last step:
Start Value = 0.
End Value = 0.
Duration = 0.
SetupThreadGroup:
Number of threads (users) = 1.
Ramp-Up Period (in seconds) = 0.
Loop Count = 10. The number of iterations after which the group stops working. If the user had a value less than 10, then the user’s value is used.
Forever = false. Iterations do not repeat indefinitely.
Scheduler = true. If 10 iterations don’t have time to be executed, then their execution ends in the time specified in the parameter Duration (seconds).
Duration (seconds) = 300. Duration of iterations. If the user had a value less than 300, then the user value is used.
Startup delay (seconds) = “”.
SteppingThreadGroup:
This group will start = 1.
First, wait for = 0.
Then start = 0.
Next, add = 0.
threads every = 0.
using ramp-up = 0.
Then hold load for = 300. Duration is 5 minutes.
Finally, stop = 1.
threads every = 0.
TearDownThreadGroup:
Number of threads (users) = 1.
Ramp-Up Period (in seconds) = 0.
Loop Count = 10. The number of iterations after which the group stops working. If the user had a value less than 10, then the user’s value is used.
Forever = false. Iterations do not repeat indefinitely.
Scheduler = true. If 10 iterations don’t have time to be executed, then their execution starts in the time specified in the parameter Duration (seconds).
Duration (seconds) = 300. Duration of iterations. If the user had a value less than 300, then the user value is used.
Startup delay (seconds) = “”.
ThreadGroup:
Number of threads (users) = 1.
Ramp-Up Period (in seconds) = 0.
Loop Count = 10. The number of iterations after which the group stops working. If the user had a value less than 10, then the user’s value is used.
Forever = false. Iterations do not repeat indefinitely.
Scheduler = true. If 10 iterations don’t have time to be executed, then their execution starts in the time specified in the parameter Duration (seconds).
Duration (seconds) = 300. Duration of iterations. If the user had a value less than 300, then the user value is used.
Startup delay (seconds) = “”.
UltimateThreadGroup:
Steps:
First step:
Start Threads Count = 1. At the beginning of the test, 1 thread is started.
Initial Delay (sec) = 0.
Startup Time (sec) = 0.
Hold Load For (sec) = 300. Duration is 5 minutes.
Shutdown Timer = 0.
Second step - Last step:
Start Threads Count = 0.
Initial Delay (sec) = 0.
Startup Time (sec) = 0.
Hold Load For (sec) = 0.
Shutdown Timer = 0.