Qt Recording Options

CukeTest provides a series of dedicated recording options for Qt applications, allowing users to easily generate automated test scripts.

Qt Settings Options

For detailed information about Qt recording features, please refer to Cross-Platform Qt Recording Basics.

Qt Application

In the Qt Application field, you can specify the executable path of the Qt application under test. When recording starts, if a path is specified, the application will be automatically launched. You can also leave it blank and manually start the application after recording begins via the menu “Tools” -> “Start Qt Application”. In either case, the corresponding Qt application launch code will be generated in the recording script.

If you do not enter a path for Qt Application, the application will not be automatically launched during recording, and no launch code will be generated.

Command Line Arguments

In the Arguments field, you can enter command-line arguments required to launch the target Qt application. These arguments will be passed to the application and can include file paths, configuration options, or any other parameters supported by the application.

Slow Motion

The slow motion option is used to increase the delay between operations during playback. This is particularly useful for observing and debugging recorded scripts. Enabling this option adds the slowMo setting to the generated script, with a default value of 1000 milliseconds (1 second per operation).

In the script, it can be set as follows:

JavaScript
Python
const { RunSettings } = require("leanpro.common");
RunSettings.slowMo = 1000;
from leanproAuto import RunSettings
RunSettings.set({"slowMo": 1000})

Record to Existing Files

If you do not want to create a completely new recording but wish to append or continue recording on an existing recording, you can use this option. After selecting it, you need to specify the following two options in the popup window:

Model File: Append the control models generated during operations to the selected model file *.tmodel instead of creating a new one.

Script File: Append the generated script to the selected script file (Python or JavaScript) instead of creating a new script file.

Capture Control Screenshots

Screenshots of the operated controls will be generated. These screenshots can be viewed in the Model Manager by clicking on each control (the container of the control will not be captured). This is useful for quickly locating the operated controls during debugging by reviewing the control screenshots.

Record Mouse Trace

Enabling this option will record the mouse movement trajectory during recording and reproduce it during playback. This is suitable for test scenarios that require precise mouse operations, such as drawing, dragging, and other similar actions.

Remote Recording

CukeTest supports Qt remote recording. When this option is enabled and recording starts, a “Connect to Remote Execution Station” dialog will appear. You can enter the remote endpoint address in the dialog and start remote recording. For more detailed information, please refer to the Remote Recording documentation.

Start Recording from the Middle

Recording scripts can start from the middle of an application. The steps are as follows:

  1. Before starting recording, ensure that the Qt application is already running and correctly recognized by CukeTest (Qt application information should be correctly displayed in the bottom left of the main interface).
  2. Manually perform operations up to the point where you want to start recording.
  3. In the Qt recording settings, clear the Qt Application path field, then click “Start Recording”. CukeTest will start recording operations from the current application interface.