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.

Using Screen Shots for Manual Reviews

Sometimes there are cases where automated testing simply cannot replace the function of a real, intelligent human viewing a page. Reviewing the quality of images, or the exact layout of items on a page, the readibility of fonts, or many other possible requirements are things that only a human can do. However this does not mean you cannot use automation for such tests: only the review part requires a human, not the processes that generate the pages to be reviewed. Therefore Badboy supports the idea of flagging screen shots as requiring review. To do this, just check the box in the Screen Shot item properties window called "Flag this Screen Shot for Review". When executing such a Screen Shot item, Badboy takes the screen shot and notes that it needs manual review. Then when the script is finished running, you can generate a Review Report containing all the items requiring review along with the notes from the Documentation in a simple format that allows a human to quickly scan each screen shot and validate that it satisfies the requirements. To view the Review Report, select it from the menu using View => Report => Review Report.

You can enter notes about what requires review in the normal Documentation section of the Screen Shot item's properties window and these will be shown along side the screen shots captured in the Review Report

You can also send Review Reports by email using a Send Item from the Toolbox. This can make a very convenient mechanism whereby you can run your Badboy tests off line and get a report of items requiring review sent to you by email afterwards.

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 Thu Dec 31 12:56:46 EST 2009