Installing Squish for Qt for WebAssembly testing

The Squish for Qt for WebAssembly testing package is suitable for preparing a Qt application for WebAssembly for testing. You also need a Squish for Web package on your desktop machine for recording, managing and replaying tests. Please see Installing from Binary Packages for details on installing such a package.

Note: WebSocket support needs to be enabled in squishserver since it is being used instead of a regular TCP socket for connection. If you are building the squishserver from sources, the --enable-server-websockets switch needs to be passed to configure to enable the WebSocket support.

In order to build your application instrumented for using Squish for Qt for WebAssembly, you have to use Squish for Qt for WebAssembly embedded package for building your application with Squish's Qt support included, following by deploying the application:

  1. Ensure that you can build your Qt application for WebAssembly first because it needs to be rebuilt to become testable with Squish. For details refer to the Qt for WebAssembly documentation.
  2. Add the Qt built-in hook to your application project.

    Note: The only available option to make a Qt application for WebAssembly testable is to use Squish::installBuiltinHook(). It is not possible to use attachable AUTs with WebAssembly.

  3. If not done already, install a Squish for Web binary package on the desktop machine. Please see Installing Squish for Web for details.
  4. In squishide, choose File > New Test Suite to create a new Test Suite and follow the wizard. When asked for the GUI Toolkit choose Web and then choose preferred scripting language from the list.
  5. After the creation of the test suite, you need to choose the browser that you would like to use. For this, go to Edit > Server Settings > Browser.

    Note: Currently only Mozilla Firefox and Google Chrome are supported with Qt for WebAssembly.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.