org.apache.jmeter.protocol.http.modifier

Class ParamModifier

Implemented Interfaces:
Cloneable, PreProcessor, Serializable, TestElement, TestListener

public class ParamModifier
extends AbstractTestElement
implements TestListener, PreProcessor, 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: 674365 $
See Also:
ParamMask

Fields inherited from interface org.apache.jmeter.testelement.TestElement

COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS

Constructor Summary

ParamModifier()
Default constructor.

Method Summary

ParamMask
getMask()
void
process()
Modifies an entry object to replace the value of any url parameter that matches a defined mask.
void
testEnded()
void
testEnded(String host)
void
testIterationStart(LoopIterationEvent event)
void
testStarted()
void
testStarted(String host)

Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty

Constructor Details

ParamModifier

public ParamModifier()
Default constructor.

Method Details

getMask

public ParamMask getMask()

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 PreProcessor

testEnded

public void testEnded()
Specified by:
testEnded in interface TestListener

testEnded

public void testEnded(String host)
Specified by:
testEnded in interface TestListener

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Specified by:
testIterationStart in interface TestListener

testStarted

public void testStarted()
Specified by:
testStarted in interface TestListener

testStarted

public void testStarted(String host)
Specified by:
testStarted in interface TestListener

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.