Jump to content

Linux Desktop Testing Project

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Helios crucible (talk | contribs) at 04:22, 16 December 2014. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Linux Desktop Testing Project
Initial releaseJanuary 28, 2005; 19 years ago (2005-01-28)[1]
Repository
Written inPython, C, C#, Other [2]
Operating systemLinux, OS X, Windows [3]
TypeAutomated testing
LicenseGNU LGPL [4]
Websiteldtp.freedesktop.org/wiki/
github.com/ldtp

The Linux Desktop Testing Project (LDTP) is an open source testing tool that uses computer assistive technology[6] to automate GUIs.[7] The GUI functionality of an application can be tested in Windows, Mac, Linux, Solaris, FreeBSD and embedded environments.[8] The Mac OS X version is called PyATOM,[9] and the Windows version is Cobra.[10]

LDTP can test any accessibility-enabled GNOME application, Mozilla, OpenOffice.org, any Swing-based Java, Qt 4-based and KDE 4.x applications.[11]

LDTP is/was used by the following companies/organizations:[12]

LDTP can be used to remotely test applications.[13][14]

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[15][16] for Tinderbox integration, Evolution automation, and LDTP regression suite under GNOME organization. Then again in 2007,[17][18] it was used by the Mozilla Fondation for Firefox automation and Tinderbox integration.

Example

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

#!/usr/bin/python

# The standard import stuff.
from ldtp import *
from ooldtp import context as locate
from time import sleep

# Here we open the app.
launchapp('gedit')

# Now we find it and make sure it is open.
gedit_win = locate('*gedit')
gedit_win.waittillguiexist()

# Now we type into gedit.
text_field = gedit_win.getchild('txt1')
text_field.enterstring("G'Day mate!")

# Save a picture to prove we did it.
imagecapture('*gedit', '/tmp/foo.png')

# Quit gedit.
quit = gedit_win.getchild('mnuQuit')
quit.selectmenuitem()

# Close without saving.
dont_save = locate('Question')
dont_save.waittillguiexist()

button = dont_save.getchild('btnClosewithoutSaving')
button.click()

# Wait until gedit is gone.
gedit_win.waittillguinotexist()

Diagram of how LDTP works

How LDTP works.[19]

See also

References

  1. ^ "FAQ".
  2. ^ "The Linux Desktop Testing Project OpenSource Project on Ohloh".
  3. ^ "ldtp 3.5.0 : Python Pakage Index".
  4. ^ "Download".
  5. ^ "The Linux Desktop Testing Project OpenSource Project on Ohloh".
  6. ^ "ldtp".
  7. ^ "LDTP 3.0 automates GUI testing on Linux - The H Open: News and Features".
  8. ^ "ldtp".
  9. ^ "pyatom/pyatom - GitHub".
  10. ^ "ldtp/cobra - GitHub".
  11. ^ "ldtp".
  12. ^ "FAQ".
  13. ^ "Executing scripts remotely".
  14. ^ "How to control GNOME apps remotely using LDTP - YouTube".
  15. ^ "SoC".
  16. ^ "SoC06".
  17. ^ "SoC".
  18. ^ "SoC07".
  19. ^ "ldtp-tutorial" (PDF).