Summary: | New function returning the name of the current sampler | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | jens_0 |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | jens_0 |
Priority: | P2 | ||
Version: | 2.4 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: | function sampler name |
Thanks. I added an optional variable name. Also, the code needs to check for null Sammpler object (which can happen e.g. if the function is used on the Test Plan - not that it makes sense there). URL: http://svn.apache.org/viewvc?rev=1000632&view=rev Log: Bug 49975 - New function returning the name of the current sampler Added: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/SamplerName.java (with props) Modified: jakarta/jmeter/trunk/xdocs/changes.xml jakarta/jmeter/trunk/xdocs/usermanual/functions.xml when will this be deployed? http://jakarta.apache.org/jmeter/usermanual/functions.html still doesn't show <tr><td>Information</td><td> <a href="#__samplerName">samplerName</a></td><td>get the sampler name (label)</td></tr> ... (In reply to comment #2) > when will this be deployed? With the next JMeter release. > http://jakarta.apache.org/jmeter/usermanual/functions.html > > still doesn't show > > <tr><td>Information</td><td> <a > href="#__samplerName">samplerName</a></td><td>get the sampler name > (label)</td></tr> > > ... Because that documentation is for the current release. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2401 |
Created attachment 26064 [details] function sampler name For tagging of load test requests in a monitoring tool I needed the possiility to add the name of the current sampler to the HTTP header. I implemented the following new function that can be used in the test's HTTP Header Manager.