apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
7.97k stars 2.02k forks source link

merge properties which have same properties name by config #6263

Closed ibingdian closed 1 month ago

ibingdian commented 1 month ago

Description

Add 1 configurable parameter to merge string-property which have same name. the value of configurable parameter is Separate with commas. Parameters are defined in jmeter.properties file. eg,merge.property=HTTPSampler.path

Motivation and Context

in multi ConfigTestElement, if we have same properties name, now is use pre value and no merge. but someties we may need common prefix ,the common prefix often changed by tester, and many HTTPSampler may use it. eg, the full http url is http://192.168.8.110:8088/local-xxx/xxx/mo/knowledge.json, other http url have the same prefix:/local-xxx/xxx, we can config a globe ConfigTestElement with a property [HTTPSampler.path=/local-xxx/xxx], then the [HTTPSampler.path] will merged to HTTPSampler .

How Has This Been Tested?

Run with multiple values in the .properties file, see the outcome.

Screenshots (if appropriate):

1712108894362 1712108929959 1712108966288 1 and 2 will be merge, as 3.

Types of changes

Checklist:

vlsi commented 1 month ago

Have you considered using ${prefix}auth/login instead? I do not think the suggested "merge" is intuitive