Article - Attaching to running Qt applications

Skip to end of metadata
Go to start of metadata

Table of Contents

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 "127.0.0.1" and port "9999".

In command line:

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:

  • Start cmd.exe or a Unix shell.
  • In cmd.exe: Start your application via startaut.exe:
    In cmd.exe

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

  • Android, iOS: Start the application yourself.
  • iOS: Start the application via Apple's instruments (included in Xcode).
  • Android: Start the application via adb (included in Squish for Android and Android SDK).
  • Qt on embedded/other devices: Start the application yourself.

Alternative for Qt on embedded/other devices:

  • Start the application on the device via squish_dir_on_device/bin/startaut.

Step 3 - Create a new test script

test.py

Step 4 - Use "Record Snippet"

  • Set breakpoint on snooze(1) line and execute to it.
  • Start recording by opening the "Squish" menu and choose "Record Snippet".
  • To end the recording and insert the recorded snippet choose "Stop Recording" on the Squish Control Bar, and then, back in the Squish IDE, terminate the current script execution.

Step 5 - Execute test suite/test cases

In command line:

In cmd.exe

Or to execute individual test cases only:

In cmd.exe

Troubleshooting

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

Related information

Labels:
qt qt Delete
attachtoapplication attachtoapplication Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.