What Are BeanShell Scripts

Q

What Are BeanShell Scripts?

✍: FYIcenter.com

A

BeanShell scripts are code segments written in the BeanShell Scripting Language defined in JSR-274. BeanShell scripts follows Java syntax is considered as lightweight Java scripts.

Below is a BeanShell script example used in JMeter:

import java.net.URL;
URL url = new URL(vars.get("url"));
vars.put("urlProtocol",url.getProtocol());
vars.put("urlHost",url.getHost());
vars.put("urlPath",url.getPath());

For more information on BeanShell, see BeanShell Home Page.

 

Using BeanShell Script in JMeter

⇒⇒Apache JMeter Tutorials

2017-11-27, 159👍, 0💬