aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2022-02-07 12:05:55 +0100
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2022-02-08 14:58:33 +0000
commit67e4e4f5a7b32037e3ef1b4bee873852976a3171 (patch)
treea9ecef26daa81acb54136ba5b0d6562b34726ce4 /doc
parentd8bd4e8e0534469354d9a15ba3ef161c5b701482 (diff)
Doc: Describe new option in Qt Quick Autotest project wizard
The "Generate setup code" check box executes C++ code before any of the QML tests are run. Task-number: QTCREATORBUG-26741 Task-number: QTCREATORBUG-26610 Change-Id: Ica4d0391e3624196b3327267f5a3082ca57b58cd Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'doc')
-rw-r--r--doc/qtcreator/images/qtcreator-autotests-project-qt-test.pngbin0 -> 9867 bytes
-rw-r--r--doc/qtcreator/images/qtcreator-autotests-project-qtquick-test.pngbin0 -> 9287 bytes
-rw-r--r--doc/qtcreator/src/external-resources/external-resources.qdoc4
-rw-r--r--doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc14
4 files changed, 16 insertions, 2 deletions
diff --git a/doc/qtcreator/images/qtcreator-autotests-project-qt-test.png b/doc/qtcreator/images/qtcreator-autotests-project-qt-test.png
new file mode 100644
index 0000000000..aa5bee758c
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-autotests-project-qt-test.png
Binary files differ
diff --git a/doc/qtcreator/images/qtcreator-autotests-project-qtquick-test.png b/doc/qtcreator/images/qtcreator-autotests-project-qtquick-test.png
new file mode 100644
index 0000000000..24d61b245a
--- /dev/null
+++ b/doc/qtcreator/images/qtcreator-autotests-project-qtquick-test.png
Binary files differ
diff --git a/doc/qtcreator/src/external-resources/external-resources.qdoc b/doc/qtcreator/src/external-resources/external-resources.qdoc
index c0c52f936d..b755f99cf1 100644
--- a/doc/qtcreator/src/external-resources/external-resources.qdoc
+++ b/doc/qtcreator/src/external-resources/external-resources.qdoc
@@ -102,6 +102,10 @@
\title Android Application Fundamentals
*/
/*!
+ \externalpage https://doc.qt.io/qt/qtquicktest-index.html#executing-c-before-qml-tests
+ \title Executing C++ Before QML Tests
+*/
+/*!
\externalpage https://doc.qt.io/qt/qtqml-cppintegration-overview.html
\title Overview - QML and C++ Integration
*/
diff --git a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc
index 4447c342ce..89064fe4de 100644
--- a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc
+++ b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2021 The Qt Company Ltd.
+** Copyright (C) 2022 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -95,7 +95,9 @@
\uicontrol {Qt Test} or \uicontrol {Qt Quick Test}.
\li For a Qt test, select the \uicontrol {GUI Application} check
- box to create a Qt application.
+ box to create a Qt application.
+
+ \image qtcreator-autotests-project-qt-test.png "Autotest project wizard - Qt Test"
\li In the \uicontrol {Test case name} field, enter a name for
the test case.
@@ -104,6 +106,14 @@
check box to add the include statement for QApplication to
the main.cpp file of the project.
+ \li For a Qt Quick test, select the
+ \uicontrol {Generate setup code} check box to execute C++
+ code before any of the QML tests are run. The testing
+ framework will call slots and invokable functions, as
+ described in \l{Executing C++ Before QML Tests}.
+
+ \image qtcreator-autotests-project-qtquick-test.png "Autotest project wizard - Qt Quick Test"
+
\li Select the \uicontrol {Generate initialization and cleanup
code} checkbox to add functions to your test that are
executed by the testing framework to initialize and clean