Cacio Testing Howto

Now that Cacio Testing is in a fairly usable shape, I thought it might be useful to write up some instructions how to get going with it, in case you want to test it.

You will need: Mercurial, Maven and JDK7

First clone the source code to your computer:

hg clone cacio

Then build it using maven:

cd cacio
mvn clean install

Then in your project where you intend to use it, add this to the Maven dependencies:


Finally, annotate your testcase with:

public class SimpleFESTTest {

Or if you used FEST’s GUITestRunner, you might want to use the equivalent:

public class SimpleFESTTest {

Those steps should get you running with Cacio Testing. When you run a test with the above annotation, it should no more popup any windows or steal focus. I’d be happy if you could give it a try and report back how it goes, especially in case of problems.


2 Responses to Cacio Testing Howto

  1. Loïc PÉRON says:


    I did just try to use cacio-tta on OSX 10.6.8 with all updates and the Oracle provided JDK7 Developer preview b222, but cacio-tta test do not pass. I tried on command line and in eclipse, both produced the same problem:

    java.lang.ClassCastException: cannot be cast to sun.awt.CGraphicsDevice
    at sun.lwawt.macosx.LWCToolkit.createRobot(
    at java.awt.Robot.init(
    at java.awt.Robot.(
    at org.fest.swing.util.RobotFactory.newRobotInPrimaryScreen(
    at org.fest.swing.image.ScreenshotTaker.(
    at org.fest.swing.image.ScreenshotTaker.(
    at org.fest.swing.junit.runner.FailureScreenshotTaker.(
    at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(
    at org.junit.runners.ParentRunner$
    at org.junit.runners.ParentRunner$1.schedule(
    at org.junit.runners.ParentRunner.runChildren(
    at org.junit.runners.ParentRunner.access$000(
    at org.junit.runners.ParentRunner$2.evaluate(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(

    It seems there are somme assumptions made in the LWAWT toolkit of the OSX port. I would gladly dig into the problem if this was not currently way out of my league.

    • Roman Kennke says:

      Loïc: Try running the test with the options on the java command line.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: