stringfromfile.html

来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 615 行 · 第 1/3 页

HTML
615
字号
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/functions/StringFromFile.html#testEnded()">testEnded</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Called once for all threads after the end of a test.
 
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/functions/StringFromFile.html#testEnded(java.lang.String)">testEnded</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Called once for all threads after the end of a test.
 
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/functions/StringFromFile.html#testIterationStart(org.apache.jmeter.engine.event.LoopIterationEvent)">testIterationStart</A></B>(<A HREF="../../../../org/apache/jmeter/engine/event/LoopIterationEvent.html" title="class in org.apache.jmeter.engine.event">LoopIterationEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Each time through a Thread Group's test script, an iteration event is
 fired for each thread.
 
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/functions/StringFromFile.html#testStarted()">testStarted</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Called just before the start of the test from the main engine thread.
 
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/jmeter/functions/StringFromFile.html#testStarted(java.lang.String)">testStarted</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;host)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Called just before the start of the test from the main engine thread.
 
 </TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_org.apache.jmeter.functions.AbstractFunction"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class org.apache.jmeter.functions.<A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html" title="class in org.apache.jmeter.functions">AbstractFunction</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#checkMinParameterCount(java.util.Collection, int)">checkMinParameterCount</A>, <A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#checkParameterCount(java.util.Collection, int)">checkParameterCount</A>, <A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#checkParameterCount(java.util.Collection, int, int)">checkParameterCount</A>, <A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#execute()">execute</A>, <A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#getVariables()">getVariables</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="StringFromFile()"><!-- --></A><H3>
StringFromFile</H3>
<PRE>
public <B>StringFromFile</B>()</PRE>
<DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="clone()"><!-- --></A><H3>
clone</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A> <B>clone</B>()
             throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/CloneNotSupportedException.html" title="class or interface in java.lang">CloneNotSupportedException</A></PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/CloneNotSupportedException.html" title="class or interface in java.lang">CloneNotSupportedException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="execute(org.apache.jmeter.samplers.SampleResult, org.apache.jmeter.samplers.Sampler)"><!-- --></A><H3>
execute</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>execute</B>(<A HREF="../../../../org/apache/jmeter/samplers/SampleResult.html" title="class in org.apache.jmeter.samplers">SampleResult</A>&nbsp;previousResult,
                      <A HREF="../../../../org/apache/jmeter/samplers/Sampler.html" title="interface in org.apache.jmeter.samplers">Sampler</A>&nbsp;currentSampler)
               throws <A HREF="../../../../org/apache/jmeter/functions/InvalidVariableException.html" title="class in org.apache.jmeter.functions">InvalidVariableException</A></PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html" title="class in org.apache.jmeter.functions">AbstractFunction</A></CODE></B></DD>
<DD><p><b>
 N.B. setParameters() and execute() are called from different threads, 
 so both must be synchronized unless there are no parameters to save
 </b></p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html#execute(org.apache.jmeter.samplers.SampleResult, org.apache.jmeter.samplers.Sampler)">execute</A></CODE> in interface <CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html" title="interface in org.apache.jmeter.functions">Function</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#execute(org.apache.jmeter.samplers.SampleResult, org.apache.jmeter.samplers.Sampler)">execute</A></CODE> in class <CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html" title="class in org.apache.jmeter.functions">AbstractFunction</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/jmeter/functions/InvalidVariableException.html" title="class in org.apache.jmeter.functions">InvalidVariableException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/apache/jmeter/functions/Function.html#execute(org.apache.jmeter.samplers.SampleResult, org.apache.jmeter.samplers.Sampler)"><CODE>Function.execute(SampleResult, Sampler)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setParameters(java.util.Collection)"><!-- --></A><H3>
setParameters</H3>
<PRE>
public void <B>setParameters</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&nbsp;parameters)
                   throws <A HREF="../../../../org/apache/jmeter/functions/InvalidVariableException.html" title="class in org.apache.jmeter.functions">InvalidVariableException</A></PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html" title="class in org.apache.jmeter.functions">AbstractFunction</A></CODE></B></DD>
<DD><p><b>
 N.B. setParameters() and execute() are called from different threads, 
 so both must be synchronized unless there are no parameters to save
 </b></p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html#setParameters(java.util.Collection)">setParameters</A></CODE> in interface <CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html" title="interface in org.apache.jmeter.functions">Function</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#setParameters(java.util.Collection)">setParameters</A></CODE> in class <CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html" title="class in org.apache.jmeter.functions">AbstractFunction</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../org/apache/jmeter/functions/InvalidVariableException.html" title="class in org.apache.jmeter.functions">InvalidVariableException</A></CODE><DT><B>See Also:</B><DD><A HREF="../../../../org/apache/jmeter/functions/Function.html#setParameters(java.util.Collection)"><CODE><br/>
 Note: This is always called even if no parameters are provided 
 (versions of JMeter after 2.3.1)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getReferenceKey()"><!-- --></A><H3>
getReferenceKey</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getReferenceKey</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html" title="interface in org.apache.jmeter.functions">Function</A></CODE></B></DD>
<DD>Return the name of your function. Convention is to prepend "__" to the
 name (ie "__regexFunction")
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html#getReferenceKey()">getReferenceKey</A></CODE> in interface <CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html" title="interface in org.apache.jmeter.functions">Function</A></CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html#getReferenceKey()">getReferenceKey</A></CODE> in class <CODE><A HREF="../../../../org/apache/jmeter/functions/AbstractFunction.html" title="class in org.apache.jmeter.functions">AbstractFunction</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/jmeter/functions/Function.html#getReferenceKey()"><CODE>Function.getReferenceKey()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getArgumentDesc()"><!-- --></A><H3>
getArgumentDesc</H3>
<PRE>
public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html" title="class or interface in java.util">List</A> <B>getArgumentDesc</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/jmeter/functions/Function.html" title="interface in org.apache.jmeter.functions">Function</A></CODE></B></DD>
<DD>Return a list of strings briefly describing each parameter your function
 takes. Please use JMeterUtils.getResString(resource_name) to grab a
 resource string. Otherwise, your help text will be difficult to
 internationalize.
 
 This list is not optional. If you don't wish to write help, you must at
 least return a List containing the correct number of blank strings, one
 for each argument.
<P>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?