You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Fabio Rodrigues <fr...@combined.com.au> on 2011/11/29 06:04:41 UTC

Recording Test Plan with Http Proxy server for regression tests

I have been using Jmeter to do some regression tests on the server-side.  

I’ve set up http proxy server and test plan (accordingly to apache web site 
step-by-step instructions), so that I can record all requests and play-back, 
all great so far.

However, I have to keep the Jmeter GUI opened and click on File/Save to save 
the test plan manually, because it doesn’t flush to the test plan file 
automatically.

Considering the non-gui JMeter parameter is only when playing a recorded test 
plan: 

+ Is there anything I can do to make Jmeter flushes the requests to the test 
plan file straightaway whilst recording? 

There are 20 users testing the application with their browsers pointing to 
this Jmeter Proxy server, at the end of the day it wouldn’t be great, if for 
any reason, I can’t save those requests.

Regards,


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


Re: Recording Test Plan with Http Proxy server for regression tests

Posted by David Luu <ma...@gmail.com>.
So your problem is that you're afraid you might get too much data for
JMeter to record as test plan if it doesn't periodically flush out past
recordings?

If there's no optimal solution for you in regards to JMeter (from input of
others on this list), I can offer the following advice, which do require
additional development/scripting work to implement:

* try using another proxy instead, which can log the requests to file in
some format. You can then develop a parser to convert the requests into a
JMeter test plan (which is just XML in a certain format). Any limitations
here would depend on what proxy you use.

* similarly, another alternative to a proxy is to have your users run an
HTTP sniffer tool with their browser during the browsing sessions and have
them manually save the sniffer data (often plain text format) and you
aggregate the results and parse/convert them into a JMeter test plan. Most
of the nice sniffers are browser based extensions/add-ons like
LiveHttpHeaders for Firefox and ieHttpHeaders for IE, both are free. The
individual data from each user will be much less than all of them combined,
so there's less worry about too much data to save. Plus users can manually
flush the sniffer data and record multiple sessions/files instead of one
big one.

On Mon, Nov 28, 2011 at 9:04 PM, Fabio Rodrigues <fr...@combined.com.au>wrote:

> I have been using Jmeter to do some regression tests on the server-side.
>
> I’ve set up http proxy server and test plan (accordingly to apache web site
> step-by-step instructions), so that I can record all requests and
> play-back,
> all great so far.
>
> However, I have to keep the Jmeter GUI opened and click on File/Save to
> save
> the test plan manually, because it doesn’t flush to the test plan file
> automatically.
>
> Considering the non-gui JMeter parameter is only when playing a recorded
> test
> plan:
>
> + Is there anything I can do to make Jmeter flushes the requests to the
> test
> plan file straightaway whilst recording?
>
> There are 20 users testing the application with their browsers pointing to
> this Jmeter Proxy server, at the end of the day it wouldn’t be great, if
> for
> any reason, I can’t save those requests.
>
> Regards,
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Recording Test Plan with Http Proxy server for regression tests

Posted by sebb <se...@gmail.com>.
On 29 November 2011 22:28, Fabio Rodrigues <fr...@combined.com.au> wrote:
> sebb <sebbaz <at> gmail.com> writes:
>
>>
>> On 29 November 2011 05:04, Fabio Rodrigues <frodrig <at> combined.com.au>
> wrote:
>> > I have been using Jmeter to do some regression tests on the server-side.
>> >
>> > I’ve set up http proxy server and test plan (accordingly to apache web site
>> > step-by-step instructions), so that I can record all requests and play-
> back,
>> > all great so far.
>> >
>> > However, I have to keep the Jmeter GUI opened and click on File/Save to
> save
>> > the test plan manually, because it doesn’t flush to the test plan file
>> > automatically.
>> >
>> > Considering the non-gui JMeter parameter is only when playing a recorded
> test
>> > plan:
>> >
>> > + Is there anything I can do to make Jmeter flushes the requests to the
> test
>> > plan file straightaway whilst recording?
>> >
>> > There are 20 users testing the application with their browsers pointing to
>> > this Jmeter Proxy server, at the end of the day it wouldn’t be great, if
> for
>> > any reason, I can’t save those requests.
>>
>> The JMeter Proxy server was originally designed for use with a single
>> browser (though of course that can make parallel requests).
>> As such, generally the person running the browser also runs the JMeter
>> Proxy and can save the test plan as needed.
>>
>> Also, JMeter does not distinguish the source of the browser requests,
>> so the requests from different testers will be intermingled in the
>> test plan.
>>
>> In general, this won't work on replay unless all the requests are
>> completely independent of each other.
>>
>> In any event, the resulting test plan is likely to be very large and
>> difficult to understand and maintain.
>>
>> I would suggest using some other kind of recording proxy - or the
>> server logs - to establish what needs to be tested and the relative
>> request frequencies, and then use that to generate and parameterise a
>> test plan.
>>
>> > Regards,
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe <at> jmeter.apache.org
>> > For additional commands, e-mail: user-help <at> jmeter.apache.org
>> >
>>
>
>
> Thanks for your reply.
>
> I am much more interested in the many users' "requests ordering", so I want
> them intermingled, it is also allright to playback this test plan as a single
> user (as a testplan user), so likely I will set variables to establish the
> current user as "testplan" user.

As already explained, I don't think mingling the requests from the
different users will work in general.
Frequently one sample depends on some information - or state - from
the previous sample.

> It is a regression test, so pretty much we will compare databases, following
> this steps:
>
> 1) backup test data base;
> 2) start jmeter with http proxy server to recording requests from about 20
> users;
> 3) at the end of a day, stop jmeter;
> 4) restore database to regression test database;
> 5) playback the testplan pointing it to the regression test application server;

As I already explained, almost certainly this won't work.

> 6) compare the databases (test X regression test)
>
> I am not concerned about the users timestamp here, I want to see whether
> functionalities worked fine and it results in the same records state.
>
> However, I want to start jmeter and the Http proxy server by command line
> (shell script) and flush the test plan automatically.

Not possible currently, and very unlikely to be added to JMeter for
the reasons already explained.

> Any ideas?

See above; I don't think it will work in general.

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

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


Re: Recording Test Plan with Http Proxy server for regression tests

Posted by Fabio Rodrigues <fr...@combined.com.au>.
sebb <sebbaz <at> gmail.com> writes:

> 
> On 29 November 2011 05:04, Fabio Rodrigues <frodrig <at> combined.com.au> 
wrote:
> > I have been using Jmeter to do some regression tests on the server-side.
> >
> > I’ve set up http proxy server and test plan (accordingly to apache web site
> > step-by-step instructions), so that I can record all requests and play-
back,
> > all great so far.
> >
> > However, I have to keep the Jmeter GUI opened and click on File/Save to 
save
> > the test plan manually, because it doesn’t flush to the test plan file
> > automatically.
> >
> > Considering the non-gui JMeter parameter is only when playing a recorded 
test
> > plan:
> >
> > + Is there anything I can do to make Jmeter flushes the requests to the 
test
> > plan file straightaway whilst recording?
> >
> > There are 20 users testing the application with their browsers pointing to
> > this Jmeter Proxy server, at the end of the day it wouldn’t be great, if 
for
> > any reason, I can’t save those requests.
> 
> The JMeter Proxy server was originally designed for use with a single
> browser (though of course that can make parallel requests).
> As such, generally the person running the browser also runs the JMeter
> Proxy and can save the test plan as needed.
> 
> Also, JMeter does not distinguish the source of the browser requests,
> so the requests from different testers will be intermingled in the
> test plan.
> 
> In general, this won't work on replay unless all the requests are
> completely independent of each other.
> 
> In any event, the resulting test plan is likely to be very large and
> difficult to understand and maintain.
> 
> I would suggest using some other kind of recording proxy - or the
> server logs - to establish what needs to be tested and the relative
> request frequencies, and then use that to generate and parameterise a
> test plan.
> 
> > Regards,
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe <at> jmeter.apache.org
> > For additional commands, e-mail: user-help <at> jmeter.apache.org
> >
> 


Thanks for your reply.

I am much more interested in the many users' "requests ordering", so I want 
them intermingled, it is also allright to playback this test plan as a single 
user (as a testplan user), so likely I will set variables to establish the 
current user as "testplan" user.

It is a regression test, so pretty much we will compare databases, following 
this steps:

1) backup test data base;
2) start jmeter with http proxy server to recording requests from about 20 
users;
3) at the end of a day, stop jmeter;
4) restore database to regression test database;
5) playback the testplan pointing it to the regression test application server;
6) compare the databases (test X regression test)

I am not concerned about the users timestamp here, I want to see whether  
functionalities worked fine and it results in the same records state.

However, I want to start jmeter and the Http proxy server by command line 
(shell script) and flush the test plan automatically.

Any ideas?

Regards,

Fabio




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


Re: Recording Test Plan with Http Proxy server for regression tests

Posted by sebb <se...@gmail.com>.
On 29 November 2011 05:04, Fabio Rodrigues <fr...@combined.com.au> wrote:
> I have been using Jmeter to do some regression tests on the server-side.
>
> I’ve set up http proxy server and test plan (accordingly to apache web site
> step-by-step instructions), so that I can record all requests and play-back,
> all great so far.
>
> However, I have to keep the Jmeter GUI opened and click on File/Save to save
> the test plan manually, because it doesn’t flush to the test plan file
> automatically.
>
> Considering the non-gui JMeter parameter is only when playing a recorded test
> plan:
>
> + Is there anything I can do to make Jmeter flushes the requests to the test
> plan file straightaway whilst recording?
>
> There are 20 users testing the application with their browsers pointing to
> this Jmeter Proxy server, at the end of the day it wouldn’t be great, if for
> any reason, I can’t save those requests.

The JMeter Proxy server was originally designed for use with a single
browser (though of course that can make parallel requests).
As such, generally the person running the browser also runs the JMeter
Proxy and can save the test plan as needed.

Also, JMeter does not distinguish the source of the browser requests,
so the requests from different testers will be intermingled in the
test plan.

In general, this won't work on replay unless all the requests are
completely independent of each other.

In any event, the resulting test plan is likely to be very large and
difficult to understand and maintain.

I would suggest using some other kind of recording proxy - or the
server logs - to establish what needs to be tested and the relative
request frequencies, and then use that to generate and parameterise a
test plan.

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

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