You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Wanjun Wang <wa...@us.ibm.com> on 2013/06/20 23:15:52 UTC
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
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