How to get value from property in BeanShell (jmeter)

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

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

In the second thread group, I have a BeanShell pre-processor. If has a line as follows:

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

I tried some options:

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

but that will not work. Please help use $ {__ property (erroriden)} in the BeanShell preprocessor.

+5
source share
1 answer

In the first group of threads:

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

In the second group of threads:

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

All Articles