jmeter - How can I get name of HTTP Request from field Name with BeanShell? -
i need variable field http request called name. if give examples how can other fields such : path, server name or ip using beanshell?
thank in advance
- add beanshell preprocessor child of request
use following code lines required values:
string name = sampler.getname(); // parent sampler name string path = sampler.geturl().getpath(); // path string url = sampler.geturl().gethost(); // ip or hostname
you can store values jmeter variables if required like
vars.put("name", name);
see how use beanshell: jmeter's favorite built-in component guide comprehensive information on using beanshell scripting in jmeter test.
Comments
Post a Comment