apache / jmeter

Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services
https://jmeter.apache.org/
Apache License 2.0
8.43k stars 2.11k forks source link

Allow to pause and resume tests #2400

Open asfimport opened 14 years ago

asfimport commented 14 years ago

Luciana Moreira (Bug 49974): This is an RFE. It would be very interesting to be able to pause and resume tests.

We have tests that need to run for about 24 hours. It does happen that we need to restart our servers in the meantime. For such cases, instead of seeing errors in the tests results for the period that the server was down it would be more interesting to be able to pause the test for a couple of minutes and resume it thereafter.

Votes in Bugzilla: 2 OS: All

Duplicates:

asfimport commented 12 years ago

colin.jackson@nzlotteries.co.nz (migrated from Bugzilla): Can I second the request for a "Pause Button"?

1/. The test system is complex and requires frequent tinkering, which is difficult when running long test sequences. Additionally, the staging environment matches production, which has several scheduled events and down time which interfere with long test runs. 2/. Many long test sequences are for response metric gathering, which precludes doing any other task while the test is active (for the sake of a clean reading). It would be good to be able to pause a test run while some short task on the system is conducted, then resume. 3/. Some tasks cannot be automated, so it would be good for the tester to be able to pause the test, manually perform test steps, then resume the test. 4/. We would like to be able to pause the test and check certain aspects of the system while there is no load, then resume the load.

I would imagine that when a pause button is pressed, in-flight transactions are completed, and no new transactions are initiated. In this way, a pause would not tend to generate false-negative results.

The paused state would be indicated in the "activity light" (maybe it goes from green to amber).

asfimport commented 12 years ago

Sebb (migrated from Bugzilla): The BeanShell server [1] can be used for this, in conjunction with a BeanShell test element (e.g. Timer).

Use the server to set / clear a property (or possibly a variable in bsh.shared - don't know if that works across server and threads).

The timer then checks the property; if set, it waits and loops until the property is cleared.

Obviously a dedicated test element would be easier to use, but if you need a solution now, it would be worth a try.

[1] http://jmeter.apache.org/usermanual/best-practices.html#beanshell_server

asfimport commented 12 years ago

Sebb (migrated from Bugzilla): Note: any implementation needs to work for both GUI and non-GUI modes as well as client-server mode if possible.

asfimport commented 8 years ago

Andrey Pokhilko (migrated from Bugzilla): IMO, This could be easily done as Timer plugin, supporting both UI and non-UI flows...

asfimport commented 8 years ago

UbikLoadPack support (migrated from Bugzilla): (In reply to Andrey Pokhilko from comment 5)

IMO, This could be easily done as Timer plugin, supporting both UI and non-UI flows...

Yes it's a good start. It could test presence of a Flag (that needs to be distributed with an api for remote testing) and sleep when state is paused and poll on it until test is resumed. Note that some queries could fail due to timeout occuring or in case of restart , infrastructure not being warmed up.

asfimport commented 8 years ago

Sebb (migrated from Bugzilla): (In reply to Andrey Pokhilko from comment 5)

IMO, This could be easily done as Timer plugin, supporting both UI and non-UI flows...

Timers don't currently wait; they just return a wait time value. The values of all timers are added up and used by the JMeter engine as the wait time.

If the Timer does not return immediately this would affect engine behaviour.

Using a Pre/Post processor might be a better solution