Need to add thread group name function when need to differentiate or display current thread group. It will help especially when reusing same Test Fragment in different thread groups. https://stackoverflow.com/questions/49963015/jmeter-test-fragment-use-case-to-generate-different-name-in-jmeter-result/49963095?noredirect=1#comment86942241_49963095
Created attachment 35889 [details] Patch with new Thread Group Name function and tests Thread Group Name function uses AbstractFunctionByKey I suggest all/most functions will extends AbstractFunctionByKey instead of AbstractFunction to reduce code duplication of key/desc handling
Author: pmouawad Date: Sat May 12 08:12:59 2018 New Revision: 1831451 URL: http://svn.apache.org/viewvc?rev=1831451&view=rev Log: Bug 62323 - Add function "__ThreadGroupName" function to obtain ThreadGroup name Mainly contributed by Orimarko Bugzilla Id: 62323 Added: jmeter/trunk/src/functions/org/apache/jmeter/functions/AbstractFunctionByKey.java (with props) jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadGroupName.java (with props) Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/functions.xml
Hello, Thanks for contribution , I slightly modified code: - to avoid protected static which would have side effects. - to add functions.xml information Please review and check. Thanks
Author: pmouawad Date: Sat May 12 08:16:42 2018 New Revision: 1831453 URL: http://svn.apache.org/viewvc?rev=1831453&view=rev Log: Tab space police Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestSimpleFunctions.java
Author: pmouawad Date: Sat May 12 11:09:47 2018 New Revision: 1831464 URL: http://svn.apache.org/viewvc?rev=1831464&view=rev Log: Make function start with lower case Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/ThreadGroupName.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4769