I am trying to do this from a beanshell sampler.
import java.util.List;
import java.util.ArrayList;
list = new ArrayList();
props.putObject("list", list );
Now from another Beahshell sampler I want to do this.
list = props.getObject("list");
list.add("Rajan");
And then from a third Bean shell sampler
log.info("The list is " + list );
The code will work if we use vars instead of props. But the scope of vars is inside a single thread only. I want an array object in the scope of the test plan. The code throws an error. seems like props is a java.util.Properties class and cannot hold objects. Any idea how to do this.
In file: inline evaluation of: ``import java.util.List; import java.util.ArrayList; //Prints the report list = n . . . '' Encountered "<" at line 5, column 21.