QT Testing/en

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen

Pre-requisites[Bearbeiten]

QT download[Bearbeiten]

https://www.qt.io/download

Supported versions[Bearbeiten]

Expecco supports testing of QT applications on Windows and Linux created with QT version 5.

For the different QT versions, development environments (VisualStudio, ...) and computer architecture (32/64 bit) we provide specially created libraries (dll, so). Some of them are delivered with expecco by default. For other versions we generate the library on request.

Testing QT programs[Bearbeiten]

Test preparations[Bearbeiten]

Integrating the expeccoTestService library[Bearbeiten]

To test a QT program with expecco, the library expeccoTestService.[dll/so] delivered by us is included in the program to be tested. This is done via a batch or shell script without intervention in the source code of the program to be tested (Description).

Alternatively, the ExpeccoTestService library call can be inserted into the source code of the application under test (Description).

Start parameter[Bearbeiten]

The ExpeccoTestService library can be set via environment variables:

  • Log level: ETS_QT_LOG_LEVEL (default value: 0, for logging: 2).
  • Log file: ETS_QT_LOG_FILE (default value: c:\Windows\temp\etsQt.log or /tmp/etsQt.log).
  • Server port: ETS_QT_PORT_NUMBER (default value: 8866).

Required QT libraries at runtime[Bearbeiten]

The ExpeccoTestService library depends on the following QT libraries:

  • Qt5Core
  • Qt5Gui
  • Qt5Network
  • Qt5QmlModels
  • Qt5Qml
  • Qt5Quick
  • Qt5Widgets

Connecting with expecco GUI Browser[Bearbeiten]

The GUI Browser can be used to connect to the program under test:

Connect - Qt.

In the following dialog, enter the network address of the computer running the application and the port for the connection (8866 by default).

Testing QT-Quick/QML programs[Bearbeiten]

QT-QML applications can be tested with the expecco QTLibrary starting with expecco 21.2.

QT-Quick/QML-Aktionen[Bearbeiten]

For testing QT-Quick/QML programs almost all actions of the QTLibrary can be used, which are defined for testing QT programs based on QWidget / QApplication.

These actions for QML testing are labeled / tagged qt-quick. To make this clear on the blocks, they can be displayed with a configurable color (Extras - Settings - Look & Feel - Colors per label (tag)).

QWidget actions are applicable to QT Quick items derived from QQuickItem. QQuickItemView actions are applicable to Qt-Quick list items.

The different handling is encapsulated by the ExpeccoTestService. Thus, the action and the input and output pins remain the same for both QT technologies.

QT-Quick/QML peculiarities[Bearbeiten]

Control via Properties[Bearbeiten]

Basis of all QT-Quick/QML interface elements is QQuickItem. Via Properties most of the properties can be set. From QQuickItem there is a multiplicity of derivations. Expecco for it no special building blocks represent, the elements are however controllable over their properties.

QT-Quick element property Comment
Tumbler currentIndex
Switch checked Suitable actions:
QCheckButton::GetState
QCheckButton::SetState = %2
will be continued

Actions for selected element[Bearbeiten]

Display actions for GUI elements is not comprehensive because QT-Quick/QML has no predefined elements.

Not yet implemented[Bearbeiten]

  • TreeView
  • Menu
  • Selection of cells - so far only one row can be selected

Qt Known Problems[Bearbeiten]

QApplication::ShortCutEvent[Bearbeiten]

Due to internal changes in QT version 5, the module no longer works. A workaround is to send the key events separately, as shown in the example in the Test/Demo tab of the action.

ExpeccoTestService library: delivery in Expecco versions[Bearbeiten]

Windows[Bearbeiten]

Expecco Version QT Version Architecture Build System Directory Comment
2021-2 5.15.0 x64 vs2019 vs2019_x64_Qt5.15.0 QtQuick / QML
5.15.0 x86 vs2019 vs2019_Qt5.15.0
5.9.3 x64 vs2015 vs2015_x64_Qt5.9.3
5.9.1 x64 vs2015 vs2015_x64_Qt5.9.1
2021-1 5.9.3 x86 vs2015 vs2015_x86_Qt5.9.3
2020-2
2020-1 5.8.0 x86 vs2013 vs2013_Qt5.8.0
2019-2 5.9.3 x64 vs2013 vs2013_x64_Qt5.9.3
5.9.1 x64 vs2013 vs2013_x64_Qt5.9.1
2018-2 5.4.2 x86 vs2010 vs2010_Qt5.4.2

Linux / MaxOS[Bearbeiten]

Expecco Version QT Version Architecture Build System Directory Comment
2021-2 5.15.0 x64 gcc (unix) gcc_x64_Qt5.15.0 QtQuick / QML
2021-1 5.12.2 arm32 gcc (unix) gcc_arm32_Qt.12.2
5.9.5 x64 gcc (unix) gcc_x64_Qt5.9.5
2020-2 5.9.1 x64 gcc (unix) gcc_x64_Qt5.9.1
2020-1 5.12.3 x64 gcc (unix) gcc_x64_Qt5.12.3

Back to Qt Plugin Reference



Copyright © 2014-2024 eXept Software AG