Add freestyle naming scheme to proxy samples#595
Add freestyle naming scheme to proxy samples#595FSchumacher wants to merge 6 commits intoapache:masterfrom
Conversation
|
Thanks for implementing this. I agree it would be better to make the format configurable rather than implementing a couple of hard-coded formats. I'm not sure MessageFormat is a proper templating framework though: there are no named parameters, so the template string would be awkward and it would be hard to reason about :-/ |
|
...
Yes, I agree. MessageFormat might be hard to read, but
Do you have a special templating system in mind, that we can/should use? One idea would be to parse the format string and generate the three placeholders à la |
...protocol/http/src/main/java/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
Show resolved
Hide resolved
0faa0aa to
9da8c0b
Compare
1a1f640 to
457310f
Compare
457310f to
34e9ac6
Compare
|
Despite of my initial comment, I have implemented the counter feature from #571 in this PR. Apart from the documentation (which is still missing), it looks complete now. |
ef5a4a6 to
e52fc8d
Compare
Names of newly created Samplers by the DefaultSamplerCreator can now be
styled with a freestyle format, that understands the controls for
MessageFormat. Apart from the placeholders {0}, {1} and {2}, that are
hard to guess, for which part they are used, more memorizable placeholders
#{name}, #{path} and #{counter} can be used.
The counter for the generated samplers can be set to a user specified number.
Add a space between if and the parenthesis
e52fc8d to
f73e15f
Compare
|
Hello @FSchumacher , |
|
How can i set the format for numbering in the jmeter.propeties or user.properties ? I don't see a property to set the format. numbering.format?=#{counter,number,000} #{path} Regards |
|
In the string format, you can use |
|
How can i set the default format for recording and multi-computers ? Usually you could set the default value in the jmeter.properties. I don't see this feature. But I appreciate the new interface with the possibility to choose the numbering format and set the counter value. Regards. |
Use a default value for the format string, that can be controlled by a JMeter property. Bugzilla Id: 64696 Relates to #595
|
I have added a JMeter property ( |
Don't save the default value for the format string property Bugzilla Id: 64696 Relates to #595
|
I download,the nigthly jmeter (2020-09-01). When i use the template "Recording", i see the format that i set in the jmeter.properties but when i don't use a template and add manually a "HTTP(S) Test Script Recorder", i don't see any format from proxy.sampler_format Regards |
Initialize format string correctly when script recorder is created by hand instead of with a template. Bugzilla Id: 64696 Relates to #595
|
Can you try again? |
Use a default value for the format string, that can be controlled by a JMeter property. Bugzilla Id: 64696 Relates to apache#595
Don't save the default value for the format string property Bugzilla Id: 64696 Relates to apache#595
Initialize format string correctly when script recorder is created by hand instead of with a template. Bugzilla Id: 64696 Relates to apache#595
Names of newly created Samplers by the DefaultSamplerCreator can now be
styled with a freestyle format, that understands the controls for
MessageFormat. Apart from the placeholders {0}, {1} and {2}, that are
hard to guess, for which part they are used, more memorizable placeholders
#{name}, #{path} and #{counter} can be used.
The counter for the generated samplers can be set to a user specified number.
Based on a patch by Vincent Daburon
Bugzilla Id: 64696
Closes apache#571
Closes apache#595
Use a default value for the format string, that can be controlled by a JMeter property. Bugzilla Id: 64696 Relates to apache#595
Don't save the default value for the format string property Bugzilla Id: 64696 Relates to apache#595
Initialize format string correctly when script recorder is created by hand instead of with a template. Bugzilla Id: 64696 Relates to apache#595
Names of newly created Samplers by the DefaultSamplerCreator can now be
styled with a freestyle format, that understands the controls for
MessageFormat. Apart from the placeholders {0}, {1} and {2}, that are
hard to guess, for which part they are used, more memorizable placeholders
#{name}, #{path} and #{counter} can be used.
The counter for the generated samplers can be set to a user specified number.
Based on a patch by Vincent Daburon
Bugzilla Id: 64696
Closes apache#571
Closes apache#595
Use a default value for the format string, that can be controlled by a JMeter property. Bugzilla Id: 64696 Relates to apache#595
Don't save the default value for the format string property Bugzilla Id: 64696 Relates to apache#595
Initialize format string correctly when script recorder is created by hand instead of with a template. Bugzilla Id: 64696 Relates to apache#595

Description
This is a slightly different approach to naming samples that are recorded via the proxy that has been proposed in #571.
Motivation and Context
I think as we add another scheme to naming recorded samples, others will want their favourite naming schemes, too. So in this PR I try to anticipate that by adding a format string that can be used to go really wild on your naming preferences. (The newly added suffix-mode can be expressed through the format string, as well as the older modes prefix and transaction)
The PR #571 has one other feature, that is not implemented in this PR. Namely the addition of setting starting numbers for recorded samples. I think that should be added in another feature/PR. It is of course possible to add it later with this approach, too.How Has This Been Tested?
Currently it has only been tested via GUI. No tests have been added.
Screenshots (if appropriate):
Types of changes
Checklist: