Taking Screenshots

When something goes wrong you often need a way to capture the problem so that you can show it to your colleagues, development team or otherwise document the error. The simplest and fastest way to do this is to take a screen shot of the browser window at the time the problem occurs. Badboy takes this concept and extends it - giving you not only the ability to easily and simply capture screen shots but also to scale them to your preferred resolution, and to capture them automatically when Assertions fail.

Capturing a Screen Shot Manually

You can easily capture a screen shot manually using either the Toolbar or Badboy's menus. To take a full-size screen shot, just click the camera icon on the toolbar. The screen shot of the browser window will be captured and placed on the clip-board so that you can paste it into another application - for example, a Word document or your defect tracking tool.

You can also capture screen shots using the Tools menu, which lets you capture reduced size images at 50% and 25% size if you wish.

Screen Shot Menu

Capturing a Screen Shot as part of your Script

If you like you can take screen shots at a predetermined point in your script by adding a Screen Shot item directly. Adding a Screen Shot Item is easy: just drag it from the Toolbox to the place in your Script where you would like it to go. The figure below shows how a Screen Shot item looks in your Script:

Screen Shot Item

When you add a Screen Shot item the Screen Shot property dialog will open. Here you can add a label that will be applied to your images when they are captured and you can specify the scaling you would like to apply. It is often useful to reduce the size of captured images so that they take less space. Badboy makes this easy by letting you specify the percentage size to which the image should be reduced. When the Screen Shot item is played it will capture the browser window as an image which appears as an item under the Screen Shot in the Script tree.

Capturing a Screen Shot Automatically when an Assertion Fails

Badboy can capture a Screen Shot automatically when an Assertion fails. Images captured this way will appear underneath the Assertion in the tree where you can double click on them to view them or copy them to the clipboard by right clicking and selecting 'Copy to Clipboard'.

To enable this feature, select the 'Capture screen shot on failure' in the properties for your Assertion.

Capturing Screen Shots of Response Time Graphs

Badboy can also capture a screen shot of the Graph that is normally displayed in the "Graph" tab next to the Summary View. This is a useful way to capture a display of the response times of items in your test so that you can compare them to previous instances.

Capturing the Response Time Graph is particularly useful if you want to include the graph in HTML reports, as the captured graph will be exported along with other screen shots in the report. See Generating Reports for more information about creating reports with Badboy.

Capturing screen shots of Response Time Graphs requires a valid license key to be entered under Help => Enter License Key


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