JMeter Test Plan will look like this:

Test Plan
    - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF: false,
Sharing mode: All threads)
    - Thread Group (threads: 250, rampup: 0, loop: 16)
        - HTTP Request 1
            - Synchronizing Timer (threads: 250)
            - Constant Timer (delay: ${__javaScript(${__threadNum()}*1818)}
 // 60000 / 33 = ~1818
        - HTTP Request 2
        ...
        - HTTP Request n



2013/8/16 umesh prajapati <[email protected]>

> Thank you very much for making me understand what constant timer is. I see
> you mentioned about synchronizing timer . So you have mentioned that
> synchronizing timer will start all the threads at the same time. But in my
> case, I would like 33 users to login in 1 minute. And lets say i have 250
> users in my csv file but I would like to run my test for 2 hrs. And to
> accomplish this I am increasing the number of loops. To complete one loop
> lets say it takes 8 mins. so I will need around 15-16 loop counts.
>
> Number of threads: 250
> Ramo up: 0
> Loop: 16
>
> Constant timer to be added before http sampler : (60000/33) ms
>
> So do I need synchronizing timer. Because if I do add synchronizing timer
> it will start all 250 users at once (just to be clear when you say start
> all at once) did you mean all 250 user login request will be sent at same
> time.
>  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <[email protected]> wrote:
>
> > When you use Synchronizing Timer all the threads will start at the same
> > time, when the number of threads started reaches the configured value.
> > In your test plan Ramp-up will delay the start of the threads, but next
> > loop execution will break down your test, as you have stated.
> > Then Constant Timer is used to overcome this issue, delaying the start
> time
> > of the threads as ramp-up does, but not messing thing up after the first
> > loop.
> > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> >
> >
> > 2013/8/16 umesh prajapati <[email protected]>
> >
> > > Thank you but I am still confused. So you mean constant time also does
> > the
> > > same job like ramp-up period. Lets say I have following configuration
> > >
> > > Number of threads : 250
> > > Ramp up period : 450
> > > Loop : 3
> > >
> > > From what I have understood about rampup. It takes 450 seconds to
> > complete
> > > 250 threads. So the delay between thread 1 and thread 2 is 450/250
> > seconds.
> > >
> > > So if I also add constant timer to this configuration lets say
> (450/250)
> > > seconds. I don't get why do we need constant timer when ramp up is
> doing
> > > the same thing.
> > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <[email protected]> wrote:
> > >
> > > > No. The Constant Timer is the delay between the start of one thread
> to
> > > the
> > > > start of the next thread. No relation among threads execution time at
> > > all.
> > > > So if thread 1 starts and take 1 second to complete, and Constant
> Timer
> > > has
> > > > 300ms delay, then the second thread will start before 1st thread
> ends.
> > > >
> > > > Ramp-up also put this delay in your threads, the same way constant
> > timer
> > > > will do. If you want to leverage concurrency remove the timer.
> > > >
> > > >
> > > > 2013/8/15 umesh prajapati <[email protected]>
> > > >
> > > > > If I put the timer, than it means 2nd request has to wait until the
> > > first
> > > > > request is complete. This means if first request is taking time to
> > > > process
> > > > > the request than 2nd request will not start until the first request
> > is
> > > > > completed.  Which means there won't be a load but I am doing a load
> > > test.
> > > > > On Aug 14, 2013 12:50 PM, "Flavio Cysne" <[email protected]>
> > > wrote:
> > > > >
> > > > > > only in the first http sampler
> > > > > >
> > > > > >
> > > > > > 2013/8/14 umesh prajapati <[email protected]>
> > > > > >
> > > > > > > one quick question do i add the timer on thread group or the
> http
> > > > > reques
> > > > > > > sampler
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Aug 14, 2013 at 9:25 AM, umesh prajapati <
> > > > [email protected]
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > @ flavio Thanks ...will try it out and let you know the
> result.
> > > > > > > >
> > > > > > > >
> > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > > > [email protected]
> > > > > > > >wrote:
> > > > > > > >
> > > > > > > >> I think you misunderstood me.
> > > > > > > >>
> > > > > > > >> "I know in my application, one user is not allowed to login
> > > > multiple
> > > > > > > >> times until
> > > > > > > >> the session thats logged in is logged out."
> > > > > > > >>
> > > > > > > >> Loop 2 threads can't start until all Loop 1 threads are
> over.
> > > > > > > >> Synchronizing
> > > > > > > >> Timer with "Number of simulated users" equal to the number
> of
> > > > > threads
> > > > > > > will
> > > > > > > >> ensure this.
> > > > > > > >>
> > > > > > > >> "@Flavio I dont need to start all my thread at once,..."
> > > > > > > >>
> > > > > > > >> That's why I suggest you to use a Constant timer with an
> > > > expression.
> > > > > > > >>
> > > > > > > >> "...But I would like to test the real scenario, where 2000
> > users
> > > > > login
> > > > > > > in
> > > > > > > >> 2
> > > > > > > >> hrs. So, basically 1 min 33 users."
> > > > > > > >>
> > > > > > > >> Modify that 300 in Constant Timer expression for the value
> > > > > equivalent
> > > > > > to
> > > > > > > >> time gap for 33 users within 1 minute. (60000ms / 33 users =
> > > > > > > ~1818ms/user)
> > > > > > > >>
> > > > > > > >> Regards
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to