Welcome to the Badboy Tutorial!
Over the course of this tutorial we'll learn how to use Badboy by creating tests
for a simple web site. The frame below shows the main page of this site
which we will be recording:
Recording a Request
Over the course of this tutorial we'll learn how to use Badboy by creating tests
for a simple web site. The frame below shows the main page of this site
which we will be recording:
Let's start by recording the View Catalog link:
Click on the "View our Catalog" link above
Well done! Your Script Tree should now have recorded
a new Request for the link that you just clicked. It should look something like the image below:

Click the "next" button to continue the tutorial!
Since we are writing a test, we would like to verify that our
page displayed correctly. To do that, Badboy uses Assertions. Let's
add an Assertion to check that the words "Choose from our great line"
appear on this page.
Adding an Assertion
You should now see a new Assertion in your script. If you expand it,
it will have a Content Check underneath it. It should look something like
this:

If the words aren't found when the Assertion plays, it
will warn you. Assertions can do a lot of other useful things too, such as
capture screen shots, or abort your script when failures occur.
Click the "next" button to continue the tutorial!
Next we will learn about Parameters and Variables.
Record a Request with a Parameter
Click on the "Surf'n Flippers" link in the Catalog page above.
You should now have another Request recorded in your Script Tree, underneath
your Assertion. Expand the Request - it should look like
the picture below. Note the the yellow question mark at the bottom.

Click the "next" button to continue the tutorial!
The yellow question mark is called a
"Parameter". It indicates to the website which item you selected on the
previous page. By changing the Parameter, we can select a different item.
Create a Variable for a Parameter
We'd like to test all the items, so we'd like to try all different values
for this parameter. In Badboy we can do this with a "Variable".
In the next step, the Variable Properties dialog will show. When it does,
move it over so you can still read the steps and keep following along.
- In the Script Tree, Right Click on the yellow Parameter and choose "Add Linked Variable".
- The Variable Properties dialog will show
- Enter '0' in the Current Value field, and click the Add button to add it as a value
- Repeat the previous step for '1','2' and '3' so that 0,1,2 and 3 all appear in the Value List
- Click OK to close the dialog
- Click here when you have finished
Have a look at the Variables tab in the Summary View (it's probably in the
lower left hand corner of your Badboy window). You should see a new
variable called "item" there as shown in the picture below:

Notice also that your parameter has changed. Instead of the value '1',
it now has a reference to the item variable:

Click the "next" button to continue the tutorial!
Next we are going to learn about Badboy's two different record modes,
called Request Mode and Navigation Mode.
Our first recordings used Request Mode. For the next item we will try
Navigation mode.
Record a Navigation
- Click the 'Gift Wrapped' checkbox so that it is checked
- Hold down Control and Alt, and at the same time click the Purchase button.
Well done!
You should now have two new items recorded in your script. Expand
the Form Populator. It should look a bit like below:

In Navigation mode Badboy records the name or text of links
and buttons instead of the URLs that they navigate to. Since you clicked on
the 'Purchase' button, Badboy recorded a symbol of a button with the
word 'Purchase'.
Because you checked the 'Gift Wrap' option it also recorded a Form Populator
to check the box on playback.
Click the "next" button to continue the tutorial!
One of Badboy's powerful features is loops.
We would like to make our script attempt to buy every item in the
Surf'n Stuff catalog. To do this, we'll make a loop that runs once for each item.
- Right click on the Step (this is the
symbol at the top of your script)
- Select "Properties" - the properties dialog will open
- In the "Repeat" section of the properties, select "For each value of variable"
- Click OK to close the Step properties dialog
- Click here when you have finished
Your Step should now look like this in the Script Tree

Click the "next" button to continue the tutorial!
Congratulations! You've now finished creating the test script for the Surf'n Stuff
web site. Now we have just one more step to do - let's play the script!
Well done!
You've completed the Badboy tutorial.
Please tell us any feedback about this tutorial by sending to
our Feedback Page!
There's one more thing to try, however. Click on the
"View" menu at the top of the Badboy window and select "Report" to see
the report showing how your script played.