Often, functional tests are written closely in conjunction with external documents. For example, it is common to build tests to match corresponding items in a requirements specification, or to build tests based on entries in an issue or bug tracking system. Badboy calls such external entities References and offers features to let you define, track and view the associations between tests and external references within Badboy. This allows, you to know, for example, when a test fails, which requirements, bugs or features are impacted by the failing test. Creating or importing references first can also be a very practical way to create tests, as you can then use them to drive which tests you create and ensure complete coverage by checking the mapping of references to tests is complete.
There are two ways to create References within Badboy: manually or by importing them from another source. Manual creation is performed from the References View which is usually found as a tab in the bottom left corner of the Badboy frame window. You can click the 'New' button to create a new reference, as shown below:

When the button is clicked, Badboy shows a window to let you enter details about the reference:

References can be deleted simply by selecting them in the References View and then pressing the 'Del' key. This removes the reference and unmaps it from any Tests that are mapped to that reference.
Adding references manually to your script can be very tedious and time consuming. To avoid this work Badboy supports features to let you import references from external systems. To support interacting with external systems for managing references, Badboy uses the concept of a 'Reference Provider'. Two reference providers are provided in the stock Badboy install: Microsoft Word (tm) Reference Provider and an Open Office Reference Provider. These two providers both allow you to import headings from word processor documents. So, for example, if you have a .doc file that has all your requirements and they are numbered using Word Headings, Badboy will import them all using the heading numbers from the Word document.
If you want, you can easily write your own reference importer. References can be added using some simple Javascript, allowing you to import references from any source into your script by writing a Javascript routine to read them from the source and add them to Badboy. Here is an example snippet that shows how to add a reference to Badboy using Javascript:
badboy.script.References.add("12345", "BUG", "The web site does not work");
To benefit from defining or importing References in Badboy you must map them to tests. Any number of References may be mapped to a test and any given Reference may be mapped to any number of tests. Mapping can be performed in two different ways:
Once a reference has been mapped to at least one Test, a tick appears next to it in the Reference View:

Once you have mapped one or more References to a Test you will see the Reference information displayed in the Summary display for the test:
