alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

JMeter example source code file (hints_and_tips.xml)

This example JMeter source code file (hints_and_tips.xml) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - JMeter tags/keywords

apache, asf, beanshell, hints, if, if, jmeter, jmeter, license, license, postprocessor, this, you, you

The JMeter hints_and_tips.xml source code

<?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
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   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" date="$Date: 2009-05-19 16:50:20 +0100 (Tue, 19 May 2009) $">

<properties>
  <title>User's Manual: Hints and Tips
</properties>

<body>

<section name="§-num;. Hints and Tips" anchor="hints">
<p>
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="http://wiki.apache.org/jakarta-jmeter">JMeter Wiki.
Also, try search the JMeter User list; someone may well have already provided a solution.
</p>
<subsection name="§-num;.1 Passing variables between threads" anchor="variable_and_threads">
<p>
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.
</p>
<p>
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,
another thread can <a href="functions.html#__P">read the updated value.
</p>
<p>
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
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.
</p>
<p>
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.
</p>
</subsection>

<subsection name="§-num;.2 Enabling Debug logging" anchor="debug_logging">
<p>
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.
</p>
</subsection>

</section>

</body>
</document>

Other JMeter examples (source code examples)

Here is a short list of links related to this JMeter hints_and_tips.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.