Reliable UI testing using FEST Swing and Cacio
October 25, 2011 2 Comments
I made some progress on the Cacio Testing Framework today.
- I added keyboard support to Cacio’s RobotPeer, which means you can now test how your components react to keyboard input.
- I added two test runners, CacioTestRunner to automagically run a test inside the Cacio Testing Framework and CacioFESTRunner to run the test both in the CTF and the FEST GUITestRunner, which takes screenshots of failed tests and stores them as PNG.
The advantages of using Cacio Testing Framework over the normal toolkits are:
- No windows popping up, and no messing with mouse/keyboard/focus when running the tests. This can be very annoying when running longish test runs on your desktop.
- Easy deployment on continuous integration servers like Jenkins or similar (put the cacio libs in your Maven pom and annotate your test with CacioTestRunner and off you go).
- 100% reliable testing of UIs. User interface tests tend to be unreliable for reasons outline in my earlier post. With CTF this is no longer an issue, because all painting and graphics is done in a synchronous fashion, no queues, drivers or users etc in the way to mess up stuff.
This project is 100% open source/free software. LadyBug (our company currently in foundation) offers commercial support and few extra features like monitoring and integration as a nice package. If you like to use this in a production environment, we encourage you to contact us :-).