Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
99 lines (88 sloc) 4.65 KB
<?xml version="1.0"?>
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
<!DOCTYPE document
<!ENTITY sect-num '21'>
<document prev="regular_expressions.html" next="glossary.html" id="$Id: $">
<title>User's Manual: Hints and Tips</title>
<section name="&sect-num;. Hints and Tips" anchor="hints">
This section is a collection of various hints and tips that have been suggested by various questions on the JMeter User list.
If you don't find what you are looking for here, please check the <a href="">JMeter Wiki</a>.
Also, try search the JMeter User list; someone may well have already provided a solution.
<subsection name="&sect-num;.1 Passing variables between threads" anchor="variable_and_threads">
JMeter variables have thread scope. This is deliberate, so that threads can act indepently.
However sometimes there is a need to pass variables between different threads, in the same or different Thread Groups.
One way to do this is to use a property instead.
Properties are shared between all JMeter threads, so if one thread <a href="functions.html#__setProperty">sets a property</a>,
another thread can <a href="functions.html#__P">read</a> the updated value.
If there is a lot of information that needs to be passed between threads, then consider using a file.
For example you could use the <a href="component_reference.html#Save_Responses_to_a_file">Save Responses to a file</a>
listener or perhaps a BeanShell PostProcessor in one thread, and read the file using the HTTP Sampler "file:" protocol,
and extract the information using a PostProcessor or BeanShell element.
If you can derive the data before starting the test, then it may well be better to store it in a file,
read it using CSV Dataset.
<subsection name="&sect-num;.2 Enabling Debug logging" anchor="debug_logging">
Most test elements include debug logging. If running a test plan from the GUI,
select the test element and use the Help Menu to enable or disable logging.
The Help Menu also has an option to display the GUI and test element class names.
You can use these to determine the correct property setting to change the logging level.
It is sometimes very useful to see Log messages to debug dynamic scripting languages like BeanShell or
groovy used in JMeter.
Since 2.6, you can view log messages directly in JMeter GUI, to do so, use menu Options &gt; Log Viewer,
a log console will appear at the bottom of the interface.
Note that log messages are cleared each time you disable this option.
By default this log console is disabled, you can enable it by changing in
<subsection name="&sect-num;.3 Searching" anchor="searching">
It is sometimes hard to find in a Test Plan tree and elements using a variable or containing a certain URL or parameter.
A new feature is now available since 2.6, you can access it in Menu Search.
It provides search with following options:
<li>Case Sensitive : Makes search case sensitive</li>
<li>Regexp : Is text to search a regexp, if so Regexp will be searched in Tree of components, example "\btest\b" will match any component that contains test in searchable elements of the component</li>
<figure width="950" height="802" image="searching/raw-search.png">Figure 1 - Search raw text in TreeView</figure>
<figure width="948" height="706" image="searching/raw-search-result.png">Figure 2 - Result in TreeView</figure>
<figure width="948" height="706" image="searching/regexp-search.png">Figure 3 - Search Regexp in TreeView (in this example we search whole word)</figure>
<figure width="948" height="706" image="searching/regexp-search-result.png">Figure 4 - Result in TreeView</figure>
You can’t perform that action at this time.