简体   繁体   English

如何在没有在FEST-SWING中显示的情况下进行gui测试

[英]how to make gui test without displaying in FEST-SWING

In my project, we are using FEST for GUI testing. 在我的项目中,我们使用FEST进行GUI测试。 We have been persuaded that FEST is powerful, however displaying frames every time is a waste of time. 我们已经说服FEST是强大的,但每次显示帧都是浪费时间。 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). 我们也使用连续体,而FEST不能用于连续体,因为连续体的maven无法打开GUI(我们也使用maven的方式,我们的测试在我们的本地机器上传递maven)。

How can I solve this problem? 我怎么解决这个问题?

If it is not possible, please inform me. 如果不可能,请通知我。

FEST by design displays the UI. FEST by design显示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) 如果您不希望测试阻止您的桌面,唯一的方法是使用某种虚拟桌面: - Xvfb(Linux) - VMWare(Linux,Windows) - 自动登录(Windows - 未经测试,在某处找到文档)

You can read more about it here: http://docs.codehaus.org/display/FEST/Continuous+Integration 你可以在这里阅读更多相关信息: 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: 您可以使用Caciocavallo的Cacio-tta模块...我知道这听起来像是在谈论奶酪,但这是一个真实的项目:

http://openjdk.java.net/projects/caciocavallo/ 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. 测试框架由一个插入Fest的跑步者(“CacioFESTRunner”)组成,允许您在不中断正常流程的情况下运行测试,您不需要任何特殊服务器,因为cacio具备所需的全部功能。

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. 它也是完全同步的,因此您不必担心由于异步调度绘图命令而导致的虚假故障,并且它可以作为maven包使用,因此它很容易设置。

You can find more info here: 你可以在这里找到更多信息:

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

Have a look at WindowLicker : 看看WindowLicker

A framework for the test-driven development of Java systems through the GUI. 通过GUI进行Java系统测试驱动开发的框架。

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. 我自己没有使用它,但是它是由编写JMock的一些人写的,所以它应该是一个高质量的实用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM