You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by jo...@kennen-consulting.com on 2011/04/05 16:24:53 UTC

Problems with concurrents threads and cookies

I'm working with Apache Jmeter 2.4 r961953. I created a test plan wich includes a HTTP Cookie Manager for the Thread Group, when I runned the test plan, it worked fine until I seted more than one concurrent thread. For some threads sometimes the login page received the cookie but for others threads didn't do it.  This happens with one particular site and not with others I tested before. 
 
The particular in this project is that, at the first page, I receive a javascript cookie that I have to send to the login page before received the definitive one. 
 
I parsed the page with a beanshell postprocesor and then i save it to a variable, y tried to add to the name of the variable the number of the corresponding thread, but it didn´t work. 
 
I need some help please. 

Thanks
Jordán

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Problems with concurrents threads and cookies

Posted by Deepak Shetty <sh...@gmail.com>.
>I parsed the page with a beanshell postprocesor and then i save it to a
variable, y tried to add to the name of the variable the number of the
>corresponding thread, but it didn´t work.
its unclear what this means. Once you have extracted the value into a
variable(and verified that you are extracting it correctly), then in the
next sampler(which i guess is the login page) use a beanshell pre processor
that  gets the CookieManager(from the sampler object)  and adds the cookie -


http://jakarta.apache.org/jmeter/api/org/apache/jmeter/protocol/http/control/CookieManager.html
regards
deepak

On Tue, Apr 5, 2011 at 7:24 AM, <jo...@kennen-consulting.com> wrote:

> I'm working with Apache Jmeter 2.4 r961953. I created a test plan wich
> includes a HTTP Cookie Manager for the Thread Group, when I runned the test
> plan, it worked fine until I seted more than one concurrent thread. For some
> threads sometimes the login page received the cookie but for others threads
> didn't do it.  This happens with one particular site and not with others I
> tested before.
>
> The particular in this project is that, at the first page, I receive a
> javascript cookie that I have to send to the login page before received the
> definitive one.
>
> I parsed the page with a beanshell postprocesor and then i save it to a
> variable, y tried to add to the name of the variable the number of the
> corresponding thread, but it didn´t work.
>
> I need some help please.
>
> Thanks
> Jordán
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Problems with concurrents threads and cookies

Posted by Andrey Pohilko <ap...@apc.kg>.
В сообщении от 5 апреля 2011 18:24:53 автор jordan.moises@kennen-
consulting.com написал:
> I'm working with Apache Jmeter 2.4 r961953. I created a test plan wich
> includes a HTTP Cookie Manager for the Thread Group, when I runned the
> test plan, it worked fine until I seted more than one concurrent thread.
> For some threads sometimes the login page received the cookie but for
> others threads didn't do it.  This happens with one particular site and
> not with others I tested before. 
> The particular in this project is that, at the first page, I receive a
> javascript cookie that I have to send to the login page before received
> the definitive one. 
> I parsed the page with a beanshell postprocesor and then i save it to a
> variable, y tried to add to the name of the variable the number of the
> corresponding thread, but it didn´t work. 
> I need some help please.
> 
> Thanks
> Jordán
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org