JaVa
   

Swing Testing with Abbot

Overview

Abbot is the final Swing testing framework that we will discuss in this section of the tutorial. The primary difference between Abbot and the other two (Jemmy and jfcUnit) is that Abbot provides test recording functionality and playback through Costello (get it, Abbot and Costello?). This functionality makes it easier for us to write tests for a pre-existing app by simply firing up Costello and our app and manually recording the tests. Costello also offers us the ability to edit saved test scripts as well as allowing us to separate our tests into discrete units and then aggregate them. Another difference between Abbot and the others is that it is based off of the java.awt.Robot class—this class was created by Sun to aid in remotely interacting with Swing apps, but is rather low level. Abbot has extended Robot and added more usable interfaces to it for Swing testing. This comes through specifically in the naming of Abbot, which stands for “A better ‘bot”. Where to Get Abbot and Its Required JARs Abbot is an open source project hosted at Sourceforge, and it is available under the Common Public License at http://abbot.sf.net/. Abbot also requires other packages which are not included in its source download: • JUnit: http://junit.org • jdom: http://jdom.org • Xerces parser: http://xml.apache.org/xerces2-j/index.html • GNU RegExp: www.cacas.org/java/gnu/regexp/ (version 1.1.0) • MRJ Toolkit: http://developer.apple.com/samplecode/Sample_Code/QuickTime/QuickTime_for_Java/MRJToolkitStubs.htm (this ZIP file is not included in either the source or ZIP distribution, so you will need to download it) These capabilities are highlighted in the goals of Abbot:


JaVa
   
Comments