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]