18

Does anyone know of a automated GUI testing package for that works with PyQT besides Squish? Nothing against Squish I am just looking for other packages. It would be cool if there were an open source package. I am doing my testing under Linux.

5
  • Y'know, I have a whole book on "Scripted GUI Testing with Ruby" (pragprog.com/titles/idgtr/scripted-gui-testing-with-ruby) that I got from a Ruby User Group meeting, but I've never read it so find out what kind of tools they use. Commented Oct 24, 2009 at 0:12
  • What are you trying to accomplish with this testing? Commented Dec 3, 2009 at 16:48
  • I'm very curious to know the final solution you used~ Commented Feb 10, 2011 at 9:43
  • 2
    We bought Squish. It works well and they are responsive but I love the open source python testing community and wanted to go there first. Commented Feb 12, 2011 at 1:25
  • The Python wiki has some info on this: wiki.python.org/moin/PyQt/GUI_Testing Hope this helps someone! Commented Aug 9, 2017 at 15:19

4 Answers 4

4

It looks like PyQT4 includes a QtTest object that can be used for unit testing.

Sign up to request clarification or add additional context in comments.

Comments

3

WATSUP has worked for me.

1 Comment

Thanks, WATSUP looks interesting for Windows GUI testing. Unfortunately I need Linux PyQT GUI testing.
1

You should be able to use pyunit in conjunction with PyQT.

http://pyunit.sourceforge.net/

3 Comments

While pyunit (called unittest in stdlib) is good for normal unit testing it doesn't handle GUI testing.
@PaulHildebrandt At the time of writing Python unittest works with PyQt, please see this article. Kind Regards, Tord
I am the author of "this article." I merged the johnnado.com / voom.net blog article into the example code github.com/jmcgeheeiv/pyqttestexample to make a unified open source project. Contributors wanted!
1

You can use py.test with the pytest-qt plugin. There's a simple example of how it can be used here

Another alternative is to use the built-in unittest module together with QtTest (parts of QtTest has been built into PyQt). A longer example is given in this article

All of this is free and open source :)

2 Comments

Comparing these two alternatives the first combination gives you more features and a nicer API, while the second has the advantage of not adding more dependencies
I am the author of "this article." I merged the johnnado.com / voom.net blog article into the example code github.com/jmcgeheeiv/pyqttestexample to make a unified open source project. Contributors wanted!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.