1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
6 \inheaderfile QtQuickTest
9 \brief The QQuickTest namespace contains all the functions and
10 macros related to Qt Quick Test.
12 See the \l{Introduction to Qt Quick Test} for information about how to write
15 To link to the Qt Quick Test C++ library, see \l {Qt Quick Test C++ API}.
17 \sa {Executing C++ Before QML Tests}
21 \macro QUICK_TEST_MAIN(name)
24 \brief Sets up the entry point for a Qt Quick Test application.
25 The \a name argument uniquely identifies this set of tests.
27 \snippet src_qmltest_qquicktest_snippet.cpp 1
29 \note The macro assumes that your test sources are in the current
30 directory, unless the \c QUICK_TEST_SOURCE_DIR environment variable is set.
32 \sa QUICK_TEST_MAIN_WITH_SETUP(), {Running Qt Quick Tests}
37 \macro QUICK_TEST_MAIN_WITH_SETUP(name, QuickTestSetupClass)
40 \brief Sets up the entry point for a Qt Quick Test application.
41 The \a name argument uniquely identifies this set of tests.
43 This macro is identical to QUICK_TEST_MAIN(), except that it takes an
44 additional argument \a QuickTestSetupClass, a pointer to a QObject-derived
45 class. With this class it is possible to define additional setup code to
46 execute before running the QML test.
48 \note The macro assumes that your test sources are in the current
49 directory, unless the \c QUICK_TEST_SOURCE_DIR environment variable is set.
51 The following snippet demonstrates the use of this macro:
53 \snippet src_qmltest_qquicktest.cpp 2
55 \sa QUICK_TEST_MAIN(), {Running Qt Quick Tests}