QT Testing/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
Zeile 1: Zeile 1:
==Pre-requisites==
==Pre-requisites==
===QT download===
===Qt download===
https://www.qt.io/download
https://www.qt.io/download


===Supported versions===
===Supported versions===
Expecco supports testing of QT applications on Windows and Linux, QT-Quick/QML applications from '''QT version 5''''.
Expecco supports testing of Qt applications on Windows and Linux, Qt Quick/QML applications from '''Qt version 5''''.


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


An overview of the delivered libraries and their version status can be found [[#ExpeccoTestService library: Delivery in expecco versions|here]].
An overview of the delivered libraries and their version status can be found [[#ExpeccoTestService library: Delivery in expecco versions|here]].


==Testing QT programs==
==Testing Qt programs==


===Test preparations===
===Test preparations===
Zeile 16: Zeile 16:
====Integrating the expeccoTestService library====
====Integrating the expeccoTestService library====


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 ([[Qt Inject Windows/en#Inject expeccoTestService-Library|Description]]).
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 ([[Qt Inject Windows/en#Inject expeccoTestService-Library|Description]]).


Alternatively, the ExpeccoTestService library call can be inserted into the source code of the application under test ([[Qt Inject Windows/en#Insert into Source Code (alternative)|Description]]).
Alternatively, the ExpeccoTestService library call can be inserted into the source code of the application under test ([[Qt Inject Windows/en#Insert into Source Code (alternative)|Description]]).
Zeile 26: Zeile 26:
* Log file: <code>ETS_QT_LOG_FILE</code> (default value: c:\Windows\temp\etsQt.log or /tmp/etsQt.log).
* Log file: <code>ETS_QT_LOG_FILE</code> (default value: c:\Windows\temp\etsQt.log or /tmp/etsQt.log).
* Server port: <code>ETS_QT_PORT_NUMBER</code> (default value: 8866).
* Server port: <code>ETS_QT_PORT_NUMBER</code> (default value: 8866).
<!-- * Timeout preview in ms (QT-Quick): <code>ETS_TIMEOUT_QUICK_IMAGE</code> (default value 200) -->
<!-- * Timeout preview in ms (Qt Quick): <code>ETS_TIMEOUT_QUICK_IMAGE</code> (default value 200) -->


====Required QT libraries at runtime====
====Required Qt libraries at runtime====


The ExpeccoTestService library depends on the following QT libraries:
The ExpeccoTestService library depends on the following Qt libraries:
* Qt5Core
* Qt5Core
* Qt5Gui
* Qt5Gui
Zeile 92: Zeile 92:
===QApplication::ShortCutEvent===
===QApplication::ShortCutEvent===


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.
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==
==ExpeccoTestService library: delivery in Expecco versions==
Zeile 98: Zeile 98:
===Windows===
===Windows===
{| class="wikitable"
{| class="wikitable"
! Expecco Version !! QT Version !! Architecture !! Build System !! Directory !! Comment
! Expecco Version !! Qt Version !! Architecture !! Build System !! Directory !! Comment
|-
|-


Zeile 134: Zeile 134:


{| class="wikitable"
{| class="wikitable"
! Expecco Version !! QT Version !! Architecture !! Build System !! Directory !! Comment
! Expecco Version !! Qt Version !! Architecture !! Build System !! Directory !! Comment
|-
|-



Version vom 6. Dezember 2021, 09:48 Uhr

Pre-requisites[Bearbeiten]

Qt download[Bearbeiten]

https://www.qt.io/download

Supported versions[Bearbeiten]

Expecco supports testing of Qt applications on Windows and Linux, Qt Quick/QML applications from Qt version 5'.

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

An overview of the delivered libraries and their version status can be found here.

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).

Manual GUI Browser.

Qt Quick/QML programs[Bearbeiten]

Qt Quick/QML applications can be tested with the expecco QtLibrary starting with expecco 21.2.

Qt Quick/QML Actions[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-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 gcc_x64_Qt5.15.0 QtQuick / QML
2021-1 5.12.2 arm32 gcc gcc_arm32_Qt.12.2
5.9.5 x64 gcc gcc_x64_Qt5.9.5
2020-2 5.9.1 x64 gcc gcc_x64_Qt5.9.1
2020-1 5.12.3 x64 gcc gcc_x64_Qt5.12.3

Back to Qt Plugin Reference



Copyright © 2014-2024 eXept Software AG