Attaching to running Qt applications

Last edited on

Setting up attaching to running applications

Step 1 - Register an attachable AUT

Before you can attach to a running instance of your application, the application has to be registered as an “Attachable AUT”.

In the Squish IDE:

Open Edit > Server Settings > Manage AUTs... > Attachable AUTs to register an “Attachable AUT”, for example with the name “MyApplicationAttachable”, with the host “” and port “9999”.

In command line:

"C:\Squish\bin\squishserver" --config addAttachableAUT MyApplicationAttachable
In cmd.exe

(Use a different host name or IP address and port numbers as required, for example the IP address of a remote computer or remote device.)

Step 2 - Start the application (if not running yet)

On desktop operating systems:

On non-desktop operating systems (Squish hook built into the application):

Alternative for Qt on embedded/other devices:

Step 3 - Create a new test script

def main():

Step 4 - Use “Record Snippet”

Step 5 - Execute test suite/test cases

In command line:

"C:\Squish\bin\squishserver" --verbose --port=1234

"C:\Squish\bin\squishrunner" --port=1234 --testsuite C:\test_suites\suite_v1

"C:\Squish\bin\squishserver" --port=1234 --stop
In cmd.exe

Or to execute individual test cases only:

"C:\Squish\bin\squishserver" --verbose --port=1234

"C:\Squish\bin\squishrunner" --port=1234 --testsuite C:\test_suites\suite_v1 --testcase tst_case1 --testcase tst_case5

"C:\Squish\bin\squishserver" --port=1234 --stop
In cmd.exe


Make sure that you have started your application successfully with startaut (or other means, as mentioned above).

Related information

Attaching to Running Applications