Tuesday, September 21, 2010

Hudson X11 Automated GUI Testing

Hudson X11 Automated Testing - To run GUI automated test in Hudson environment. Ara Pulido, demonstrated me, how to setup Hudson and to run some Mago test. The tests were failing, as the ldtp daemon failed to load. When I started poking, I found, the tests can run only in console mode. We need to start a X session, then need to start the test. Even, after this, the tests were failing. Setting DISPLAY doesn't help ! Accessing accessibility service from terminal failed, as AT_SPI_IOR not set from the terminal.

To overcome, this issue, implemented a service and a client, the service runs during the gnome-session startup.

The service (UNIX socket) listens for commands from client, once received execute them in the shell and returns back both stdout and stderr. Just one command per request, not to make things complicated ;-)

During the test, X session will be started with Xvfb, need to evaluate X dummy driver instead. Accessibility, should be enabled and gnome screen saver, should be disabled, before starting the test. Requirement for LDTP tests.

More about this, available here (documented by Ara) and here, also FAQ

Note: Currently tested with GNOME Desktop on Ubuntu Linux using Mago and LDTP from GIT head

Special thanks to Ara Pulido (Ubuntu), Brian Nitz (Sun / Oracle) and Tyller Ballance (Hudson team)