[Tkinter-discuss] GUI testing

Allen Taylor Allen.Taylor at mdacorporation.com
Thu Nov 13 16:07:32 CET 2008


Guilherme,
So, what is ttk, and how does it relate to Tkinter? The app I have inherited is specifically Tkinter+Pmw. I want to make as few changes to it as possible in order to test drive it with test scripts. Things like waiting for windows to appear, pressing buttons, selecting items in list boxes, extracting values, etc., all from a script. Dogtail looked like just the ticket until I found out that Tk apps don't talk AT-SPI. Switching the app to use GTK is not an option.
A bit more web searching yielded another possibility (see http://mail.gnome.org/archives/gnome-accessibility-devel/2006-December/msg00029.html). I just touched base with Daniel Drake (the originator of the referenced thread) and he still suggests using Papi (http://ocemp.sourceforge.net/papi.html), which allows a non-GTK app to be AT-SPI-aware (albeit via ATK) . Perhaps I can hook something into Tkinter. Seems like a lot of work though.
Allen

>>> "Guilherme Polo" <ggpolo at gmail.com> 2008-11-12 11:45 >>>
On Wed, Nov 12, 2008 at 2:37 PM, Allen Taylor
<Allen.Taylor at mdacorporation.com> wrote:
> Hello all,
> I've got a Python/Tkinter application that I'd like to automate GUI testing
> for. I found Dogtail, but it requires the GUI app to be "AT-SPI-aware". I
> see that there is a binding from Python to AT-SPI (Python atspi package;
> this is what Dogtail uses to control the app). Has anyone done
> any development to make this work with Tkinter apps? Or, is there another
> method by which I can automate GUI testing of my Python/Tk app?

I have used the standard unittest way to test ttk widgets. tests for
python 2.x can be found at
http://svn.python.org/view/sandbox/trunk/ttk-gsoc/src/2.x/test/ right
now, soon (like a week maybe) I will be moving that to another branch.
It simulates some mouse clicks in some very specific areas, but could
be expanded. Maybe you can use some part of it as a basis for
something else ? But I don't know what kind of things you want to test
for specifically, so these tests may not work for you.

> Many thanks.
> Allen B. Taylor
> MDA
> 9445 Airport Road
> Brampton, ON  L6S 4J3
> 905-790-2800 ext. 4350
> allen.taylor at mdacorporation.com 
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org 
> http://mail.python.org/mailman/listinfo/tkinter-discuss 
>
>



-- 
-- Guilherme H. Polo Goncalves
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss at python.org 
http://mail.python.org/mailman/listinfo/tkinter-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20081113/f4f42b3c/attachment.htm>


More information about the Tkinter-discuss mailing list