javasamplerclient.html
来自「测试工具jmeter可用来进行性能测试」· HTML 代码 · 共 347 行 · 第 1/2 页
HTML
347 行
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerClient.html#setupTest(org.apache.jmeter.protocol.java.sampler.JavaSamplerContext)">setupTest</A></B>(<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerContext.html" title="class in org.apache.jmeter.protocol.java.sampler">JavaSamplerContext</A> context)</CODE>
<BR>
Do any initialization required by this client. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerClient.html#teardownTest(org.apache.jmeter.protocol.java.sampler.JavaSamplerContext)">teardownTest</A></B>(<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerContext.html" title="class in org.apache.jmeter.protocol.java.sampler">JavaSamplerContext</A> context)</CODE>
<BR>
Do any clean-up required by this test at the end of a test run.</TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- ============ 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="setupTest(org.apache.jmeter.protocol.java.sampler.JavaSamplerContext)"><!-- --></A><H3>
setupTest</H3>
<PRE>
public void <B>setupTest</B>(<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerContext.html" title="class in org.apache.jmeter.protocol.java.sampler">JavaSamplerContext</A> context)</PRE>
<DL>
<DD>Do any initialization required by this client. It is generally
recommended to do any initialization such as getting parameter values in
the setupTest method rather than the runTest method in order to add as
little overhead as possible to the test.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the context to run with. This provides access to
initialization parameters.</DL>
</DD>
</DL>
<HR>
<A NAME="runTest(org.apache.jmeter.protocol.java.sampler.JavaSamplerContext)"><!-- --></A><H3>
runTest</H3>
<PRE>
public <A HREF="../../../../../../org/apache/jmeter/samplers/SampleResult.html" title="class in org.apache.jmeter.samplers">SampleResult</A> <B>runTest</B>(<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerContext.html" title="class in org.apache.jmeter.protocol.java.sampler">JavaSamplerContext</A> context)</PRE>
<DL>
<DD>Perform a single sample for each iteration. This method returns a
<code>SampleResult</code> object. <code>SampleResult</code> has many
fields which can be used. At a minimum, the test should use
<code>SampleResult.sampleStart</code> and
<code>SampleResult.sampleEnd</code>to set the time that the test
required to execute. It is also a good idea to set the sampleLabel and
the successful flag.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the context to run with. This provides access to
initialization parameters.
<DT><B>Returns:</B><DD>a SampleResult giving the results of this sample.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/jmeter/samplers/SampleResult.html#sampleStart()"><CODE>SampleResult.sampleStart()</CODE></A>,
<A HREF="../../../../../../org/apache/jmeter/samplers/SampleResult.html#sampleEnd()"><CODE>SampleResult.sampleEnd()</CODE></A>,
<A HREF="../../../../../../org/apache/jmeter/samplers/SampleResult.html#setSuccessful(boolean)"><CODE>SampleResult.setSuccessful(boolean)</CODE></A>,
<A HREF="../../../../../../org/apache/jmeter/samplers/SampleResult.html#setSampleLabel(java.lang.String)"><CODE>SampleResult.setSampleLabel(String)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="teardownTest(org.apache.jmeter.protocol.java.sampler.JavaSamplerContext)"><!-- --></A><H3>
teardownTest</H3>
<PRE>
public void <B>teardownTest</B>(<A HREF="../../../../../../org/apache/jmeter/protocol/java/sampler/JavaSamplerContext.html" title="class in org.apache.jmeter.protocol.java.sampler">JavaSamplerContext</A> context)</PRE>
<DL>
<DD>Do any clean-up required by this test at the end of a test run.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>context</CODE> - the context to run with. This provides access to
initialization parameters.</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultParameters()"><!-- --></A><H3>
getDefaultParameters</H3>
<PRE>
public <A HREF="../../../../../../org/apache/jmeter/config/Arguments.html" title="class in org.apache.jmeter.config">Arguments</A> <B>getDefaultParameters</B>()</PRE>
<DL>
<DD>Provide a list of parameters which this test supports. Any parameter
names and associated values returned by this method will appear in the
GUI by default so the user doesn't have to remember the exact names. The
user can add other parameters which are not listed here. If this method
returns null then no parameters will be listed. If the value for some
parameter is null then that parameter will be listed in the GUI with an
empty value.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>a specification of the parameters used by this test which should
be listed in the GUI, or null if no parameters should be listed.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<b>Apache JMeter</b></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV CLASS
NEXT CLASS</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="JavaSamplerClient.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 1998-2008 Apache Software Foundation. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?