jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Kaisen <>
Subject Write and Read javascript arrays in BSF Processors
Date Mon, 21 Mar 2011 18:57:58 GMT
Hi guys,
I have a questions regarding javascript arrays. Can they be stored as
'global variables' in jmeter?

I have a BSF PostProcessor parsing a JSON response and storing data in an
javascript array:
  var prodArray= new Array();

This array gets put to jmeter variables:
  vars.put("prodArray", prodArray);

Now, in another BSF PreProcessor I want to access this array, but I do not
succeed in get the data as an array. I tried several things, also this:
  var prodArray = new Array(vars.get("prodArray"));

But what I get is an array with the whole comma separated content of the
original array as one string. Seems as if the array can only be stored as
string globally?

Any idea?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message