Tracey
Tracey

Reputation: 21

Squish fails to load Qt AUT

I'm trying to automate my Qt QML application using squish. When I try to capture the testcases for my AUT squish fails to load it. The server log display

Squish Qt toolkit support failed: libQt6Widgets.so.6: cannot open shared object file: No such file or directory

libQt6widgets.so.6 is present in my Qt path.

Linux => Ubuntu22 & Ubuntu 20 Qt version 6.6.0 squish qt version 6.6.0

The directory contains only the qt application. Created a new Test Suite with the mentioned AUT. Launched the AUT in squish. Squish server gives error.

I tried the same in windows using squish window version. It works fine.

Upvotes: 2

Views: 639

Answers (1)

frog.ca
frog.ca

Reputation: 732

(Promoting my earlier comment to answer:)

The library must be in search path of the OS.

This should usually be the case for a properly deployed Qt application. If not, the deployment of the application may not be correct and should be reconsidered.

However, also relevant in general is that the Qt support in Squish for Qt default binary packages depends on Qt Widgets. This means that an application that does not required Qt Widgets, would be deployed without the respective library, and then Squish's Qt support would fail to load into the application due to the missing library. To handle this:

  • Copy this library (from the Qt build folder - provided Qt Widgets was enabled at configure time of this Qt build) into the same folder as the other Qt libraries of the application.

  • Build Squish' Qt support from sources with a Qt build that has the Qt Widgets module/option disabled. That way Squish' Qt support will not have this as a dependency.

  • Set LD_LIBRARY_PATH to the path of the folder with that library, or add it to LD_LIBRARY_PATH - for the Squish IDE or the AUT (for example in test suite settings at tab "AUT" > "AUT Environment").

    In a shell/terminal:

    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path/to/folder ./squishide

Upvotes: 0

Related Questions