Doc: Describe creating Google tests

Change-Id: I462a1db8095be14c444bfaba3ae1bc21f7196a3a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Leena Miettinen
2016-11-22 09:54:23 +01:00
parent 20c0c381ae
commit ee0499ac57
2 changed files with 58 additions and 5 deletions

View File

@@ -43,9 +43,13 @@
\uicontrol {About Plugins} > \uicontrol Utilities > \uicontrol {Auto Test}.
Restart \QC to be able to use the plugin.
\section1 Creating Qt Tests
\section1 Creating Tests
You can use a wizard to create projects that contain Qt tests:
You can use a wizard to create projects that contain Qt or Google tests.
\section2 Creating Qt Tests
To create a Qt test:
\list 1
\li Select \uicontrol File > \uicontrol {New File or Project} >
@@ -58,6 +62,9 @@
\list 1
\li In the \uicontrol {Test framework} field, select
\uicontrol {Qt Test}.
\li Select the \uicontrol {GUI Application} check box to create
a Qt application.
@@ -87,6 +94,52 @@
function in your test. For more information about creating Qt tests, see
\l{Creating a Test}.
\section2 Creating Google Tests
To create a Google test:
\list 1
\li Select \uicontrol File > \uicontrol {New File or Project} >
\uicontrol {Other Project} > \uicontrol {Auto Test} >
\uicontrol Choose to create a project with boilerplate code for a
Google test.
\li In the \uicontrol {Project and Test Information} dialog, specify
settings for the project and test:
\list 1
\li In the \uicontrol {Test framework} field, select
\uicontrol {Google Test}.
\li In the \uicontrol {Test case name} field, enter a name for
the test case.
\li In the \uicontrol {Test set name} field, enter a name for
the test set.
\li Select the \uicontrol {Enable C++ 11} check box to
support C++ 11 features in the test.
\li In the \uicontrol {Build auto tests} field, select
\uicontrol Always to always build the test when building
the project or \uicontrol {Debug Only} to only build it
during debug builds.
\li In the \uicontrol {Google test repository} field, select
a directory that contains a clone of the googletest
repository.
To use an installed Google C++ Testing framework instead,
see \l{Setting Up the Google C++ Testing Framework}.
\endlist
\endlist
\QC creates the test in the \c{tests\auto} directory in the project
directory.
\section1 Setting Up the Google C++ Testing Framework
To build and run Google tests, you must have the Google C++ Testing