Skip to content

Commit 9332828

Browse files
HACKING: Explain how to run unit tests
Change-Id: I3dc9f339281f96c46c05a3972783889ef88044a4 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Orgad Shaneh <[email protected]>
1 parent 3a3596b commit 9332828

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

HACKING

+25
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,28 @@ For instructions on how to set up the Qt Creator repository to contribute
44
patches back to Qt Creator, please check:
55

66
https://wiki.qt.io/Setting_up_Gerrit#How_to_get_started_-_Gerrit_registration
7+
8+
Qt Creator has integrated auto tests, and further external tests in the
9+
subdirectory 'tests'.
10+
11+
To build the integrated auto tests, build Qt Creator with the additional
12+
QMake option TEST=1
13+
14+
To build also the auto tests, manual tests and unit tests in the 'tests'
15+
subdirectory, use the QMake option BUILD_TESTS=1
16+
17+
Afterwards:
18+
19+
* The tests from the 'tests' subdirectory can be run as individual applications.
20+
They are also available as separate Run configuration from within Qt Creator.
21+
22+
* All the integrated tests for a specific plugin can be run with:
23+
24+
qtcreator -test QtSupport
25+
26+
* To run only a specific test case, use:
27+
28+
qtcreator -test QtSupport,testQtOutputFormatter
29+
30+
Note: Adding -test to Qt Creator will run the tests in a clean settingspath.
31+
To run them with specific settings, -settingspath /path has to be provided.

0 commit comments

Comments
 (0)