[PyQt] Testing a standalone dialog widget

Andre Roberge andre.roberge at gmail.com
Mon Dec 29 22:51:40 GMT 2014

On Mon, Dec 29, 2014 at 6:41 PM, David Cortesi <davecortesi at gmail.com>

> From: Antonio Valentino <antonio.valentino at tiscali.it>
>> I'm very interested in this topic so if anyone has some useful pointers
>> to material about unittesting of PyQt based GUI applications please share.
> I have found Sikuli (http://www.sikuli.org/) useful for this. You can set
> up quite complex scenarios and validate the GUI response.
> A Sikuli script is a Python script. Basically you start one off with
> subprocess.Popen(['/usr/local/bin/python', 'path-to-test-driver.py'])
> and then continue with Sikuli statements to click, or type, or look for
> specific visual items in the UI presented by the test-driver.py execution.
> There is an interactive tool for dragging to select particular bits of UI,
> a menu or a dialog or whatever, and say "expect that here".

In my original post on this topic, I mentioned that I was using pyautogui
which works (I thought) similarly to Sikuli.  The problem with this
approach is that one pretty much has to leave the monitor alone while the
tests are run and it might be difficult to set thing up with automated
testing providers (like https://travis-ci.org/).   Since PyQt includes
QTest, I was thinking that there had to be many people using it and that
there should be some relatively easy/standard ways of doing unittesting
with QTest.

However... you do write that you have found Sikuli useful. Is there some
relatively straightforward way to run tests quickly with Sikuli so that it
does not interrupt the workflow significantly (which I found pyautogui was



> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20141229/0b4af482/attachment.html>

More information about the PyQt mailing list