Hi Sebb,

Thanks for your response.

I am able to use a user defined variable in a BeanShell post-processor?

UDV
name: count
value: 0

BeanShell post-processor
print(vars.get("count");

Thanks

Aidy





On 13 December 2011 14:27, sebb <[email protected]> wrote:
> On 13 December 2011 13:57, aidy lewis <[email protected]> wrote:
>> Hi,
>>
>> Without a static modifier in BeanShell, how can I prevent the below
>> ArrayList from being re-initialised  during each thread?
>
> Use the init file to define the variable.
>
> Or store the list in a JMeter variable which you create if missing.
>
>> """
>>
>> headerList = new ArrayList();
>>
>> countCacheMisses() {
>>  print("counting cache misses");
>>  if (vars.get("HEADER") =="MISS");
>>    headerList.add("MISS");
>>    print("the size of the array");
>>    print(headerList.size());
>> }
>>
>>
>> countCacheMisses()
>>
>> """
>>
>> Aidy Lewis
>> Test Discipline Lead (News and Knowledge)
>> m: +44 (0) 7539655835
>> w: +44 (0) 208 008 4584
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to