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!

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.

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!
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.

  1. Right click on the Step (this is the symbol at the top of your script)
  2. Select "Properties" - the properties dialog will open
  3. In the "Repeat" section of the properties, select "For each value of variable"
  4. Click OK to close the Step properties dialog
  5. 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!

Playing the Script

  1. Right-click on the Step and select "Play"
  2. You should see the script play through and buy each item from the Surf'n Stuff Catalog!
  3. Click here when the script finishes playing

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.