Doc: Update AutoTest plugin documentation a bit

Update information regarding wizards provided by the
AutoTest plugin.

Add a note for the missing wizard for adding Qt test
based test cases.

Task-number: QTCREATORBUG-30139
Change-Id: I33a3e176e8debcdff05d0183f3ad890996316584
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
This commit is contained in:
Christian Stenger
2024-01-15 14:27:50 +01:00
parent 33fbcf992d
commit 5af310b4fb
3 changed files with 48 additions and 12 deletions

View File

@@ -60,18 +60,17 @@
\list 1 \list 1
\li Select \uicontrol File > \uicontrol {New Project} > \li Select \uicontrol File > \uicontrol {New Project} >
\uicontrol {Other Project} > \uicontrol {Auto Test Project} > \uicontrol {Test Project} > \uicontrol {Qt Test Project} >
\uicontrol Choose to create a project with boilerplate code for a \uicontrol Choose to create a project with boilerplate code for a
Qt test or a Qt Quick test. Qt test, or \uicontrol File > \uicontrol {New Project} >
\uicontrol {Test Project} > \uicontrol {Qt Quick Test Project} >
\uicontrol Choose to create a Qt Quick test.
\li In the \uicontrol {Project and Test Information} dialog, specify \li In the \uicontrol {Project and Test Information} dialog, specify
settings for the project and test: settings for the project and test:
\list 1 \list 1
\li In the \uicontrol {Test framework} field, select
\uicontrol {Qt Test} or \uicontrol {Qt Quick Test}.
\li For a Qt test, select the \uicontrol {GUI Application} check \li For a Qt test, select the \uicontrol {GUI Application} check
box to create a Qt application. box to create a Qt application.
@@ -115,7 +114,7 @@
\list 1 \list 1
\li Select \uicontrol File > \uicontrol {New Project} > \li Select \uicontrol File > \uicontrol {New Project} >
\uicontrol {Other Project} > \uicontrol {Auto Test Project} > \uicontrol {Test Project} > \uicontrol {Google Test Project} >
\uicontrol Choose to create a project with boilerplate code for a \uicontrol Choose to create a project with boilerplate code for a
Google test. Google test.
@@ -125,7 +124,9 @@
\list 1 \list 1
\li In the \uicontrol {Test framework} field, select \li In the \uicontrol {Test framework} field, select
\uicontrol {Google Test}. \uicontrol {Google Test (shared libraries)} to link against
Google Test, or \uicontrol {Google Test (headers only)} to
include necessary Google Test sources into the project.
\li In the \uicontrol {Test suite name} field, enter a name for \li In the \uicontrol {Test suite name} field, enter a name for
the test suite. the test suite.
@@ -169,14 +170,16 @@
\list 1 \list 1
\li Select \uicontrol File > \uicontrol {New Project} > \li Select \uicontrol File > \uicontrol {New Project} >
\uicontrol {Other Project} > \uicontrol {Auto Test Project} > \uicontrol {Test Project} > \uicontrol {Boost Test Project} >
\uicontrol Choose to create a project with boilerplate code for a \uicontrol Choose to create a project with boilerplate code for a
Boost test. Boost test.
\li In the \uicontrol {Project and Test Information} dialog, specify \li In the \uicontrol {Project and Test Information} dialog, specify
settings for the project and test: settings for the project and test:
\list 1 \list 1
\li In the \uicontrol {Test framework} field, select \li In the \uicontrol {Test framework} field, select
\uicontrol {Boost Test}. \uicontrol {Boost Test (headers only)} to include needed
headers, or \uicontrol {Boost Test (shared libraries)}
to link against Boost Test.
\li In the \uicontrol {Test suite name} field, enter a name for \li In the \uicontrol {Test suite name} field, enter a name for
the test suite. the test suite.
\li In the \uicontrol {Test case name} field, enter a name for \li In the \uicontrol {Test case name} field, enter a name for
@@ -209,14 +212,17 @@
\list 1 \list 1
\li Select \uicontrol File > \uicontrol {New Project} > \li Select \uicontrol File > \uicontrol {New Project} >
\uicontrol {Other Project} > \uicontrol {Auto Test Project} > \uicontrol {Test Project} > \uicontrol {Catch2 Test Project} >
\uicontrol Choose to create a project with boilerplate code for a \uicontrol Choose to create a project with boilerplate code for a
Catch2 test. Catch2 test.
\li In the \uicontrol {Project and Test Information} dialog, specify \li In the \uicontrol {Project and Test Information} dialog, specify
settings for the project and test: settings for the project and test:
\list 1 \list 1
\li In the \uicontrol {Test framework} field, select \li In the \uicontrol {Test framework} field, select
\uicontrol {Catch2}. \uicontrol {Catch2 v3 (shared libraries)} to link against
Catch2 (recommended for version 3), or
\uicontrol {Catch2 v2 (header only)} to use a single header
include (recommended for version 2).
\li In the \uicontrol {Test case name} field, specify a name \li In the \uicontrol {Test case name} field, specify a name
for the test case file. for the test case file.
\li Select the \uicontrol {Use Qt libraries} check box \li Select the \uicontrol {Use Qt libraries} check box
@@ -254,6 +260,28 @@
\l{https://gitlab.kitware.com/cmake/community/-/wikis/doc/ctest/Testing-With-CTest} \l{https://gitlab.kitware.com/cmake/community/-/wikis/doc/ctest/Testing-With-CTest}
{Testing with CTest}. {Testing with CTest}.
\section1 Adding Tests To Existing Test Projects
Use a wizard to add a new file containing additional tests for projects
containing a test project.
Select \uicontrol File > \uicontrol {New File} > \uicontrol {Test Case} >
\uicontrol Choose to add a new test case.
\note This is only supported for code based test frameworks except for
Qt Tests. There is no official support for having multiple test cases
inside a single Qt test application and it is better to create
a separate test sub project for each test case.
In \uicontrol {Test framework}, select the test framework in use.
This has to match the test framework you are using inside the project
you want to add this file to.
Depending on the chosen test framework, you can specify the test case
name, test suite name, the used filename, or further options. For a
detailed explanation, see the general information provided for each
test framework on its own in \l {Creating Tests}.
\section1 Setting Up the Google C++ Testing Framework \section1 Setting Up the Google C++ Testing Framework
To build and run Google tests, install and configure the Google C++ Testing To build and run Google tests, install and configure the Google C++ Testing

View File

@@ -66,6 +66,10 @@
\row \row
\li \uicontrol {vcpkg} (experimental) \li \uicontrol {vcpkg} (experimental)
\li vcpkg package manager manifest files (vcpkg.json). \li vcpkg package manager manifest files (vcpkg.json).
\row
\li \uicontrol {Test Case}
\li Test framework specific file holding a new test case, to be
added to projects already using a test framework.
\row \row
\li \uicontrol {Nim} (experimental) \li \uicontrol {Nim} (experimental)
\li Empty Nim source and script files. \li Empty Nim source and script files.

View File

@@ -124,7 +124,6 @@
\li Other project \li Other project
\li Create custom \l{\QD} widgets or widget collections, \li Create custom \l{\QD} widgets or widget collections,
\l{Create Qt Quick UI Prototypes}{Qt Quick UI projects}, \l{Create Qt Quick UI Prototypes}{Qt Quick UI projects},
\l {Creating Tests}{auto-test projects},
\l{Add subprojects to projects}{subprojects}, \l{Add subprojects to projects}{subprojects},
empty qmake projects, or qmake projects for testing empty qmake projects, or qmake projects for testing
code snippets. code snippets.
@@ -132,6 +131,11 @@
\li Non-Qt project \li Non-Qt project
\li Create plain C or C++ applications or \l {Create Nimble projects} \li Create plain C or C++ applications or \l {Create Nimble projects}
{Nim or Nimble} applications (experimental). {Nim or Nimble} applications (experimental).
\row
\li Test project
\li Create a test project based on different supported test
frameworks, such as Qt Test, Qt Quick Test, Google Test,
Boost Test, or Catch2.
\row \row
\li Imported project \li Imported project
\li Import projects from a supported \l{Version Control Systems} \li Import projects from a supported \l{Version Control Systems}