Automating Qt applications started from non-Qt Windows applications

Last edited on


It is possible to record and replay on Qt applications which get started by Windows applications. (The Windows applications also get automated in this scenario.)

Please note that this requires licenses for Squish for Qt and Squish for Windows.


Allowing Squish to hook into Qt sub-processes

There are several approaches to allow Squish to hook into Qt sub-processes. One of them must be fully implemented.

Approach #1: Replace Qt AUT’s .exe file with special dllpreload.exe variant

To support hooking of sub-processes dllpreload.exe supports a special mode. To use this do the following:

(sub_process.exe stands for the .exe file name of sub-process.)

Approach #2: Start Qt sub-process via dllpreload from Windows application

This is explained at Recording the Sub-Processes started by the AUT .

Approach #3: Add built-in hook to Qt application

This is explained at Using the Built-in Hook .

(Please do not forget to enforce the built-in hook in case of Windows.)

Creating and recording a new test case

To create a new test case register the Windows application as a Mapped AUT in the Squish IDE and use the following test script (Python example) as a starting point:

def main():
    aut = "win_app"
    testSettings.setWrappersForApplication(aut, ("Windows"))

To record execute to the test.breakpoint() command. Once at the breakpoint the Squish IDE should show up again. Then choose “Squish"|"Record Snippet” from the Squish IDE menu.

To end recording click on “End Recording” in Squish control bar, then stop test case execution to have the recorded snippet inserted into the test script at the breakpoint.

How to Test Multiple AUTs from a Single Test Script, Using ApplicationContext

Application Context

Recording on other applications