[PyQt] Testing a standalone dialog widget

Antonio Valentino antonio.valentino at tiscali.it
Tue Dec 30 08:03:40 GMT 2014

Hi David, hi Andre,

Il 29/12/2014 23:51, Andre Roberge ha scritto:
> On Mon, Dec 29, 2014 at 6:41 PM, David Cortesi <davecortesi at gmail.com>
> wrote:
>> 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.

I totally agree

> 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
> doing.)
> André

Thanks, I will give a look to both Sikuli and pyautogui.

best ragards

Antonio Valentino

More information about the PyQt mailing list