Hi, Any of the beanshell elements will give you access to a ctx object ( org.apache.jmeter.threads. JMeterContext), so I think the following should work:
ctx.getCurrentSampler() .getName(); Regards, Noel ----- "Marco Pas" <[email protected]> wrote: > Hi i was wondering is it is possible to retrieve the Testcase name > automatically or the filename of the current running test this to enable > dynamic naming of the different samplers. > I have a couple of different files that contain different test and when > running jmeter on all those test it would be nice that the test themselves > append the filename of the testcase name on the sampler namers. > > Something like: > > ${TESTCASENAME}-.... etc etc > or > ${CONTROLLERNAME}-.... > > I know i can use a User Defined variable in the testcase but would like to > use dynamic naming so if i move the test to another file or something that i > do not have to worry abou the naming. > > Greetings >

