Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: converted to 1.6 markup

...

No Format
This example uses the O'Reilly FTP site, www.oro.com. Please be considerate when running this example, and (if possible) consider running against another FTP site.

Anchor
addusers
addusers

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.

...

Next, you need to modify the default properties. Select the Thread Group element in the tree, if you have not already selected it. You should now see the Thread Group Control Panel in the right section of the JMeter window (see Figure 8.1 below)

http://jakarta.apache.org/jmeter/images/screenshots/webtest/threadgroup.png BR

Figure 8.1. Thread Group with Default Values

...

See Figure 8.2 for the completed O'Reilly Users Thread Group.

http://jakarta.apache.org/jmeter/images/screenshots/ftptest/threadgroup2.png BR

Figure 8.2. O'Reilly Users Thread Group

Anchor
adddefaults
adddefaults

Adding Default FTP Request Properties

...

Begin by selecting the O'Reilly Users element. Click your right mouse button to get the Add menu, and then select Add --> Config Element --> FTP Request Defaults. Then, select this new element to view its Control Panel (see Figure 8.3).

http://jakarta.apache.org/jmeter/images/screenshots/ftptest/ftp-defaults.png BR

Figure 8.3. FTP Request Defaults

...

See Figure 8.4 for the completed FTP Request Defaults element

http://jakarta.apache.org/jmeter/images/screenshots/ftptest/ftp-defaults2.png BR

Figure 8.4. FTP Defaults for our Test Plan

Anchor
addrequests
addrequests

Adding FTP Requests

In our Test Plan, we need to make two FTP requests. The first one is for the O'Reilly mSQL Java README file (ftp://ftp.oro.com/pub/msql/java/README), and the second is for the tutorial file (ftp://ftp.oro.com/pub/msql/java/tutorial.txt).

...

  1. Change the Name to "README".
  2. Change the File to Retrieve From Server field to "pub/msql/java/README".
  3. Change the Username field to "anonymous".
  4. Change the Password field to "anonymous".
    No Format
    You do not have to set the Server Name field because you already specified this value in the FTP Request Defaults element.

    http://jakarta.apache.org/jmeter/images/screenshots/ftptest/ftp-request.png BR
    Figure 8.5. FTP Request for O'Reilly mSQL Java README file

...

  1. Change the Name to "tutorial".
  2. Change the File to Retrieve From Server field to "pub/msql/java/tutorial.txt".
  3. Change the Username field to "anonymous".
  4. Change the Password field to "anonymous".
    http://jakarta.apache.org/jmeter/images/screenshots/ftptest/ftp-request2.png BR
    Figure 8.6. FTP Request for O'Reilly mSQL Java tutorial file

Anchor
addlistener
addlistener

Adding a Listener to View/Store the Test Results

...

Select the O'Reilly Users element and add a Spline Visualizer listener (Add --> Listener --> Spline Visualizer).

http://jakarta.apache.org/jmeter/images/screenshots/ftptest/spline-results.png BR

Figure 8.7. Spline Visualizer Listener

Anchor
saveplan
saveplan

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.

Anchor
runplan
runplan

Running the Test Plan

From the Run menu, select Run.

...