[TIP] Any good way to test Tkinter apps?
titus at caltech.edu
Tue Dec 25 09:11:02 PST 2007
On Mon, Dec 24, 2007 at 10:42:31PM -0800, Brett Cannon wrote:
-> I am trying to be a good developer with my first solo open source app
-> and write tests for everything. In this case it means testing a
-> Tkinter GUI.
-> But the great Google oracle isn't being helpful in finding anything to
-> help with this. Is there a good way to do this beyond manual testing?
-> And if there isn't, is there a cross-platform GUI toolkit (that works
-> on OS X) that does have good testing help?
I'm not aware of anything for Tkinter.
Qt at least has testing hooks, but I'm not sure how easy it is to use
Python to test Qt apps.
KWWidgets is a young framework that has been strongly recommended to me;
it's by the cmake/ctest/vtk/itk/DART folk. It's a C++ wrapping of Tk,
with Python wrapping on top of that. (Yes, it sounds hacky, but
apparently it's actually quite nice ;) It was explicitly designed to be
easier to test than existing alternatives.
And, finally, Gnome/GTK has some testing packages that use the
accessibility UI. See here:
More information about the testing-in-python