I am currently working on testing small API for our company, where we need to randomly spread number of calls to all methods of API. I am using Jmeter 5.3 and taurus.
Number of threads is generated via JSR223 sampler groovy script based on number specified in passed property file. Rampup period and loop count are specified by calling functions ${__P(rampup.period,)}
${__P(loop.count,)}
The problem is that when I am running jmeter standalone from command line all functions work correctly. But if I try to use taurus with that scenario all thread groups that acquire rampup period, loop count and thread count from properties are not working. It seems like jmeter cannot acquire properties via functions when run in taurus. Below are my scenario and property files. I have to omit some of the data from file which may be confidential
My taurus yml is:
execution:
- executor: jmeter
scenario: test
scenarios:
test:
script: *path to jmx file here*
included-configs:
- *path to yml property file here*
modules:
jmeter:
path: *path to existing jmeter executor here*
reporting:
- module: console
- module: final-stats
summary: true # overall samples count and percent of failures
percentiles: true # display average times and percentiles
failed-labels: false # provides list of sample labels with failures
test-duration: true # provides test duration
Part of my yml file with properties:
number.of.users: 10000
rampup.period: 300
loop.count: 1
client.id: *client id*
array.of.clients: [*array of ids*]
eks.ids: [1,2,3]
I am fairly new to taurus, jmeter and load testing in general. Am I doing something wrong (maybe I have to acquire properties or pass them some other way) or is it a bug of sorts? The only workaround I can think of now is put all properties via JSR sampler by using props.put
and then executing something like ${__groovy(props.get('loop.count'),)} (for some reason in this version of jmeter you can access props that were put via script only in this manner)
Try the following:
properties.yaml
test.yaml
test.jmx
Image version:
Textual representation of the number of threads:
Whenever you change
10
in themy-number.of.users: 10
line inproperties.yaml
the change will be reflected in the number of executed threadsMore information: