Suites and Tests

This section explains how Badboy allows you to structure your scripts using Suites, Tests and Templates.

Suites and Test Items

Complex web applications will often have a large number of separate areas of functionality that can be tested independently of each other. Scripts for testing such web sites can end up being very large, so it is very useful to divide the tests into a hierarchy so that people looking the test can understand the different parts more easily.

In earlier versions of Badboy you could use Steps to structure your scripts, and by placing steps inside each other a whole hierarchy could be modeled. This worked well, but many people wanted to be able to make the structure of their scripts clearer, so to help with this, Badboy 2.0 has introduced two new items:

  • Tests - shown as a notepad style icon:
  • Suites - shown as a folder style icon:
Suites and Tests are provided to add to your Badboy script to help to structure it so that it is easy to understand, and to make reports and other output clearer.

Badboy doesn't enforce any rules about how you use and mix Tests, Suites and Steps in your script. If you prefer you can make your whole script from Steps as in previous versions of Badboy. Or, you can place Suites and Tests inside Steps or Steps inside Tests and Suites. You can choose what kind of item (Test, Suite, Step) you would like Badboy to use at the root of your Script Tree in Badboy's preferences.

Advantages to using Tests

There are a number of advantages to using Tests to structure your scripts:

  • Tests make your script easier to understand
  • Tests can extend Templates to save you time and make maintaining your tests easier (see below)
  • You can add References to Tests

Adding Suites and Tests to your Script

The easiest way to add new Suites and Tests to your script is to use the Toolbar button. This will create a new Test or Suite at the top level in your script. From there you can drag it to the position you want it to go with the mouse.

Add Test Toolbar

You can also add Tests and Suites to your script by dragging them from the Toolbox and dropping them in your script where you want the test to go.

Using Tests with Templates

One of the most powerful reasons to use Tests in your script is their support for Test Templates. Test Templates allow you to easily make many tests that follow the same outline without duplicating the structure of the Test many times over in your script. See the section Test Templates for more information about using Test Templates.

Badboy Documentation Generated on Mon Dec 29 22:28:43 EST 2008