⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 component_reference.html

📁 测试工具jmeter可用来进行性能测试
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</td>
</tr>
<tr>
<td>New distinguished name</td>
<td>The new distinguished name of the object you want to rename or move, 
      relative to the given DN in the thread bind operation.
</td>
<td>
Yes
</td>
</tr>
</table>
</p>

       
 
<br>
</br>
       
        
<li>
<b>
Add test
</b>
</li>

       
<p>
This is the ldap "add" operation. It can be used to add any kind of 
       object to the LDAP server.  
</p>

    
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>Name</td>
<td>Descriptive name for this sampler that is shown in the tree.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Entry DN</td>
<td>Distinguished name of the object you want to add, relative to the given DN in the thread bind operation.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Add test</td>
<td>A list of attributes and their values you want to use for the object.
     If you need to add a multiple value attribute, you need to add the same attribute with their respective 
     values several times to the list.
</td>
<td>
Yes
</td>
</tr>
</table>
</p>

       
 
<br>
</br>
       
      
<li>
<b>
Delete test
</b>
</li>

       
<p>
 This is the LDAP "delete" operation, it can be used to delete an 
       object from the LDAP tree 
</p>

    
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>Name</td>
<td>Descriptive name for this sampler that is shown in the tree.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Delete</td>
<td>Distinguished name of the object you want to delete, relative to the given DN in the thread bind operation.
</td>
<td>
Yes
</td>
</tr>
</table>
</p>

       
 
<br>
</br>
       
      
<li>
<b>
Search test
</b>
</li>

       
<p>
This is the LDAP "search" operation, and will be used for defining searches.  
</p>

    
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>Name</td>
<td>Descriptive name for this sampler that is shown in the tree.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Search base</td>
<td>Distinguished name of the subtree you want your 
      search to look in, relative to the given DN in the thread bind operation.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Search Filter</td>
<td>searchfilter, must be specified in LDAP syntax.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Scope</td>
<td>Use 0 for baseobject-, 1 for onelevel- and 2 for a subtree search. (Default=0)
</td>
<td>
No
</td>
</tr>
<tr>
<td>Size Limit</td>
<td>Specify the maximum number of results you want back from the server. (default=0, which means no limit.) When the sampler hits the maximum number of results, it will fail with errorcode 4
</td>
<td>
No
</td>
</tr>
<tr>
<td>Time Limit</td>
<td>Specify the maximum amount of (cpu)time (in miliseconds) that the server can spend on your search. Take care, this does not say anything about the responsetime. (default is 0, which means no limit)
</td>
<td>
No
</td>
</tr>
<tr>
<td>Attributes</td>
<td>Specify the attributes you want to have returned, seperated by a semicolon. An empty field will return all attributes
</td>
<td>
No
</td>
</tr>
<tr>
<td>Return object</td>
<td>Whether the object will be returned (true) or not (false). Default=false
</td>
<td>
No
</td>
</tr>
<tr>
<td>Dereference aliases</td>
<td>If true, it will dereference aliases, if false, it will not follow them (default=false)
</td>
<td>
No
</td>
</tr>
</table>
</p>


 
<br>
</br>
       
      
<li>
<b>
Modification test
</b>
</li>

       
<p>
This is the LDAP "modify" operation. It can be used to modify an object. It
       can be used to add, delete or replace values of an attribute. 
</p>

    
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>Name</td>
<td>Descriptive name for this sampler that is shown in the tree.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Entry name</td>
<td>Distinguished name of the object you want to modify, relative 
      to the given DN in the thread bind operation
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Modification test</td>
<td>The attribute-value-opCode triples. The opCode can be any 
     valid LDAP operationCode (add, delete/remove or replace). If you don't specify a value with a delete operation,
     all values of the given attribute will be deleted. If you do specify a value in a delete operation, only 
     the given value will be deleted. If this value is non-existent, the sampler will fail the test.
</td>
<td>
Yes
</td>
</tr>
</table>
</p>

       
 
<br>
</br>
       
      
<li>
<b>
Compare
</b>
</li>

       
<p>
This is the LDAP "compare" operation. It can be used to compare the value 
       of a given attribute with some already known value. In reality this is mostly 
       used to check whether a given person is a member of some group. In such a case
        you can compare the DN of the user as a given value, with the values in the
         attribute "member" of an object of the type groupOfNames.
         If the compare operation fails, this test fails with errorcode 49.
</p>

    
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>Name</td>
<td>Descriptive name for this sampler that is shown in the tree.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Entry DN</td>
<td>The current distinguished name of the object of 
      which you want  to compare an attribute, relative to the given DN in the thread bind operation.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Compare filter</td>
<td>In the form "attribute=value"
</td>
<td>
Yes
</td>
</tr>
</table>
</p>

    
</ol>
<p><b>See Also:</b>
<ul>
<li><a href="build-ldapext-test-plan.html">Building an LDAP Test Plan</a></li>
<li><a href="../usermanual/component_reference.html#LDAP_Extended_Request_Defaults">LDAP Extended Request Defaults</a>
</li>
</ul>
</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<hr>
<table border="0" cellspacing="0" cellpadding="2">
<tr><td>
<font face="arial,helvetica,sanserif">
<h3><a name="Access_Log_Sampler">18.1.9 Access Log Sampler</h3></a>
</font>
</td></tr>
<tr><td>
<center>
<h2>
(Alpha Code)
</h2>
</center>
<p>
AccessLogSampler was designed to read access logs and generate http requests.
For those not familiar with the access log, it is the log the webserver maintains of every
request it accepted. This means the every image and html file. The current implementation
is complete, but some features have not been enabled. There is a filter for the access
log parser, but I haven't figured out how to link to the pre-processor. Once I do, changes
to the sampler will be made to enable that functionality.
</p>


<p>
Tomcat uses the common format for access logs. This means any webserver that uses the
common log format can use the AccessLogSampler. Server that use common log format include:
Tomcat, Resin, Weblogic, and SunOne. Common log format looks
like this:
</p>


<p>
127.0.0.1 - - [21/Oct/2003:05:37:21 -0500] "GET /index.jsp?%2Findex.jsp= HTTP/1.1" 200 8343
</p>


<p>
The current implemenation of the parser only looks at the text within the quotes.
Everything else is stripped out and igored. For example, the response code is completely
ignored by the parser. For the future, it might be nice to filter out entries that
do not have a response code of 200. Extending the sampler should be fairly simple. There
are two interfaces you have to implement.
</p>


<p>
org.apache.jmeter.protocol.http.util.accesslog.LogParser
</p>


<p>
org.apache.jmeter.protocol.http.util.accesslog.Generator
</p>


<p>
The current implementation of AccessLogSampler uses the generator to create a new
HTTPSampler. The servername, port and get images are set by AccessLogSampler. Next,
the parser is called with integer 1, telling it to parse one entry. After that,
HTTPSampler.sample() is called to make the request.

<code>


<pre>

            samp = (HTTPSampler) GENERATOR.generateRequest();
            samp.setDomain(this.getDomain());
            samp.setPort(this.getPort());
            samp.setImageParser(this.isImageParser());
            PARSER.parse(1);
            res = samp.sample();
            res.setSampleLabel(samp.toString());

</pre>


</code>

The required methods in LogParser are: setGenerator(Generator) and parse(int).
Classes implementing Generator interface should provide concrete implementation
for all the methods. For an example of how to implement either interface, refer to
StandardGenerator and TCLogParser.

</p>


<p><b>Control Panel</b></p>
<div align="center"><img width='582' height='301' src="../../docs/images/screenshots/accesslogsampler.png"></div>
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>Description</th><th>Required</th></tr>
<tr>
<td>Name</td>
<td>Descriptive name for this controller that is shown in the tree.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Server</td>
<td>Domain name or IP address of the web server.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Port</td>
<td>Port the web server is listening to.
</td>
<td>
No (defaults to 80)
</td>
</tr>
<tr>
<td>Log parser class</td>
<td>The log parser class is responsible for parsing the logs.
</td>
<td>
Yes (default provided)
</td>
</tr>
<tr>
<td>Filter</td>
<td>The filter class is used to filter out certain lines.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Location of log file</td>
<td>The location of the access log file.
</td>
<td>
Yes
</td>
</tr>
</table>
</p>
<p>

The TCLogParser processes the access log independently for each thread.
The SharedTCLogParser and OrderPreservingLogParser share access to the file, 
i.e. each thread gets the next entry in the log.

</p>
<p>

The SessionFilter is intended to handle Cookies across threads. 
It does not filter out any entries, but modifies the cookie manager so that the cookies for a given IP are
processed by a single thread at a time. If two threads try to process samples from the same client IP address,
then one will be forced to wait until the other has completed.

</p>
<p>

The LogFilter is intended to allow access log entries to be filtered by filename and regex,
as well as allowing for the replacement of file extensions. However, it is not currently possible
to configure this via the GUI, so it cannot really be used.

</p>
</td></tr>
<tr><td><br></td></tr>
</table>
<hr>
<table border="0" cellspacing="0" cellpadding="2">
<tr><td>
<font face="arial,helvetica,sanserif">
<h3><a name="BeanShell_Sampler">18.1.10 BeanShell Sampler</h3></a>
</font>
</td></tr>
<tr><td>
<p>
This sampler allows you to write a sampler using the BeanShell scripting language.		

</p>
<p>

		
<b>
Please note that the BeanShell jar file is not included with JMeter; it needs to be separately downloaded.
		
<br>
</br>

        For full details on using BeanShell, please see the BeanShell web-site at http://www.beanshell.org/.
</b>


</p>


<p>

The test element supports the ThreadListener and TestListener methods.
These should be defined in the initialisation file.
See the file BeanShellListeners.bshrc for example definitions.

</p>

	
<p><b>Control Panel</b></p>
<div align="center"><img width='592' height='303' src="../../docs/images/screenshots/beanshellsampler.png"></div>
<p>
<b>Parameters</b>
<table border="1" cellspacing="0" cellpadding="2">
<tr><th>Attribute</th><th>

⌨️ 快捷键说明

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