I'm using squish to test a qt application. The problem is that squish does not support threads:
http://kb.froglogic.com/display/KB/Article+-+Using+Threads+in+Python
However, I need to use threads since I need to communicate periodically with the application under test via tcp.
I have a script which does the following in its main thread:
squishtest.waitForObject(":My_Button")
squishtest.waitForObject(":My_Button")
These squish commands will close two dialogs which popup when I start the application. While, each squish command is executing I have indeed noticed that all my tcp threads (threading.Thread) are blocked until the squish command returns. I cant test the application under test if the threads are blocked in this manner. Therefore I felt I could use the multiprocessing module to solve this problem, so I tried:
p = Process(target = squishtest.waitForObject, args = (":My_Button",))
p.start()
p.join()
This works fine however when I tried:
p = Process(target = squishtest.waitForObject, args = (":My_Button",))
p.start()
p.join()
p = Process(target = squishtest.waitForObject, args = (":My_Button",))
p.start()
p.join()
I see the following text being outputted on the command line where I execute python:
RemoteInspector(0x0x8702b28)::type: Invalid class id 493 for appid 156850424
What does this mean?
I then tried, for the sake of it, this:
p = Process(target = squishtest.waitForObject, args = (":My_Button",))
p.start()
p.join()
squishtest.waitForObject(":My_Button")
and this time I also get a coredump from python:
RemoteInspector(0x0x81b5ac8)::type: Invalid class id 493 for appid 156850440
Aborted (core dumped)
What might the issue be here? Is my approach to solving the fact that squish blocks my threads a sensible one? Can you suggest another approach?
I'm using python 2.6.