Let us discuss Adding LDAP Requests.
In our Test Plan, we want to use all 9 LDAP requests.
- Thread bind
- Search Test
- Compare Test
- Single bind/unbind Test
- Add Test
- Modify Test
- Rename entry (moddn)
- Delete Test
- Thread unbind
JMeter sends requests in the order that you add them to the tree. Adding a requests always start by:
- Adding the LDAP Extended Request to the LDAP Ext Users element ( Add > Sampler > LDAP Ext Request ). Then, select the LDAP Ext Request element in the tree and edit the following properties.
Adding a Thread bind Request
- Rename the element: “1. Thread bind”
- Select the “Thread bind” button.
- Enter the hostname value from the LDAP server in the Servername field
- Enter the portnumber from the LDAP server (636 : ldap over SSL) in the port field
- (Optional) Enter the baseDN in the DN field, this baseDN will be used as thestarting point for searches, add, deletes etc.
take care that this must be the uppermost shared level for all your request, eg When all information is stored under ou=Users, dc=test, dc=com, you can use this value in the based.
- (Optional) Enter the distinguished name from the user you want to use for authentication. When this field is kept empty, an anonymous bind will be established.
- (Optional) Enter the password for the user you want to authenticate with, an empty password will also lead to an anonymous bind.
- (Optional) Enter a value for the connection timeout with LDAP.
- (Optional) Check the box Use Secure LDAP Protocol if you access with LDAP over SSL (ldaps).
Adding a search Request
- Rename the element: “2. Search Test”.
- Select the “Search Test” button.
- Optional) enter the searchbase under which you want to perform the search, relative to the basedn, used in the thread bind request.
When left empty, the basedn is used as a search base, this files is important if you want to use a “base-entry” or “one-level” search (see below)
- Enter the searchfilter, any decent LDAP search filter will do, but for now, use something simple, like (sn=Doe) or (cn=*)
- (Optional) Enter the scope in the scope field, it has three options:
- baseobject search.
only the given searchbase is used, only for checking attributes or existence.
- onelevel search
Only search in one level below given searchbase is used
- subtree search
Searches for object at any point below the given basedn
- (Optional) Size limit, specifies the maximum number of returned entries,
- (Optional) Time limit, specifies the maximum number of milliseconds, the SERVER can use for performing the search. it is NOT the maximum time the application will wait.
When a very large returnset is returned, from a very fast server, over a very slow line, you may have to wait for ages for the completion of the search request, but this parameter will not influence this.
- (Optional) Attributes you want in the search answer. This can be used to limit the size of the
answer, especially when an object has very large attributes (like jpeg Photo). There are three possibilities:
Leave empty (the default setting must also be empty) This will return all attributes.
Put in one empty value (“”), it will request a non-existent attributes, so in reality it returns no attributes
Put in the attributes, separated by a semi-colon. It will return only the requested attributes
- (Optional) Return object. Checked will return all java-object attributes, it will add these to the requested attributes, as specified above.
Unchecked will mean no java-object attributes will be returned.
- (Optional) Dereference aliases. Checked will mean it will follow references, Unchecked says it will not.
- Optional) Parse the search results?. Checked will mean it gets all results in response data, Unchecked says it will not.
Test Your Software Testing Skills By Taking Our JMeter Practice Tests On This Link
Become Vskills Certified JMeter Tester. Gain some knowledge on the module “Adding LDAP Requests”. Try the free practice test!
Apply For JMeter Certification