how to make gui test without displaying in FEST-SWING
Asked Answered
E

3

10

In my project, we are using FEST for GUI testing. We have been persuaded that FEST is powerful, however displaying frames every time is a waste of time. Also we are using continuum and FEST doesn't work with continuum because continuum's maven can't open the GUI (by the way we use maven too and our tests pass in maven on our local machine).

How can I solve this problem?

If it is not possible, please inform me.

Ettieettinger answered 23/2, 2010 at 17:46 Comment(0)
T
8

FEST by design displays the UI. If you don't want the tests to block your desktop, the only way is to use some kind of virtual desktop: - Xvfb (Linux) - VMWare (Linux, Windows) - Auto-logon (Windows - not tested, found somewhere in docs)

You can read more about it here: http://docs.codehaus.org/display/FEST/Continuous+Integration

May or may not be related, but in order to speed up your tests have a look at:

Robot.settings().delayBetweenEvents()

This controls how fast mouse and keyboard events are.

Tedium answered 23/2, 2010 at 17:46 Comment(0)
P
5

You can use the Cacio-tta module of Caciocavallo... I know it sounds like I'm talking about cheese, but it's a real project:

http://openjdk.java.net/projects/caciocavallo/

The testing framework consist of a runner that plugs into Fest ("CacioFESTRunner") and allows you to run the test without disrupting your normal flow, you don't need any special server, since cacio has all that is needed.

It is also fully synchronous, so you don't need to worry about spurious failures due to drawing command being dispatched asynchronously, and it is available as a maven package so it is very easy to setup.

You can find more info here:

http://jroller.com/neugens/entry/caciocavallo_1_1_released

Pricilla answered 23/2, 2010 at 17:46 Comment(0)
A
1

Have a look at WindowLicker:

A framework for the test-driven development of Java systems through the GUI.

I haven't used it myself, but it's written by some of the same people that wrote JMock, so it should be a good quality utility.

Adair answered 23/2, 2010 at 17:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.