开发者

how to make gui test without displaying in FEST-SWING

开发者 https://www.devze.com 2022-12-20 20:58 出处:网络
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 w

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 no开发者_开发百科t possible, please inform me.


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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号