You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by nmq <nm...@gmail.com> on 2013/06/20 21:29:36 UTC

Is there a way to set the duration for which JMeter waits for a response

I googled this but didn't find anything.
Is there a way to force JMeter to terminate the current thread and move on
to another if an HTTP Sampler receives no response for a certain amount of
time?
This is a situation where there was no response whatsoever for over an hour
and JMeter kept waiting for a response.

Regards
Sam

Re: Is there a way to set the duration for which JMeter waits for a response

Posted by nmq <nm...@gmail.com>.
Thank you
On Jun 20, 2013 3:38 PM, "Deepak Shetty" <sh...@gmail.com> wrote:

> see timeout
> http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request
> The action you want to take on error can be configured on the thread group
> http://jmeter.apache.org/usermanual/component_reference.html#Thread_Group
> You rarely want to stop the thread though - you usually just want it to
> skip the rest of the steps of that test and move onto the next data item
>
>
> On Thu, Jun 20, 2013 at 12:29 PM, nmq <nm...@gmail.com> wrote:
>
> > I googled this but didn't find anything.
> > Is there a way to force JMeter to terminate the current thread and move
> on
> > to another if an HTTP Sampler receives no response for a certain amount
> of
> > time?
> > This is a situation where there was no response whatsoever for over an
> hour
> > and JMeter kept waiting for a response.
> >
> > Regards
> > Sam
> >
>

Re: Is there a way to set the duration for which JMeter waits for a response

Posted by Deepak Shetty <sh...@gmail.com>.
see timeout
http://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request
The action you want to take on error can be configured on the thread group
http://jmeter.apache.org/usermanual/component_reference.html#Thread_Group
You rarely want to stop the thread though - you usually just want it to
skip the rest of the steps of that test and move onto the next data item


On Thu, Jun 20, 2013 at 12:29 PM, nmq <nm...@gmail.com> wrote:

> I googled this but didn't find anything.
> Is there a way to force JMeter to terminate the current thread and move on
> to another if an HTTP Sampler receives no response for a certain amount of
> time?
> This is a situation where there was no response whatsoever for over an hour
> and JMeter kept waiting for a response.
>
> Regards
> Sam
>

RE: Reusable JMeter Modules

Posted by "Robin D. Wilson" <rw...@gmail.com>.
We do this all the time. Our test cases include 'modules' to do things like 'login', and 'registration', etc. You want to use User
Variables, and User Parameters, and Include Controllers and Module Controllers in order to accomplish this.

--
Robin D. Wilson
Sr. Director of Web Development
KingsIsle Entertainment, Inc.
VOICE: 512-777-1861
http://www.kingsisle.com


-----Original Message-----
From: Wanjun Wang [mailto:wangwan@us.ibm.com] 
Sent: Thursday, June 20, 2013 4:16 PM
To: user@jmeter.apache.org
Subject: Reusable JMeter Modules


Is it possible to design reusable modules within JMeter?  For example, there are 3 pages with same design.  Each has main response
and an additional AJAX request.  I'd like to have one module that takes a parameter to navigate to the specified page.  This way, if
there's any change, I just need to change one place instead of 3.  Can JMeter test be written just through Java API's without using
the GUI, as the GUI doesn't seem to support any modularization?  Thanks.

Regards, Wanjun


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


Re: Reusable JMeter Modules

Posted by Mark Miller <ma...@gmail.com>.
As mentioned, read up on Test Fragments and Module Controllers.

Also explore the use of properties files to seed your test variables. I
make functional tests that I use to assert the consistency of disparate
environments. I put all the environmentally unique variables (hosts, ports,
passwords...) into a single property file like so:
DEV.WEB.HOST=devserver.com
DEV.WEB.PORT=8080
PROD.WEB.HOST=myserver.com
PROD.WEB.PORT=443

I run my tests with something like: java -jar ApacheJMeter.jar
-JTARGETENVIRONMENT=PROD

Then I run a little script in the setup thread to use the right set of
properties based on the TARGETENVIRONMENT value

It's a little bit of setup work, but then serves me well in the long run.

Mark




On Thu, Jun 20, 2013 at 3:15 PM, Wanjun Wang <wa...@us.ibm.com> wrote:

>
> Is it possible to design reusable modules within JMeter?  For example,
> there are 3 pages with same design.  Each has main response and an
> additional AJAX request.  I'd like to have one module that takes a
> parameter to navigate to the specified page.  This way, if there's any
> change, I just need to change one place instead of 3.  Can JMeter test be
> written just through Java API's without using the GUI, as the GUI doesn't
> seem to support any modularization?  Thanks.
>
> Regards, Wanjun

Re: Reusable JMeter Modules

Posted by sebb <se...@gmail.com>.
Also look at using variables to parameterise tests

http://wiki.apache.org/jmeter/JMeterFAQ#How_do_I_pass_parameters_into_my_Test_scripts.3F_I_want_to_be_able_to_use_the_same_script_to_test_with_different_numbers_of_threads_and_loops.2C_and_I_don.27t_want_to_have_to_change_the_script_each_time.

On 20 June 2013 22:19, Deepak Shetty <sh...@gmail.com> wrote:
> look at module and include controllers
>
>
>
> On Thu, Jun 20, 2013 at 2:15 PM, Wanjun Wang <wa...@us.ibm.com> wrote:
>
>>
>> Is it possible to design reusable modules within JMeter?  For example,
>> there are 3 pages with same design.  Each has main response and an
>> additional AJAX request.  I'd like to have one module that takes a
>> parameter to navigate to the specified page.  This way, if there's any
>> change, I just need to change one place instead of 3.  Can JMeter test be
>> written just through Java API's without using the GUI, as the GUI doesn't
>> seem to support any modularization?  Thanks.
>>
>> Regards, Wanjun

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


Re: Reusable JMeter Modules

Posted by Deepak Shetty <sh...@gmail.com>.
look at module and include controllers



On Thu, Jun 20, 2013 at 2:15 PM, Wanjun Wang <wa...@us.ibm.com> wrote:

>
> Is it possible to design reusable modules within JMeter?  For example,
> there are 3 pages with same design.  Each has main response and an
> additional AJAX request.  I'd like to have one module that takes a
> parameter to navigate to the specified page.  This way, if there's any
> change, I just need to change one place instead of 3.  Can JMeter test be
> written just through Java API's without using the GUI, as the GUI doesn't
> seem to support any modularization?  Thanks.
>
> Regards, Wanjun

Reusable JMeter Modules

Posted by Wanjun Wang <wa...@us.ibm.com>.
Is it possible to design reusable modules within JMeter?  For example,
there are 3 pages with same design.  Each has main response and an
additional AJAX request.  I'd like to have one module that takes a
parameter to navigate to the specified page.  This way, if there's any
change, I just need to change one place instead of 3.  Can JMeter test be
written just through Java API's without using the GUI, as the GUI doesn't
seem to support any modularization?  Thanks.

Regards, Wanjun

RE: Is there a way to set the duration for which JMeter waits for a response

Posted by "Robin D. Wilson" <rw...@gmail.com>.
The HTTP sampler includes several 'timeout' values. I use them. It reports an error if the timeout expires, then moves on to the
next request (either within the same thread, or in the next - depending on how you setup the thread group).

--
Robin D. Wilson
Sr. Director of Web Development
KingsIsle Entertainment, Inc.
VOICE: 512-777-1861
http://www.kingsisle.com


-----Original Message-----
From: nmq [mailto:nmq0607@gmail.com] 
Sent: Thursday, June 20, 2013 2:30 PM
To: JMeter Users List
Subject: Is there a way to set the duration for which JMeter waits for a response

I googled this but didn't find anything.
Is there a way to force JMeter to terminate the current thread and move on to another if an HTTP Sampler receives no response for a
certain amount of time?
This is a situation where there was no response whatsoever for over an hour and JMeter kept waiting for a response.

Regards
Sam


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