Seb, Thanks for your answer. I think the OnceOnly Controller is not the right controller for my test plan, because the OnceOnlyController is applied for each thread. In my test, I want to execute the 1st request only once, whatever the thread, i.e. for the 2nd and other threads, http_request1 must not be called (I don't know if my english is clear ?). For the same reason, I think that Loop Controller is not the solution to my problem.
To solve my problem I need a kind of static variable (shared by all threads), set to one value at the beginning of the test plan and change only once after the execution of an http request ... -----Message d'origine----- De : sebb [mailto:[EMAIL PROTECTED] Envoyé : lundi 28 novembre 2005 15:46 À : JMeter Users List Objet : Re: If Controller and user defined variables : problem of scope (value overwritten) ? Why not use the OnceOnly Controller? Or: Loop, count=1 + http1 Loop, count=n + http2 Remember that Config + Pre-processors apply to ALL samplers in scope. It might help to move them all to the start of the level in which they appear, i.e. instead of Thread Group + Config 1 + Sampler + Pre-Proc 1 + Sampler + Config 2 + Pre-Proc 2 you have Thread Group + Config 1 + Pre-Proc 1 + Config 2 + Pre-Proc 2 + Sampler + Sampler S. On 28/11/05, Bruno Charloup <[EMAIL PROTECTED]> wrote: > Hi all, > i need to perform the following action to have in my tree listener : > http_request1 > http_request2 > http_request2 > http_request2 > http_request2 > ... > > My test plan is defined as below : > > myvar = 1 (user defined variable) > > if myvar==1 then (1st If Controller) > http_request1 > myvar = 2 > end if > > if myvar == 2 then (2nd If Controller) > http_request2 > end if > > > > myvar is defined as user defined variable in my test plan (high level). > My problem is that the value given to myvar is always the value > re-defined in my 1st IfController and the http_request1 is nevel > called, always the second http_request defined in my second ifController. > In my tree listener i have : > http_request2 > http_request2 > http_request2 > http_request2 > ... > > PS : If i set the value of myvar in another simple controller (after > the two If Controllers), I have the same result : it works as if myvar > has always the value 2. > > Thanks in advance for any help/clarifications. > > > -- > Bruno > > > --------------------------------------------------------------------- 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]