Apache JMeter

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, ConfigElement, 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. This test element is deprecated. Test plans should use User Parameters instead.

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
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS
 
Constructor Summary
UserParameterModifier()
          Deprecated. Default constructor.
 
Method Summary
 Object clone()
          Deprecated.  
 String getXmlUri()
          Deprecated. Return the current XML file name to be read to obtain the parameter data for all users
 void process()
          Deprecated. 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)
          Deprecated. From the GUI screen, set file name of XML to read
 void testEnded()
          Deprecated.  Called once for all threads after the end of a test.
 void testEnded(String host)
          Deprecated.  Called once for all threads after the end of a test.
 void testIterationStart(LoopIterationEvent event)
          Deprecated. Each time through a Thread Group's test script, an iteration event is fired for each thread.
 void testStarted()
          Deprecated. Runs before the start of every test.
 void testStarted(String host)
          Deprecated.  Called just before the start of the test from the main engine thread.
 
Methods inherited from class org.apache.jmeter.config.ConfigTestElement
addConfigElement, addTestElement, expectsModification
 
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addProperty, canRemove, clear, clearTemporary, 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
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserParameterModifier

public UserParameterModifier()
Deprecated. 
Default constructor.

Method Detail

testStarted

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

Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

N.B. testStarted() and testEnded() are called from different threads.

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

testStarted

public void testStarted(String host)
Deprecated. 
Description copied from interface: TestListener

Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.

N.B. testStarted() and testEnded() are called from different threads.

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

testEnded

public void testEnded(String host)
Deprecated. 
Description copied from interface: TestListener

Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

N.B. testStarted() and testEnded() are called from different threads.

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

process

public void process()
Deprecated. 
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()
Deprecated. 
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)
Deprecated. 
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)
Deprecated. 
Description copied from interface: TestListener
Each time through a Thread Group's test script, an iteration event is fired for each thread. This will be after the test elements have been cloned, so in general the instance will not be the same as the ones the start/end methods call.

Specified by:
testIterationStart in interface TestListener
Parameters:
event -

clone

public Object clone()
Deprecated. 
Specified by:
clone in interface ConfigElement
Overrides:
clone in class AbstractTestElement

Apache JMeter

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