<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 29, 2014 at 6:41 PM, David Cortesi <span dir="ltr"><<a href="mailto:davecortesi@gmail.com" target="_blank">davecortesi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
From: Antonio Valentino <<a href="mailto:antonio.valentino@tiscali.it" target="_blank">antonio.valentino@tiscali.it</a>><span class=""><br>
I'm very interested in this topic so if anyone has some useful pointers<br></span>
to material about unittesting of PyQt based GUI applications please share.<br></blockquote><div><br></div><div>I have found Sikuli (<a href="http://www.sikuli.org/" target="_blank">http://www.sikuli.org/</a>) useful for this. You can set up quite complex scenarios and validate the GUI response.<br><br></div><div>A Sikuli script is a Python script. Basically you start one off with <br><br>subprocess.Popen(['/usr/local/bin/python', 'path-to-test-driver.py'])<br><br></div><div>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".<br></div></div></div></div></blockquote><div><br></div><div>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 <a href="https://travis-ci.org/">https://travis-ci.org/</a>). 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.</div><div><br></div><div>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.)</div><div><br></div><div>André</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div></div></div></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div></div></div></div>
<br>_______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br></div></div>