junit - Easiest way to unit test SWT and Swing apps in a headless environment? -


I'm testing some SWT and swing codes for a project on the unit and on which I am working and The tests run fine as long as I am running them from eclipse.

As soon as I run them in my Hudson environment, because Hudson runs the test without head mode.

What is the best way to do this? Open source solutions only please (because the project is open source)

You can run (X virtual framebuffer, an X11 server which performs all graphical operations in memory) And it works fine.

But with Hudson's plugin there is another solution for Xvnc. Just install the plugin and check the checkbox in the Job Configuration screen:

Hudson will automatically start an Xvnc session and DISPLAY will set the environment variable to the appropriate value and then The closure will be closed when the session is completed One of the advantages is that the Xvfb method is that if you have more than one swing / SWT projects, each build has its own X session. This is not an issue at all, but it seems like a good idea.

Before using this plugin, you must explicitly install Xvnc. Less obvious (though sensible) is that you have to set a password you can turn it on:

  $ vncpassword  

Which should be done as Hudson.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -