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

  1. add beanshell preprocessor child of request
  2. 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

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -