From 06378ac23a1f75b30da08cfa74b3e774aaba9298 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Mon, 11 Feb 2013 11:45:34 +0100 Subject: Doc: Update QtQuickTest documentation Add some information about -input, -functions and -help command-line options. Add some examples on how to run a single file and a single function for a QtQuickTest based test. Change-Id: Icd5f92bf8541aa412e2cd18d82dec16a85fe78c9 Reviewed-by: Alan Alpert --- src/quick/doc/src/appdevguide/qtquicktest.qdoc | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/quick/doc/src/appdevguide/qtquicktest.qdoc b/src/quick/doc/src/appdevguide/qtquicktest.qdoc index bf8ca86959..f6085764be 100644 --- a/src/quick/doc/src/appdevguide/qtquicktest.qdoc +++ b/src/quick/doc/src/appdevguide/qtquicktest.qdoc @@ -95,6 +95,20 @@ tst_example -input /mnt/SDCard/qmltests \endcode + It is also possible to run a single file using the \c{-input} option. + For example: + + \code + tst_example -input data/test.qml + \endcode + + \code + tst_example -input /test.qml + \endcode + + \note Specifying the full path to the qml test file is for example + needed for shadow builds. + If your test case needs QML imports, then you can add them as \c{-import} options to the test program command-line by adding the following line to your .pro file: @@ -102,4 +116,18 @@ \code IMPORTPATH += $$PWD/../imports/my_module1 $$PWD/../imports/my_module2 \endcode + + The \c{-functions} command-line option will return a list of the current + tests functions. It is possible to run a single test function using the name + of the test function as an argument. For example: + + \code + tst_example Test_Name::function1 + \endcode + + The \c{-help} command-line option will return all the options available. + + \code + tst_example -help + \endcode */ -- cgit v1.2.3