Doc: Describe options for running tests without deployment

Add screenshot of CTest options tab.

Task-number: QTCREATORBUG-26278
Change-Id: I5edc97f32724946486d04965323ee81180857e9d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Leena Miettinen
2021-11-10 11:49:13 +01:00
parent 084dced9be
commit c073810ba5
2 changed files with 27 additions and 12 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

@@ -38,13 +38,20 @@
build system and uses it or even the build system as such to execute the build system and uses it or even the build system as such to execute the
respective tests. respective tests.
\QC integrates the \l{Qt Test} framework, \QC integrates the following testing frameworks for unit testing
\l{https://github.com/google/googletest}{Google C++ Testing Framework}, applications and libraries:
\l{https://www.boost.org/doc/libs/1_70_0/libs/test/doc/html/index.html}
{Boost.Test}, and \l{https://github.com/catchorg/Catch2} \list
{Catch2 test framework} for unit testing applications and libraries. \li \l{https://www.boost.org/doc/libs/1_70_0/libs/test/doc/html/index.html}
{Boost.Test}
\li \l{https://github.com/catchorg/Catch2}{Catch2 test framework}
\li \l{https://github.com/google/googletest}{Google C++ Testing Framework}
\li \l{Qt Test} framework
\endlist
Additional build system based support is provided for Additional build system based support is provided for
\l{https://cmake.org/cmake/help/latest/manual/ctest.1.html}{CTest}. \l{https://cmake.org/cmake/help/latest/manual/ctest.1.html}{CTest}.
You can use \QC to create, build, and run code based tests for your You can use \QC to create, build, and run code based tests for your
projects. projects.
@@ -332,16 +339,23 @@
in the file currently open in the code editor. in the file currently open in the code editor.
\endlist \endlist
\note By default, \QC builds a project before deploying and running \endlist
it.
By default, \QC builds a project before deploying and running it.
To run all tests without building and deploying them again, select
\uicontrol {Run All Tests Without Deployment} in the context menu.
To run the selected tests without deployment, select
\uicontrol {Run Selected Tests Without Deployment}.
The functions to run tests are also available in the context menu in the
\uicontrol Tests view and in \uicontrol Tools > \uicontrol Tests.
\note If you have enabled build system based and code based tests, \note If you have enabled build system based and code based tests,
you may run tests twice when using \uicontrol {Run All Tests} or you may run tests twice when using \uicontrol {Run All Tests} or
\uicontrol {Run Selected Tests}. This happens if the tests can be \uicontrol {Run Selected Tests}. This happens if the tests can be
found by the code based test frameworks and are registered as test found by the code based test frameworks and are registered as test
with the build system. with the build system.
\endlist
If a test takes more than a minute to execute, the default timeout might If a test takes more than a minute to execute, the default timeout might
stop the test execution. To increase the timeout, select \uicontrol Tools > stop the test execution. To increase the timeout, select \uicontrol Tools >
\uicontrol Options > \uicontrol {Testing} > \uicontrol General. \uicontrol Options > \uicontrol {Testing} > \uicontrol General.
@@ -369,7 +383,8 @@
The test cases are listed in alphabetic, case insensitive order. To list The test cases are listed in alphabetic, case insensitive order. To list
them in the order in which they are defined in the source code, them in the order in which they are defined in the source code,
select \inlineimage leafsort.png (\uicontrol {Sort Naturally}). select \inlineimage leafsort.png
(\uicontrol {Sort Naturally}).
\section2 Running and Debugging Tests from Code Editor \section2 Running and Debugging Tests from Code Editor
@@ -511,7 +526,7 @@
\li To specify settings for running Catch2 tests, select \li To specify settings for running Catch2 tests, select
\uicontrol Tools > \uicontrol Options > \uicontrol {Testing} > \uicontrol Tools > \uicontrol Options > \uicontrol {Testing} >
\uicontrol {Catch Test}. \uicontrol {Catch Test}.
\image qtcreator-autotests-options-catch2.png \image qtcreator-autotests-options-catch2.png "Catch Test options"
\li Select the \uicontrol {Show success} check box to show succeeding \li Select the \uicontrol {Show success} check box to show succeeding
expressions as well. By default Catch2 will print only fails. expressions as well. By default Catch2 will print only fails.
\li Select the \uicontrol {Break on failure while debugging} check box \li Select the \uicontrol {Break on failure while debugging} check box
@@ -543,7 +558,7 @@
\li To specify settings for running CTest-based tests, select \li To specify settings for running CTest-based tests, select
\uicontrol Tools > \uicontrol Options > \uicontrol {Testing} > \uicontrol Tools > \uicontrol Options > \uicontrol {Testing} >
\uicontrol {CTest}. \uicontrol {CTest}.
//! insert image here \image qtcreator-autotests-options-ctest.png "CTest options"
\li Select the \uicontrol {Output on failure} check box to show test \li Select the \uicontrol {Output on failure} check box to show test
specific output if a test fails. Contrary to the CTest default specific output if a test fails. Contrary to the CTest default
this is enabled by default. this is enabled by default.