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:
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.
There are a number of advantages to using Tests to structure your scripts:
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.
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.
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.