How to get value from property in BeanShell (jmeter)

Ololowa QA

I have got several thread groups. I want to use variable from the first group. In second group this var should be used in BeanShell. So: in first thread group I created BeanShell Assertion with this code:

 ${__setProperty(erroriden, ${erroriden1})};

In second thread group I have BeanShell pre-processor. If has line like this:

String[] erroriden = (vars.get("erroriden")).split(",");

I tried some variations like this:

String[] erroriden = (vars.get("__property(erroriden)")).split(",");
String[] erroriden = (vars.get("${__property(erroriden)}")).split(",");

but it doesn't work. Please help to use ${__property(erroriden)} in BeanShell pre-processor.

Dmitri T

In the first Thread Group:

props.put("erroriden", vars.get("erroriden1"));

In the second Thread Group:

String[] erroriden = props.get("erroriden").split(",");

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to get Sampler Body data from beanshell Pre-Processor - JMeter

Get first json object from response rest service by Beanshell in jmeter

JMeter: Count comparison of value fetched from Beanshell Postprocessor, using the Beanshell assertion

How to get Machine IP Address using beanshell in JMeter?

How to get the name given to transaction controller using beanshell preprocesssor in jmeter

How to get response message HTTP Request on Beanshell Jmeter

How to get property value from another property?

How to get property name and value from array

How to get property value from IEnumerable<object>

How to get enum value from property

Jmeter extract a value using BeanShell PostProcessor

How can I get value from data-bind in jmeter

JMeter - Stop Thread from within a BeanShell PreProcessor

Jmeter : Error when I try to get data from Database using beanshell assertion

How to get property value from property-getter quotation

How to Sort Numeric Array in JMeter Beanshell

How to use Hashset/set in Jmeter beanshell scripting

How to read JMeter Test Cmd Line Parameters from JSR223/Beanshell

How to get a value of a property

How to get value from a property in Qml from another Qml?

How to get random value from property from one List?

Jmeter extract value from Get Request

Get value from property and serialize it

Get value property from the stream

Get Property Value from PropertyInfo

How to Load files from BeanShell?

Jmeter - Beanshell script to read a text file parse it for keyword .e.g (start) and get correspomsing timestamp from text file

How to get the value from system property in spring boot

How to get only the most recent value from a Wikidata property?