Want to use LDTP to test your application? Or do you want to automate the actions you do often? Or are you a GNU/Linux user who want to show “magic” to your friends by recording your actions and playing them back? You can use LDTP for this. But one small issue with LDTP is that you should know the LDTP Python API to write any test suite. But with the new LDTP Editor, this makes your job really simple. A screenshot of the LDTP Editor is shown below.

ldtp-editor

This is a simple HOWTO for recording and playing back the recorded script.

Installing LDTP.

Note:: After installing LDTP Editor, i when i tried to run ldtpeditor, got an error saying

hari@hari-laptop:~/ldtp/ldtp-0.9.2$ ldtpeditor (ldtpeditor:11130): libglade-WARNING **: could not find glade file '/usr/share/local/ldtp/glade/ldtpeditor.glade' Glade file not found

The ldtpeditor.glade file is present in the python folder. I got this error because i compiled the code as ./configure. If i had done it as ‘./configure –prefix=/usr’, then i wouldn’t have got this error. Anyway i copied the file manually to that folder.

hari@hari-laptop:~/ldtp/ldtp-0.9.2$ sudo mkdir -p /usr/share/local/ldtp/glade/ hari@hari-laptop:~/ldtp/ldtp-0.9.2$ sudo cp python/ldtpeditor.glade /usr/share/local/ldtp/glade/ hari@hari-laptop:~/ldtp/ldtp-0.9.2$ ldtpeditor

After that when i ran ldtpeditor, it ran without any issues.

Record using LDTP Editor

For this let us consider recording the actions performed in gcalctool.

LDTP Editor Preferences

Using the LDTP Prefereces, you can control what all actions you can control. A brief summary about the options given in the Preferences window.

Note: The generated code had many unwanted waittillguiexist. I saw waittillguiexist (”dlg0″) in many places. If your playback is stopped because of this, remove that before running the scripts. Sometime the resource will go high as the application map info is collected from the application, so no need to worry.If you find any issues regarding LDTP Editor, report it to ldtp-dev at lists.freedesktop.org or nagappan at gmail dot com or sp2hari at gmail dot com

Known issues

Recording TO DO

Demo of LDTP Recording

Reference

RecordHOWTO (last edited 2007-12-19 19:52:13 by NagappanAlagappan)