|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.functions.AbstractFunction
org.apache.jmeter.functions.StringFromFile
StringFromFile Function to read a String from a text file. Parameters: - file name - variable name (optional - defaults to StringFromFile_) Returns: - the next line from the file - or **ERR** if an error occurs - value is also saved in the variable for later re-use. Ensure that different variable names are used for each call to the function Notes: - JMeter instantiates a copy of each function for every reference in a Sampler or elsewhere; each instance will open its own copy of the the file - the file name is resolved at file (re-)open time - the output variable name is resolved every time the function is invoked
Constructor Summary | |
StringFromFile()
|
Method Summary | |
Object |
clone()
|
String |
execute(SampleResult previousResult,
Sampler currentSampler)
Given the previous SampleResult and the current Sampler, return a string to use as a replacement value for the function call. |
List |
getArgumentDesc()
Return a list of strings briefly describing each parameter your function takes. |
String |
getReferenceKey()
Return the name of your function. |
void |
setParameters(Collection parameters)
A collection of the parameters used to configure your function. |
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.functions.AbstractFunction |
execute, getVariables |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringFromFile()
Method Detail |
public Object clone()
public String execute(SampleResult previousResult, Sampler currentSampler) throws InvalidVariableException
Function
execute
in interface Function
execute
in class AbstractFunction
InvalidVariableException
Function.execute(SampleResult, Sampler)
public void setParameters(Collection parameters) throws InvalidVariableException
Function
setParameters
in interface Function
setParameters
in class AbstractFunction
InvalidVariableException
Function.setParameters(Collection)
public String getReferenceKey()
Function
getReferenceKey
in interface Function
getReferenceKey
in class AbstractFunction
Function.getReferenceKey()
public List getArgumentDesc()
Function
getArgumentDesc
in interface Function
public void testStarted()
TestListener
testStarted
in interface TestListener
StandardJMeterEngine.run()
public void testStarted(String host)
testStarted
in interface TestListener
public void testEnded()
TestListener
testEnded
in interface TestListener
StandardJMeterEngine.stopTest()
public void testEnded(String host)
testEnded
in interface TestListener
public void testIterationStart(LoopIterationEvent event)
TestListener
testIterationStart
in interface TestListener
event
-
|
Apache JMeter 2.0.1.20050615 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |