Linux Desktop Testing Project


The Linux Desktop Testing Project is an open-source testing tool that uses computer assistive technology to automate GUIs. The GUI functionality of an application can be tested in Windows, Mac, Linux, Solaris, FreeBSD and embedded environments. The Mac OS X version is called PyATOM, and the Windows version is Cobra.
LDTP can test any accessibility-enabled GNOME application, Mozilla, OpenOffice.org, any Swing-based Java, Qt 4-based and KDE 4.x applications.
LDTP is/was used by the following companies/organizations:
LDTP can be used to remotely test applications.
The LDTP is released under the LGPL.

History

LDTP version 0.1.0 was released in January 2005 and then showcased and discussed at GUADEC 2005. It was then used at the Google Summer of Code in 2006 for Tinderbox integration, Evolution automation, and LDTP regression suite under GNOME organization. Then again in 2007, it was used by the Mozilla Foundation for Firefox automation and Tinderbox integration.

Example

This is an example of how LDTP would test writing in gedit:

  1. !/usr/bin/env python
  2. The standard import stuff.
from ldtp import *
from ooldtp import context as locate
from time import sleep
  1. Here we open the app.
launchapp
  1. Now we find it and make sure it is open.
gedit_win = locate
gedit_win.waittillguiexist
  1. Now we type into gedit.
text_field = gedit_win.getchild
text_field.enterstring
  1. Save a picture to prove we did it.
imagecapture
  1. Quit gedit.
quit = gedit_win.getchild
quit.selectmenuitem
  1. Close without saving.
dont_save = locate
dont_save.waittillguiexist
button = dont_save.getchild
button.click
  1. Wait until gedit is gone.
gedit_win.waittillguinotexist

Diagram of how LDTP works