Differences between revisions 2 and 3
Revision 2 as of 2005-07-11 14:19:58
Size: 6188
Comment:
Revision 3 as of 2009-09-20 21:56:33
Size: 6204
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
[[Anchor(addusers)]] <<Anchor(addusers)>>
Line 12: Line 12:
Go ahead and add the [wiki:Self:UserManual/Reference/ThreadGroup: ThreadGroup] element by first selecting the Test Plan, clicking your right mouse button to get the Add menu, and then select Add-->[wiki:Self:UserManual/Reference/ThreadGroup: ThreadGroup]. You should now see the Thread Group element under Test Plan. If you do not see the element, then "expand" the Test Plan tree by clicking on the Test Plan element. Go ahead and add the [[UserManual/Reference/ThreadGroup:|ThreadGroup]] element by first selecting the Test Plan, clicking your right mouse button to get the Add menu, and then select Add-->[[UserManual/Reference/ThreadGroup:|ThreadGroup]]. You should now see the Thread Group element under Test Plan. If you do not see the element, then "expand" the Test Plan tree by clicking on the Test Plan element.
Line 14: Line 14:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/threadgroup.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/threadgroup.png}} <<BR>>
Line 17: Line 17:
[[Anchor(addconfig)]] <<Anchor(addconfig)>>
Line 24: Line 24:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/login-config-element.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/login-config-element.png}} <<BR>>
Line 33: Line 33:
[[Anchor(adddefaults)]] <<Anchor(adddefaults)>>
Line 40: Line 40:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/requestdefaults.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/requestdefaults.png}} <<BR>>
Line 49: Line 49:
[[Anchor(addrequests)]] <<Anchor(addrequests)>>
Line 64: Line 64:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/add.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/add.png}} <<BR>>
Line 74: Line 74:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/modify.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/modify.png}} <<BR>>
Line 80: Line 80:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/delete.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/delete.png}} <<BR>>
Line 86: Line 86:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/search.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/search.png}} <<BR>>
Line 89: Line 89:
[[Anchor(addlistener)]] <<Anchor(addlistener)>>
Line 94: Line 94:
 http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/viewtable.png [[BR]]  {{http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/viewtable.png}} <<BR>>
Line 97: Line 97:
[[Anchor(saveplan)]] <<Anchor(saveplan)>>
Line 105: Line 105:
[[Anchor(runplan)]] <<Anchor(runplan)>>

Building an LDAP Test Plan

In this section, you will learn how to create a basic Test Plan to test an LDAP server. You will create four users that send requests for four tests on the LDAP server.Also, you will tell the users to run their tests twice. So, the total number of requests is (4 users) x (4 requests) x repeat 2 times) = 32 LDAP requests. To construct the Test Plan, you will use the following elements: Thread Group , LDAP Request , LDAP Request Defaults , and View Results in Table .

This example assumes that the LDAP Server is installed in your Local machine.

Adding Users

The first step you want to do with every JMeter Test Plan is to add a Thread Group element. The Thread Group tells JMeter the number of users you want to simulate, how often the users should send requests, and the how many requests they should send.

Go ahead and add the ThreadGroup element by first selecting the Test Plan, clicking your right mouse button to get the Add menu, and then select Add-->ThreadGroup. You should now see the Thread Group element under Test Plan. If you do not see the element, then "expand" the Test Plan tree by clicking on the Test Plan element.

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/threadgroup.png
    Figure 9.1. Thread Group with Default Values

Adding Login Config Element

Begin by selecting the Siptech Users element. Click your right mouse button to get the Add menu, and then select Add --> Config Element --> Login Config Element. Then, select this new element to view its Control Panel.

Like most JMeter elements, the Login Config Element Control Panel has a name field that you can modify. In this example, leave this field with the default value.

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/login-config-element.png
    Figure 9.2 Login Config Element for our Test Plan

Enter Username field to "your Server Username",[[BR]]
The password field to "your Server Passowrd"

These values are default for the LDAP Requests.

Adding LDAP Request Defaults

Begin by selecting the Siptech Users element. Click your right mouse button to get the Add menu, and then select Add --> Config Element -->LDAP Request Defaults. Then, select this new element to view its Control Panel.

Like most JMeter elements, the LDAP Request Defaults Control Panel has a name field that you can modify. In this example, leave this field with the default value.

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/requestdefaults.png
    Figure 9.3 LDAP Defaults for our Test Plan

Enter DN field to "your Server Root Dn".[[BR]]
Enter LDAP Server's Servername field to "localhost".[[BR]]
The port to 389.[[BR]]
These values are default for the LDAP Requests.

Adding LDAP Requests

In our Test Plan, we need to make four LDAP requests.

1. Inbuilt Add Test 1. Inbuilt Modify Test 1. Inbuilt Delete Test 1. Inbuilt Search Test

JMeter sends requests in the order that you add them to the tree. Start by adding the first LDAP Request to the Siptech Users element (Add --> Sampler --> LDAP Request). Then, select the LDAP Request element in the tree and edit the following properties

1. Change the Name to "Inbuilt-Add Test". 1. Select the Add test Radio button

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/add.png
    Figure 9.4.1 LDAP Request for Inbuilt Add test

You do not have to set the Server Name field, port field, Username, Password and DN because you already specified this value in the Login Config Element and LDAP Request Defaults.

Next, add the second LDAP Request and edit the following properties

1. Change the Name to "Inbuilt-Modify Test". 1. Select the Modify test Radio button

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/modify.png
    Figure 9.4.2 LDAP Request for Inbuilt Modify test

1. Change the Name to "Inbuilt-Delete Test". 1. Select the Delete test Radio button

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/delete.png
    Figure 9.4.3 LDAP Request for Inbuilt Delete test

1. Change the Name to "Inbuilt-Search Test". 1. Select the Search test Radio button

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/search.png
    Figure 9.4.4 LDAP Request for Inbuilt Search test

Adding a Listener to View/Store the Test Results

The final element you need to add to your Test Plan is a Listener. This element is responsible for storing all of the results of your LDAP requests in a file and presenting a visual model of the data.Select the Siptech Users element and add a View Results in Table (Add --> Listener -->View Results in Table)

  • http://jakarta.apache.org/jmeter/images/screenshots/ldaptest/viewtable.png
    Figure 9.5 View result in Table Listener

Saving the Test Plan

Although it is not required, we recommend that you save the Test Plan to a file before running it. To save the Test Plan, select Save Test Plan from the File menu (with the latest release, it is no longer necessary to select the Test Plan element first).

JMeter allows you to save the entire Test Plan tree or only a portion of it. To save only the elements located in a particular "branch" of the Test Plan tree, select the Test Plan element in the tree from which to start the "branch", and then click your right mouse button to access the Save As menu item. Alternatively, select the appropriate Test Plan element and then select Save As from the Edit menu.

Running the Test Plan

From the Run menu, select Run.

JMeter lights up a green square in the upper-right-hand corner to indicate if a test is currently running. The square is turned gray when all tests stop. Even after you select "stop", the green light will stay on until all test threads have exited.

UserManual/BuildLdapTest (last edited 2009-09-20 21:56:33 by localhost)