org.apache.jmeter.protocol.http.modifier

Class UserParameterModifier

Implemented Interfaces:
Cloneable, PreProcessor, Serializable, ConfigElement, 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.

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()
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()
void
testEnded(String host)
void
testIterationStart(LoopIterationEvent event)
void
testStarted()
Runs before the start of every test.
void
testStarted(String host)

Methods inherited from class org.apache.jmeter.config.ConfigTestElement

addConfigElement, addTestElement, expectsModification

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

UserParameterModifier

public UserParameterModifier()
Default constructor.

Method Details

clone

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

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

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

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

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()
Runs before the start of every test. Reload the Sequencer with the latest parameter data for each user
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.