Apache JMeter
2.0.1.20050615

org.apache.jmeter.protocol.http.modifier
Class ParamModifier

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.protocol.http.modifier.ParamModifier
All 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: 1.13.2.1 $ updated on $Date: 2004/07/03 02:07:54 $
Author:
David La France
See Also:
ParamMask, Serialized Form

Field Summary
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
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()
          Called once for all threads after the end of a test
 void testEnded(String host)
           
 void testIterationStart(LoopIterationEvent event)
          Each time through a Thread Group's test script, an iteration event is fired.
 void testStarted()
          Called just before the start of the test Note that not all the test variables will have been set up at this point.
 void testStarted(String host)
           
 
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, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamModifier

public ParamModifier()
Default constructor.

Method Detail

getMask

public ParamMask getMask()

testStarted

public void testStarted()
Description copied from interface: 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 TestListener
See Also:
StandardJMeterEngine.run()

testStarted

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

testEnded

public void testEnded()
Description copied from interface: TestListener
Called once for all threads after the end of a test

Specified by:
testEnded in interface TestListener
See Also:
StandardJMeterEngine.stopTest()

testEnded

public void testEnded(String host)
Specified by:
testEnded in interface 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 PreProcessor

testIterationStart

public void testIterationStart(LoopIterationEvent event)
Description copied from interface: TestListener
Each time through a Thread Group's test script, an iteration event is fired.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -
See Also:
TestListener.testIterationStart(LoopIterationEvent)

Apache JMeter
2.0.1.20050615

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