You can now use JMeter functions and variables in thread groups properties which can help you configure different profiles for example for different environments! This release also includes EmbeddedJmeterEngine.propertiesFile
method which plays nicely with previous need. Here is an example:
testPlan(
threadGroup()
.rampToAndHold("${THREADS}", "${RAMP_SECONDS}", "${DURATION_SECONDS}")
.children(
httpSampler("http://myservice.test")
)
).runIn(new EmbeddedJmeterEngine()
.propertiesFile("local.properties"));
Note: To support generating code from JMX files containing thread groups with JMeter expressions in their properties, MethodParam
and TestElementParamBuilder
classes required changes that are not compatible with previous versions. So, if you have implemented some custom MethodCallBuilder
, you will need to adapt it to work with this and future versions.