Contents

Q: What's the difference between a test, a scenario, and a script?
Q: How do I construct a meaningful test?
Q: How do I record a script?
Q: How do I group scripts into scenarios?
Q: How do I rename a script?
Q: How do I supply scripts with variable data?
Q: How do I set a requirement for a test?
Q: How do I add load to a test?
Q: How do I rename a test?
Q: How do I run a test and examine test results?
Q: How do I interpret test results?
Q: How do I examine the results of previous tests?
Q: I clicked the test name; now I see an Overview page. How do I return to the results of this test run?


Q: What's the difference between a test, a scenario, and a script?

Rational SiteLoad structures tests, scenarios, and scripts as a hierarchy. A test is the most general object. You run a test to determine how your Web site performs.

A test contains at least one scenario. Scenarios let you distinguish between different types of users. For example, one group of users might spend most of their time searching your Web site. Another group of users might spend most of their time ordering products from your Web site. You'd create two scenarios to represent these two groups.

Scenarios, in turn, are made up of scripts. A script is the most specific object in the hierarchy. It contains the user actions that you recorded.

After you record a script, Rational SiteLoad automatically puts the script into a scenario, the scenario into a test, and names each object. You can run the script immediately.


TOP

Q: How do I construct a meaningful test?

  1. Record one or more scripts. Rational SiteLoad puts the scripts into a default scenario and a default test.
  2. Group scripts into scenarios that reflect the types of users that access your site. Although Rational SiteLoad provides default names, you'll want to give your scripts and scenarios meaningful names.
  3. Supply the scripts with variable data (datapools). You are not required to do this, but your scripts will be more realistic if you vary the data.
  4. Set the requirement for the test. The default requirement is that 90% of your Web pages must download in 8 seconds. You can change the percentage and the number of seconds.
  5. Add load to the test. This involves setting the number of users in the test and whether the users are automatically incremented during the test run.
  6. Name the test. Although Rational SiteLoad provides a default name, the test will be easier to remember if you give it a meaningful name.
  7. Run the test and examine the results. Rational SiteLoad lets you examine your results while the test is running. After you examine the results, you'll know whether your site met the requirement that you set.

TOP

Q: How do I record a script?

  1. Clear the cookies for the site that you will record. This enables your test to play back successfully. The following instructions tell you how to clear a cookie in Internet Explorer 5:
    1. In Internet Explorer, select Tools | Internet Options.
    2. At the General tab, click Settings.
    3. Click View Files.
    4. Remove the cookies that correspond to the sites that you want to record. The cookies are in the form Cookie:user_name@domain_name.
  2. At the Rational SiteLoad home page, click Test My Web Site.
  3. Under Create a New Test, click Record. Rational SiteLoad displays its browser. You are now recording a script.
  4. Perform the actions that you want to record. SiteLoad automatically records your actions in the script. When a page is loading, be sure to wait until the icon in the browser's the upper right-hand corner stops spinning. This indicates that the page has finished loading.
  5. When you've finished recording, click Done. This stops recording, and Rational SiteLoad displays the recorded script.
  6. To remove the text in the script (but keep the empty script), click Discard. You can then re-record another script.

TOP

Q: How do I group scripts into scenarios?

Although Rational SiteLoad creates a default scenario that contains all your scripts, in general you'll want to group similar scripts into scenarios, which reflect your user population. When you group your scripts into scenarios, you gain two things: the ability to run scripts simultaneously and the ability to reflect user actions more realistically.

To group scripts into scenarios:

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Under Tests, click the name of a test. The Overview page appears.
  3. Click Edit at the right of the scenario name.
  4. Change the scenario name and the scripts that the scenario contains.
  5. Click Done when you are finished.

TOP

Q: How do I rename a script?

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Under Tests, click the name of the test that contains the script. The Overview page appears.
  3. Click the name of a script. The View a Script page appears.
  4. Change the script name.
  5. Click Done when you are finished.

TOP

Q: How do I supply scripts with variable data?

When you run a test, the scripts it contains use the same data over and over again. Assume that your script selects a charge card—American Express or Visa—and enters an account number to buy an item. Each time you run the test, the script selects the same type of card and enters the same account number. To vary the data—to emulate users entering different types of cards and account numbers—you use datapools.

You can datapool any item that you select from a list or type in on a Web page. The datapool is similar to a database table—each row represents a record, and each column contains data of the same type. To create a test that uses different data, you need to:

  1. Record the script to be datapooled.
  2. Create a datapool for the recorded script.
  3. Import the datapool and associate each datapool column with a line in the script.

First, record the script. Since you are datapooling, you record only one card selection and one account number. Rational SiteLoad will supply the variable data with each test run. In this example, you select American Express, enter a card number, and stop recording.

Second, create a datapool for the recorded script:

  1. Decide on the column names for the datapool; for example, Card Type and Account Number. These column names will appear in Rational SiteLoad.
  2. Enter the data with a text editor, or any application that can save the data in .csv format. You enter the data differently depending on whether it is a predefined category in a drop-down list (such as a credit card type) or variable data that a user enters (such as an account number). For predefined categories, enter the position of the category on the drop-down list, starting with 0. For variable data, simply type in the data. So, for example, if 15-digit American Express cards were the first choice and 16-digit Visa cards were the second choice, your datapool could look like this:
    Card Type, Account Number
    0,111111111111111
    0,222222222222222
    0,333333333333333
    1,4444444444444444
    1,5555555555555555
    1,6666666666666666
  3. Save the datapool in .csv format.

Third, import the datapool and associate each column with a line in the script:

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Click the Scripts tab.
  3. Click the name of a script. The View a Script page appears.
  4. Find the line of the script that you want to associate with a datapool. In this example, you'll see two lines:
    Select option "Card Type"
    Type "Account Number" in text field-field keywords.
    The items that can be datapooled—"Card Type" and "Account Number"—appear as links.
  5. Click the first item—in this case, "Card Type." The Edit Script Action page appears.
  6. Under Import Datapool, enter the name of the datapool that you created. Then click Import. Rational SiteLoad now recognizes the datapool.
  7. Under Edit Script Action, click the second option, select the datapool that you imported, and select the column that you want to associate with the line of the script. In this case, you'll select "Card Type."
  8. Click Done. You have associated the first column of the datapool with a line in the script.
  9. Click the second item that you want to datapool—in this case, "111111111111111."
  10. Under Edit Script Action, click the second option, select the datapool, and select the column that you want to associate with the line of the script. In this case, you'll select "Card Number."
  11. Click Done. You have associated the second column of the datapool with a line in the script.

The next time you run the test, Rational SiteLoad puts values from the datapool column into the line of the script. Rational SiteLoad selects each row randomly, so that each time the script runs, it uses different data.


TOP

Q: How do I set a requirement for a test?

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Under Tests, click the name of a test. The Overview page appears.
  3. Click the Requirements tab. The Requirements page appears.
  4. Click Edit. You'll be able to change the maximum download time for your pages.
  5. Click Done when you are finished.
To change the default requirement for all tests:
  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Click the Options tab.
  3. Click Edit.
  4. Change the requirement.
  5. Click Done when you are finished.

TOP

Q: How do I add load to a test?

You add load to a test by changing the number of users who will run the test.

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Under Tests, click the name of the test whose load you want to change.
  3. Click the User Load tab. The User Load page appears.
  4. Click Edit. You'll be able to change
    • the number of users that you start with.
    • the percentage of users assigned to each scenario and the speed of the connection.
    • how often Rational SiteLoad adds users to the running test.
    • when the test stops.
  5. Click Done when you are finished.

If you are running a heavy load, however, you may need to add another server to manage the load. You'll need to add another server when the Load agent consumes more than about 75% of CPU time, and this figure stays high.

The following paragraphs show two ways to add another server. With the first method, you perform the first step from your local computer, and the remaining steps from the Agent computer:

  1. Install Rational SiteLoad on the Agent computer.
  2. From the local computer, at the Rational SiteLoad home page, click Test My Web Site.
  3. Click the Agents tab.
  4. Under Install a New Agent, click Go. The Install a New Agent page appears.
  5. Enter the name of the Agent computer, and select the operating system and function.
  6. Click Done when you are finished. Although the Download Agent Software page appears, do not download the software (because Rational SiteLoad is already installed on the Agent computer).

The following steps show another way to add a server. With this method, you perform all the steps, except for checking the port number (if necessary) from the Agent computer:

  1. At the Agent computer, start your browser.
  2. At the Address line, type the address of the local computer, where Rational SiteLoad is installed. If the local computer already has a Web server running, you need to include the port number. To determine this number:
    1. At the local computer, start Rational SiteLoad.
    2. Write down the address that appears at the address line. It will be in the form http://user_name.domain.port/widow/Sindex.
    3. At the Agent computer, enter the entire address at the Address line.
  3. At the Rational SiteLoad home page, click Test My Web Site.
  4. Click the Agent tab.
  5. Under Install a New Agent, click Go. The Install a New Agent page appears.
  6. Enter the name of the Agent computer, select the operating system and function, and then click Done. The Download Agent Software page appears.
  7. Click the URL to download the agent software, and then click Done.

TOP

Q: How do I rename a test?

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Under Tests, click the name of the test that you want to change. The Overview page appears.
  3. Click Rename at the right of the test name.
  4. Change the name of the test.
  5. Click Done when you are finished.

TOP

Q: How do I run a test and examine test results?

  1. At the Rational SiteLoad home page, click Test My Web Site.
  2. Under Tests, click Start next to the name of the test that you want to run. Rational SiteLoad displays the results of the test while the test is running.

TOP

Q: How do I interpret test results?

Look for instances where the requirement is exceeded.

Determine whether the slowdown:

Establish if slowdowns are due to:

TOP

Q: How do I examine the results of previous tests?

  1. At the Rational SiteLoad home page, click View Test Results. Rational SiteLoad displays the Results page. Results are grouped under each test according to the time the test ran.
  2. Click the result that you want to view.

TOP

Q: I clicked the test name; now I see an Overview page. How do I return to the results of this test run?

  1. At the Overview page, click the Results tab.
  2. Click the most recent result.