Apache JMeter
2.0.1.20050615

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

java.lang.Object
  extended byorg.apache.jmeter.testelement.AbstractTestElement
      extended byorg.apache.jmeter.config.ConfigTestElement
          extended byorg.apache.jmeter.protocol.http.modifier.UserParameterModifier
All Implemented Interfaces:
Cloneable, PreProcessor, Serializable, TestElement, TestListener

public class UserParameterModifier
extends ConfigTestElement
implements PreProcessor, Serializable, TestListener

This modifier will replace any http sampler's url parameter values with parameter values defined in a XML file for each simulated user.

For example if userid and password are defined in the XML parameter file for each user (ie thread), then simulated multiple user activity can occur.

Version:
$Revision: 1.13.2.1 $
Author:
Mark Walsh
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jmeter.config.ConfigTestElement
PASSWORD, USERNAME
 
Fields inherited from interface org.apache.jmeter.testelement.TestElement
ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
UserParameterModifier()
          Default constructor.
 
Method Summary
 Object clone()
           
 String getXmlUri()
          Return the current XML file name to be read to obtain the parameter data for all users
 void process()
          Modifies an entry object to replace the value of any url parameter that matches a parameter name in the XML file.
 void setXmlUri(String xmlURI)
          From the GUI screen, set file name of XML to read
 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()
          Runs before the start of every test.
 void testStarted(String host)
           
 
Methods inherited from class org.apache.jmeter.config.ConfigTestElement
addTestElement
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, canRemove, clear, clearTemporary, 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

UserParameterModifier

public UserParameterModifier()
Default constructor.

Method Detail

testStarted

public void testStarted()
Runs before the start of every test. Reload the Sequencer with the latest parameter data for each user

Specified by:
testStarted in interface TestListener
See Also:
StandardJMeterEngine.run()

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()

testStarted

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

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 parameter name in the XML file.

Specified by:
process in interface PreProcessor

getXmlUri

public String getXmlUri()
Return the current XML file name to be read to obtain the parameter data for all users

Returns:
the name of the XML file containing parameter data for each user

setXmlUri

public void setXmlUri(String xmlURI)
From the GUI screen, set file name of XML to read

Parameters:
xmlURI - the name of the XML file containing the HTTP name value pair parameters per user

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 -

clone

public Object clone()
Specified by:
clone in interface TestElement
Overrides:
clone in class AbstractTestElement

Apache JMeter
2.0.1.20050615

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