I want to get the thread and the sampler names in JMeter Test Plan and keep it in the variables.
I already keep the Test Plan name using the BeanShell Post Processor:
import org.apache.jmeter.services.FileServer;
String testPlanName = FileServer.getFileServer().getScriptName(); vars.put("testPlanName", testPlanName)
I use it in the Email notification to send the messages like "Test plan ${testPlanName} have received the response code ${responseCode}
But I want to include the thread name and the sampler name the same way.
I already tried to add the BeanShell Post Processor .getThreadname() and .getSampleName() and import import org.apache.jmeter.samplers.SampleResult; but it doesn't work.
How can I get that names and use it like variables?