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?
- Record one or more scripts. Rational SiteLoad puts the scripts into a
default scenario and a default test.
- 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.
- 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.
- 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.
- 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.
- Name the test. Although Rational SiteLoad provides a default name,
the test will be easier to remember if you give it a meaningful name.
- 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?
- 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:
- In Internet Explorer, select Tools | Internet Options.
- At the General tab, click Settings.
- Click View Files.
- Remove the cookies that correspond to the sites that you want to
record. The cookies are in the form
Cookie:user_name@domain_name.
- At the Rational SiteLoad home page, click Test My Web Site.
- Under Create a New Test, click Record. Rational
SiteLoad displays its browser. You are now recording a script.
- 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.
- When you've finished recording, click Done. This stops
recording, and Rational SiteLoad displays the recorded script.
- 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:
- At the Rational SiteLoad home page, click Test My Web Site.
- Under Tests, click the name of a test. The Overview page
appears.
- Click Edit at the right of the scenario name.
- Change the scenario name and the scripts that the scenario contains.
- Click Done when you are finished.
TOP
Q:
How do I
rename a script?
- At the Rational SiteLoad home page, click Test My Web Site.
- Under Tests, click the name of the test that contains the
script. The Overview page appears.
- Click the name of a script. The View a Script page appears.
- Change the script name.
- 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 cardAmerican
Express or Visaand 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 datato emulate users entering
different types of cards and account numbersyou 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 tableeach row represents
a record, and each column contains data of the same type.
To create a test that uses different data, you need to:
- Record the script to be datapooled.
- Create a datapool for the recorded script.
- 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:
- Decide on the column names for the datapool; for example, Card Type
and Account Number. These column names will appear in Rational
SiteLoad.
- 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
- Save the datapool in .csv format.
Third, import the datapool and associate each column with a line in the
script:
- At the Rational SiteLoad home page, click Test My Web Site.
- Click the Scripts tab.
- Click the name of a script. The View a Script page appears.
- 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.
- Click the first itemin this case, "Card Type." The Edit Script
Action page appears.
- Under Import Datapool, enter the name of the datapool that you
created. Then click Import.
Rational SiteLoad now recognizes the datapool.
- 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."
- Click Done. You have associated the first column of the
datapool with a line in the script.
- Click the second item that you want to datapoolin this case,
"111111111111111."
- 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."
- 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?
- At the Rational SiteLoad home page, click Test My Web Site.
- Under Tests, click the name of a test. The Overview page
appears.
- Click the Requirements tab. The Requirements page appears.
- Click Edit. You'll be able to change the maximum download time
for your pages.
- Click Done when you are finished.
To change the default requirement for all tests:
- At the Rational SiteLoad home page, click Test My Web Site.
- Click the Options tab.
- Click Edit.
- Change the requirement.
- 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.
- At the Rational SiteLoad home page, click Test My Web Site.
- Under Tests, click the name of the test whose load you want to
change.
- Click the User Load tab. The User Load page appears.
- 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.
- 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:
- Install Rational SiteLoad on the Agent computer.
- From the local computer, at the Rational SiteLoad home page, click
Test My Web Site.
- Click the Agents tab.
- Under Install a New Agent, click Go. The Install a New
Agent page appears.
- Enter the name of the Agent computer, and select the operating system
and function.
- 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:
- At the Agent computer, start your browser.
- 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:
- At the local computer, start Rational SiteLoad.
- Write down the address that appears at the address line. It will be
in the form http://user_name.domain.port/widow/Sindex.
- At the Agent computer, enter the entire address at the Address line.
- At the Rational SiteLoad home page, click Test My Web Site.
- Click the Agent tab.
- Under Install a New Agent, click Go. The Install a New
Agent page appears.
- Enter the name of the Agent computer, select the operating system and
function, and then click Done. The Download Agent Software page
appears.
- Click the URL to download the agent software, and then click
Done.
TOP
Q:
How do I
rename a test?
- At the Rational SiteLoad home page, click Test My Web Site.
- Under Tests, click the name of the test that you want to
change. The Overview page appears.
- Click Rename at the right of the test name.
- Change the name of the test.
- Click Done when you are finished.
TOP
Q:
How do I run a
test and examine test results?
- At the Rational SiteLoad home page, click Test My Web Site.
- 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:
- is due merely to a particular user quantity.
- occurs only when you run certain scenarios or scripts.
Establish if slowdowns are due to:
- Web server architecture (no matter what the server is doing, it gets
slow when the number of users reaches a particular quantity).
- poor business logic implementation (the slowdown occurs only during
certain scenarios or scripts).
TOP
Q:
How do I
examine the results of previous tests?
- 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.
- 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?
- At the Overview page, click the Results tab.
- Click the most recent result.