szabgab has asked for the wisdom of the Perl Monks concerning the following question:

We have a Qt based application written in C+++ or whatever they call it. We have been using Win32::GuiTest for testing it but there are a number of problems: I though I'll try to install PerlQt on Windows and then try to use that binding to access the relevant things in the applications. The first issues is of course

How can I install PerlQt on Windows ?
and once I can solve that
How can I access widgets of some other application ?


Update: The client where I am doing this has already tried a number of commercial Qt tester tools and all of them fell (actually crashed) while testing their applications. So far Win32::GuiTest is their best hope...

Replies are listed 'Best First'.
Re: Testing Windows apps using PerlQt
by Corion (Patriarch) on Jul 13, 2005 at 12:29 UTC

    You are approaching the problem from the wrong end. The second question has no solution, so it is easier to discern that first and subsequently not worry about the first.

    Custom widgets cannot be read in foreign applications, and even standard widgets are not completely readable, because sending the GetText message to a widget may return a pointer to the string - alas the memory pointed to is not readable by the foreign process.

    Your approach could be to inject a DLL into the C++ program so you get access to the widget values, or it could be to embed Perl into the C++ program, so you can serve the values out via TCP/IP, file, or whatever.

    The solution to the first question is easy - TrollTech sells the Win32 version of QT.

Re: Testing Windows apps using PerlQt
by spurperl (Priest) on Jul 13, 2005 at 14:44 UTC
    Re your first problem... Take a look at:

    PerlQt with Qt/Windows

    P.S. They call that language C++, actually. The point of your "pun" here is unclear.

      Yeah, one of the Qt developers (a rather enthusiastic one) was calling in C+++ and I was too lazy to check what does he mean

      thanks for the link!

Re: Testing Windows apps using PerlQt
by DrWhy (Chaplain) on Oct 12, 2005 at 16:29 UTC
    Coming into this game a little late, but...

    I wonder if you've tried Froglogic's Squish. We have had good success testing our Qt apps here with it. Unfortunately, they don't have Perl bindings for scripting your tests, but the do have Python, Tcl, and JavaScript bindings. The developers say they have plans to add support for more scripting languages, and they tell me that Perl is among one of the more often requested.

    --DrWhy

    "If God had meant for us to think for ourselves he would have given us brains. Oh, wait..."