java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.protocol.http.modifier.ParamModifier
- All Implemented Interfaces:
- java.lang.Cloneable, org.apache.jmeter.processor.PreProcessor, java.io.Serializable, org.apache.jmeter.testelement.TestElement, org.apache.jmeter.testelement.TestListener
- public class ParamModifier
- extends org.apache.jmeter.testelement.AbstractTestElement
- implements org.apache.jmeter.testelement.TestListener, org.apache.jmeter.processor.PreProcessor, java.io.Serializable
This modifier will replace any single http sampler's url parameter value with
a value from a given range - thereby "masking" the value set in the http
sampler. The parameter names must match exactly, and the parameter value must
be preset to "*" to diferentiate between duplicate parameter names.
For example, if you set up the modifier with a lower bound of 1, an upper
bound of 10, and an increment of 2, and run the loop 12 times, the parameter
will have the following values (one per loop): 1, 3, 5, 7, 9, 1, 3, 5, 7, 9,
1, 3
The ParamMask object contains most of the logic for stepping through
this loop. You can make large modifications to this modifier's behaviour by
changing one or two method implementations there.
- Version:
- $Revision: 1.15 $ updated on $Date: 2005/07/12 20:51:03 $
|
Field Summary |
private static java.lang.String |
MASK
The key used to find the ParamMask object in the HashMap. |
| Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement |
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty |
MASK
private static final java.lang.String MASK
- The key used to find the ParamMask object in the HashMap.
- See Also:
- Constant Field Values
ParamModifier
public ParamModifier()
- Default constructor.
getMask
public ParamMask getMask()
testStarted
public void testStarted()
- Description copied from interface:
org.apache.jmeter.testelement.TestListener
- Called just before the start of the test Note that not all the test
variables will have been set up at this point.
- Specified by:
testStarted in interface org.apache.jmeter.testelement.TestListener
testStarted
public void testStarted(java.lang.String host)
- Specified by:
testStarted in interface org.apache.jmeter.testelement.TestListener
testEnded
public void testEnded()
- Description copied from interface:
org.apache.jmeter.testelement.TestListener
- Called once for all threads after the end of a test
- Specified by:
testEnded in interface org.apache.jmeter.testelement.TestListener
testEnded
public void testEnded(java.lang.String host)
- Specified by:
testEnded in interface org.apache.jmeter.testelement.TestListener
process
public void process()
- Modifies an entry object to replace the value of any url parameter that
matches a defined mask.
- Specified by:
process in interface org.apache.jmeter.processor.PreProcessor
modifyArgument
private boolean modifyArgument(org.apache.jmeter.config.Argument arg)
- Helper method for
#modifyEntry Replaces a parameter's value if
the parameter name matches the mask name and the value is a '*'.
testIterationStart
public void testIterationStart(org.apache.jmeter.engine.event.LoopIterationEvent event)
- Description copied from interface:
org.apache.jmeter.testelement.TestListener
- Each time through a Thread Group's test script, an iteration event is
fired.
- Specified by:
testIterationStart in interface org.apache.jmeter.testelement.TestListener