Costello
From AbbotWiki
| Table of contents |
overview
Costello allows you to
- record your interactions with a (supported) Java GUI to XML "scripts." (Currently only AWT/Swing is supported, but we're working on costello.swt (http://cvs.sourceforge.net/viewcvs.py/abbot/costello.swt/))
- edit your scripts, or write them directly (it's just XML)
- playback your scripts, via JUnit: Costello "on the fly" translates a script to its API, and calls it via JUnit.
Costello recording
Costello serializes to very human-readable and -editable XML. See the #Costello demo.
Costello editing
Costello playback
Costello playback can be invoked headlessly (i.e. run from ant or a shell) as well as from a UI.
extending Costello
Costello is extensible at a number of points, e.g.
- script stepping. See javadoc for abbot.script.Step. To support arbitrarily-elaborate script execution, substitute your own StepRunner.
- string->class instance conversion via abbot.script.parsers.*
- recording. EventRecorder is separable from Costello: just feed it an event stream. IIRC custom recorders can just be added to the classpath.
Costello demo
The quickest way to observe Costello's functionality in action (given the variability of SourceForge QoS :-) is to download Abbot and run the short Costello demo (http://cvs.sourceforge.net/viewcvs.py/abbot/abbot/doc/editor-tutorial-1.xml?view=markup). The following bash script (which requires ~16 MB disk to download and unzip) runs correctly from
- Cygwin bash on a w2k box with JRE=Sun 1.4.2_06
- native bash on a SLES9 box with the IBM JRE from rwd-6.0-20041107_2157 (`java -version` == "Classic VM (build 1.4.2, J2RE 1.4.2 IBM build cxia32142-20040926 (JIT enabled: jitc))")
- X forwarded from the latter to the former
in under a minute. Feel free to choose a different mirror or target dir:
export TEMP=/tmp export MIRROR=aleron export AV=0.13.1 cd $TEMP wget -O abbot-$AV.zip http://$MIRROR.dl.sourceforge.net/sourceforge/abbot/abbot-$AV.zip unzip abbot-$AV.zip cd abbot-$AV java -cp lib/abbot.jar junit.extensions.abbot.ScriptFixture doc/editor-tutorial-1.xml cd $TEMP
Note that no JUnit UI (e.g. test runner) was visible: Abbot's junit.extensions.abbot.ScriptFixture transparently translates Costello XML to JUnit testcases, and runs them, on-the-fly.
more information on Costello
- "Getting Started with Costello": choose "User Guide" from the nav bar on the home page (http://abbot.sourceforge.net/), or choose http://abbot.sourceforge.net/doc/user-guide.html
- the rest of the home page (http://abbot.sourceforge.net/)
- the javadoc (http://abbot.sourceforge.net/doc/api/overview-summary.html). The main packages of interest for Costello are abbot.script and abbot.editor.*
- the code (http://cvs.sourceforge.net/viewcvs.py/abbot/)
![[Main Page]](/wiki/stylesheets/images/wiki.png)