0% found this document useful (0 votes)
88 views

Apache JMeter - User's Manual - Building A Test Plan-3

Apache JMeter - User's Manual_ Building a Test Plan-3

Uploaded by

Ramamurthy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

Apache JMeter - User's Manual - Building A Test Plan-3

Apache JMeter - User's Manual_ Building a Test Plan-3

Uploaded by

Ramamurthy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Apache JMeter - User's Manual: Building a Test Plan http://jmeter.apache.org/usermanual/build-test-plan.

html

Index Next Prev


About

Overview 3. Building a Test Plan


Changes
Subscribe to What's New A test plan describes a series of steps JMeter will execute when run. A complete test
Issues plan will consist of one or more Thread Groups, logic conrollers, sample generating
License controllers, listeners, timers, assertions, and configuration elements.
Contributors
3.1 Adding and Removing Elements
Download
Adding elements to a test plan can be done by right-clicking on an element
Download Releases in the tree, and choosing a new element from the "add" list. Alternatively,
Developer (Nightly) Builds elements can be loaded from file and added by choosing the "merge" or
"open" option.
Documentation
To remove an element, make sure the element is selected, right-click on
User Manual the element, and choose the "remove" option.
Best Practices
Component Reference
Functions Reference
Javadocs 3.2 Loading and Saving Elements
Localisation (Translator's Guide)
Building JMeter and Add-Ons To load an element from file, right click on the existing tree element to
JMeter Wiki which you want to add the loaded element, and select the "merge" option.
FAQ (Wiki) Choose the file where your elements are saved. JMeter will merge the
elements into the tree.
Tutorials (PDF format)
To save tree elements, right click on an element and choose the "Save
Distributed Testing Selection As ..." option. JMeter will save the element selected, plus all
Recording Tests child elements beneath it. In this way, you can save test tree fragments and
JUnit Sampler individual elements for later use.
Access Log Sampler
Extending JMeter The workbench is not automatically
saved with the test plan, but it can
Community be saved separately as above.
Get Involved
Mailing Lists
SVN Repositories 3.3 Configuring Tree Elements

Foundation Any element in the test tree will present controls in JMeter's right-hand
frame. These controls allow you to configure the behavior of that
ASF particular test element. What can be configured for an element depends on
Sponsorship what type of element it is.
Thanks
The Test Tree itself can be
manipulated by dragging and
dropping components around the
test tree.

3.4 Saving the Test Plan

Although it is not required, we recommend that you save the Test Plan to a
file before running it. To save the Test Plan, select "Save" or "Save Test
Plan As ..." from the File menu (with the latest release, it is no longer
necessary to select the Test Plan element first).

1 of 3 9/3/2013 12:38 AM
Apache JMeter - User's Manual: Building a Test Plan http://jmeter.apache.org/usermanual/build-test-plan.html

JMeter allows you to save the entire


Test Plan tree or only a portion of it.
To save only the elements located in
a particular "branch" of the Test
Plan tree, select the Test Plan
element in the tree from which to
start the "branch", and then click
your right mouse button to access
the "Save Selection As ..." menu
item. Alternatively, select the
appropriate Test Plan element and
then select "Save Selection As ..."
from the Edit menu.

3.5 Running a Test Plan

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.

3.6 Stopping a Test

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:

2 of 3 9/3/2013 12:38 AM
Apache JMeter - User's Manual: Building a Test Plan http://jmeter.apache.org/usermanual/build-test-plan.html

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.

3.7 Error reporting

JMeter reports warnings and errors to the jmeter.log file, as well as some
information on the test run itself. Just occasionally there may be some
errors that JMeter is unable to trap and log; these will appear on the
command console. If a test is not behaving as you expect, please check
the log file in case any errors have been reported (e.g. perhaps a syntax
error in a function call).

Sampling errors (e.g. HTTP 404 - file not found) are not normally reported
in the log file. Instead these are stored as attributes of the sample result.
The status of a sample result can be seen in the various different Listeners.

Index Next Prev

Copyright © 1999-2013, Apache Software Foundation


Apache, Apache JMeter, JMeter, the Apache feather, and the Apache JMeter logo are trademarks of the Apache Software Foundation.

3 of 3 9/3/2013 12:38 AM

You might also like