SPONSORS:






View RSS Feed

Ronak

Running and Stopping a Test in JMeter

Rate this Entry
by , 06-21-2015 at 01:34 AM (388 Views)
Running and Stopping a Test in JMeter

 Running a Test Plan in JMeter
To run your test plan, choose "Start" (Control + r) from the "Run" menu item. When JMeter is running, it shows a small green box at the right hand end of the section just under the menu bar. You can also check the "Run" menu. If "Start" is disabled, and "Stop" is enabled, then JMeter is running your test plan (or, at least, it thinks it is).
The numbers to the left of the green box are the number of active threads / total number of threads. These only apply to a locally run test; they do not include any threads started on remote systems when using client-server mode.

 Stopping a Test in JMeter
There are two types of stop command available from the menu:
Stop (Control + '.') - stops the threads immediately if possible. In Versions of JMeter after 2.3.2, many samplers are now Interruptible which means that active samples can be terminated early. The stop command will check that all threads have stopped within the default timeout, which is 5000 ms = 5 seconds. [This can be changed using the JMeter property jmeterengine.threadstop.wait] If the threads have not stopped, then a message is displayed. The Stop command can be retried, but if it fails, then it is necessary to exit JMeter to clean up.
Shutdown (Control + ',')- requests the threads to stop at the end of any current work. Will not interrupt any active samples. The modal shutdown dialog box will remain active until all threads have stopped.

Versions of JMeter after 2.3.2 allow a Stop to be initiated if Shutdown is taking too long. Close the Shutdown dialog box and select Run/Stop, or just press Control + '.'.

When running JMeter in non-GUI mode, there is no Menu, and JMeter does not react to keystrokes such as Control + '.'. So in versions after 2.3.2, JMeter non-GUI mode will listen for commands on a specific port (default 4445, see the JMeter property jmeterengine.nongui.port). In versions after 2.4, JMeter supports automatic choice of an alternate port if the default port is being used (for example by another JMeter instance). In this case, JMeter will try the next higher port, continuing until it reaches the JMeter property jmeterengine.nongui.maxport) which defaults to 4455. If maxport is less than or equal to port, port scanning will not take place. Note that JMeter 2.4 and earlier did not set up the listener for non-GUI clients, only non-GUI standalone tests; this has been fixed.
The chosen port is displayed in the console window.

The commands currently supported are:
Shutdown - graceful shutdown
StopTestNow - immediate shutdown
These commands can be sent by using the shutdown[.cmd|.sh] or stoptest[.cmd|.sh] script respectively. The scripts are to be found in the JMeter bin directory. The commands will only be accepted if the script is run from the same host.




Disclaimer: The article/post is posted with the purpose of sharing knowledge and information.
The article may contain references, extract or content from other informative sources.
Researched/Authored/Compiled by -
Ronak Shah
Practice Head - Software Testing (QA), CIGNEX Datamatics

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 10:59 AM.

Copyright BetaSoft Inc.