📄 component_reference.html
字号:
This may use a lot of memory if there are many different large files.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Use HTTP Proxy</td>
<td>Check box if http proxy should be used
</td>
<td>
No
</td>
</tr>
<tr>
<td>Proxy Host</td>
<td>Proxy hostname
</td>
<td>
No
</td>
</tr>
<tr>
<td>Proxy Port</td>
<td>Proxy host port
</td>
<td>
No
</td>
</tr>
</table>
</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="LDAP_Request">18.1.7 LDAP Request</h3></a>
</font>
</td></tr>
<tr><td>
This Sampler lets you send a different Ldap request(Add, Modify, Delete and Search) to an LDAP server.
<p>
If you are going to send multiple requests to the same LDAP server, consider
using an
<a href="../usermanual/component_reference.html#LDAP_Request_Defaults">LDAP Request Defaults</a>
Configuration Element so you do not have to enter the same information for each
LDAP Request.
</p>
The same way the
<a href="../usermanual/component_reference.html#Login_Config_Element">Login Config Element</a>
also using for Login and password.
<p><b>Control Panel</b></p>
<div align="center"><img width='505' height='476' src="../../docs/images/screenshots/ldap_request.png"></div>
<p>
There are two ways to create test cases for testing an LDAP Server.
</p>
<ol>
<li>
Inbuilt Test cases.
</li>
<li>
User defined Test cases.
</li>
</ol>
<p>
There are four test scenarios of testing LDAP. The tests are given below:
</p>
<ol>
<li>
Add Test
</li>
<ol>
<li>
Inbuilt test :
<p>
This will add a pre-defined entry in the LDAP Server and calculate
the execution time. After execution of the test, the created entry will be
deleted from the LDAP
Server.
</p>
</li>
<li>
User defined test :
<p>
This will add the entry in the LDAP Server. User has to enter all the
attributes in the table.The entries are collected from the table to add. The
execution time is calculated. The created entry will not be deleted after the
test.
</p>
</li>
</ol>
<li>
Modify Test
</li>
<ol>
<li>
Inbuilt test :
<p>
This will create a pre-defined entry first, then will modify the
created entry in the LDAP Server.And calculate the execution time. After
execution
of the test, the created entry will be deleted from the LDAP Server.
</p>
</li>
<li>
User defined test
<p>
This will modify the entry in the LDAP Server. User has to enter all the
attributes in the table. The entries are collected from the table to modify.
The execution time is calculated. The entry will not be deleted from the LDAP
Server.
</p>
</li>
</ol>
<li>
Search Test
</li>
<ol>
<li>
Inbuilt test :
<p>
This will create the entry first, then will search if the attributes
are available. It calculates the execution time of the search query. At the
end of the execution,created entry will be deleted from the LDAP Server.
</p>
</li>
<li>
User defined test
<p>
This will search the user defined entry(Search filter) in the Search
base (again, defined by the user). The entries should be available in the LDAP
Server. The execution time is calculated.
</p>
</li>
</ol>
<li>
Delete Test
</li>
<ol>
<li>
Inbuilt test :
<p>
This will create a pre-defined entry first, then it will be deleted
from the LDAP Server. The execution time is calculated.
</p>
</li>
<li>
User defined test
<p>
This will delete the user-defined entry in the LDAP Server. The entries
should be available in the LDAP Server. The execution time is calculated.
</p>
</li>
</ol>
</ol>
<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 Name or IP</td>
<td>Domain name or IP address of the LDAP server.
JMeter assumes the LDAP server is listening on the default port(389).
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Port</td>
<td>default port(389).
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>root DN</td>
<td>DN for the server to communicate
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Username</td>
<td>LDAP server username.
</td>
<td>
Usually
</td>
</tr>
<tr>
<td>Password</td>
<td>LDAP server password.
</td>
<td>
Usually
</td>
</tr>
<tr>
<td>Entry DN</td>
<td>the name of the context to create or Modify; may not be empty Example: do you want to add cn=apache,ou=test
you have to add in table name=cn, value=apache
</td>
<td>
yes
</td>
</tr>
<tr>
<td>Delete</td>
<td>the name of the context to Delete; may not be empty
</td>
<td>
yes
</td>
</tr>
<tr>
<td>Search base</td>
<td>the name of the context or object to search
</td>
<td>
yes
</td>
</tr>
<tr>
<td>Search filter</td>
<td> the filter expression to use for the search; may not be null
</td>
<td>
yes
</td>
</tr>
<tr>
<td>add test</td>
<td> this name, value pair to added in the given context object
</td>
<td>
yes
</td>
</tr>
<tr>
<td>modify test</td>
<td> this name, value pair to add or modify in the given context object
</td>
<td>
yes
</td>
</tr>
</table>
</p>
<p><b>See Also:</b>
<ul>
<li><a href="build-ldap-test-plan.html">Building an Ldap Test Plan</a></li>
<li><a href="../usermanual/component_reference.html#LDAP_Request_Defaults">LDAP 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="LDAP_Extended_Request">18.1.8 LDAP Extended Request</h3></a>
</font>
</td></tr>
<tr><td>
This Sampler can send all 8 different LDAP request to an LDAP server. It is an extended version of the LDAP sampler,
therefore it is harder to configure, but can be made much closer resembling a real LDAP session.
<p>
If you are going to send multiple requests to the same LDAP server, consider
using an
<a href="../usermanual/component_reference.html#LDAP_Extended_Request_Defaults">LDAP Extended Request Defaults</a>
Configuration Element so you do not have to enter the same information for each
LDAP Request.
</p>
<p><b>Control Panel</b></p>
<div align="center"><img width='595' height='542' src="../../docs/images/screenshots/ldapext_request.png"></div>
<p>
There are nine test operations defined. These operations are given below:
</p>
<ol>
<li>
<b>
Thread bind
</b>
</li>
<p>
Any LDAP request is part of an LDAP session, so the first thing that should be done is starting a session to the LDAP server.
For starting this session a thread bind is used, which is equal to the LDAP "bind" operation.
The user is requested to give a username (Distinguished name) and password,
which will be used to initiate a session.
When no password, or the wrong password is specified, an anonymous session is started. Take care,
omitting the password will not fail this test, a wrong password will.
</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>Servername</td>
<td>The name (or IP-address) of the LDAP server.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Port</td>
<td>The port number that the LDAP server is listening to. If this is omitted
JMeter assumes the LDAP server is listening on the default port(389).
</td>
<td>
No
</td>
</tr>
<tr>
<td>DN</td>
<td>The distinguished name of the base object that will be used for any subsequent operation.
It can be used as a starting point for all operations. You cannot start any operation on a higher level than this DN!
</td>
<td>
No
</td>
</tr>
<tr>
<td>Username</td>
<td>Full distinguished name of the user as which you want to bind.
</td>
<td>
No
</td>
</tr>
<tr>
<td>Password</td>
<td>Password for the above user. If omitted it will result in an anonymous bind.
If is is incorrect, the sampler will return an error and revert to an anonymous bind.
</td>
<td>
No
</td>
</tr>
</table>
</p>
<br>
</br>
<li>
<b>
Thread unbind
</b>
</li>
<p>
This is simply the operation to end a session.
It is equal to the LDAP "unbind" operation.
</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>
</table>
</p>
<br>
</br>
<li>
<b>
Single bind/unbind
</b>
</li>
<p>
This is a combination of the LDAP "bind" and "unbind" operations.
It can be used for an authentication request/password check for any user. It will open an new session, just to
check the validity of the user/password combination, and end the session again.
</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>Username</td>
<td>Full distinguished name of the user as which you want to bind.
</td>
<td>
Yes
</td>
</tr>
<tr>
<td>Password</td>
<td>Password for the above user. If omitted it will result in an anonymous bind.
If is is incorrect, the sampler will return an error.
</td>
<td>
No
</td>
</tr>
</table>
</p>
<br>
</br>
<li>
<b>
Rename entry
</b>
</li>
<p>
This is the LDAP "moddn" operation. It can be used to rename an entry, but
also for moving an entry or a complete subtree to a different place in
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>Old entry name</td>
<td>The current distinguished name of the object you want to rename or move,
relative to the given DN in the thread bind operation.
</td>
<td>
Yes
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -