Name Description Size Coverage
3rdparty -
CMakeLists.txt 7310 -
configure.cmake 1137 -
doc -
qabstractitemmodeltester.cpp 44849 -
qabstractitemmodeltester.h 1495 -
qabstracttestlogger.cpp ! \internal \class QAbstractTestLogger \inmodule QtTest \brief Base class for test loggers Implementations of logging for QtTest should implement all pure virtual methods of this class and may implement the other virtual methods. This class's documentation of each virtual method sets out how those implementations are invoked by the QtTest code and offers guidance on how the logging class should use the data. Actual implementations may have different requirements - such as a file format with a defined schema, or a target audience to serve - that affect how it interprets that guidance. 18606 -
qabstracttestlogger_p.h 4153 -
qappletestlogger.cpp ! \internal \class QAppleTestLogger \inmodule QtTest QAppleTestLogger reports test results through Apple's unified system logging. Results can be viewed in the Console app. 5694 -
qappletestlogger_p.h 1443 -
qasciikey.cpp ! \internal Convert an ascii char key value to a Qt Key value. If the key is unknown a 0 is returned. Note: this may happen more than you like since not all known ascii keys _are_ converted already. So feel free to add all the keys you need. 18854 -
qbenchmark.cpp ! \internal Initial iteration count based on \a suggestion. In qtestcase.cpp, TestMethods::invokeTestOnData() invokes the test method in a loop until (the test fails or skips, or) the test run's duration exceeds a certain minimum; setResults() doubles \c iterationCount when it doesn't accept the result. In each call to the test method, the QBENCHMARK duly performs \c iteractionCount cycles of its block of code, from which other things make the above decisions about whether to double and try again. 7995 -
qbenchmark.h 1419 -
qbenchmark_p.h The QBenchmarkGlobalData class stores global benchmark-related data. QBenchmarkGlobalData:current is created at the beginning of qExec() and cleared at the end. 4688 -
qbenchmarkevent.cpp 1948 -
qbenchmarkevent_p.h 1216 -
qbenchmarkmeasurement.cpp 2194 -
qbenchmarkmeasurement_p.h 1363 -
qbenchmarkmetric.cpp ! \enum QTest::QBenchmarkMetric \since 4.7 This enum lists all the things that can be benchmarked. \value FramesPerSecond Frames per second \value BitsPerSecond Bits per second \value BytesPerSecond Bytes per second \value WalltimeMilliseconds Clock time in milliseconds \value WalltimeNanoseconds Clock time in nanoseconds \value BytesAllocated Memory usage in bytes \value Events Event count \value CPUTicks CPU time \value CPUMigrations Process migrations between CPUs \value CPUCycles CPU cycles \value RefCPUCycles Reference CPU cycles \value BusCycles Bus cycles \value StalledCycles Cycles stalled \value InstructionReads Instruction reads \value Instructions Instructions executed \value BranchInstructions Branch-type instructions \value BranchMisses Branch instructions that were mispredicted \value CacheReferences Cache accesses of any type \value CacheMisses Cache misses of any type \value CacheReads Cache reads / loads \value CacheReadMisses Cache read / load misses \value CacheWrites Cache writes / stores \value CacheWriteMisses Cache write / store misses \value CachePrefetches Cache prefetches \value CachePrefetchMisses Cache prefetch misses \value ContextSwitches Context switches \value PageFaults Page faults of any type \value MinorPageFaults Minor page faults \value MajorPageFaults Major page faults \value AlignmentFaults Faults caused due to misalignment \value EmulationFaults Faults that needed software emulation \sa QTest::benchmarkMetricName(), QTest::benchmarkMetricUnit() Note that \c WalltimeNanoseconds and \c BytesAllocated are only provided for use via \l setBenchmarkResult(), and results in those metrics are not able to be provided automatically by the QTest framework. 4879 -
qbenchmarkmetric.h 993 -
qbenchmarkmetric_p.h 768 -
qbenchmarkperfevents.cpp \class QBenchmarkPerfEvents \brief The Linux perf events benchmark backend This benchmark backend uses the Linux Performance Counters interface, introduced with the Linux kernel v2.6.31. The interface is done by one system call (perf_event_open) which takes an attribute structure and returns a file descriptor. More information: \li design docs: tools/perf/design.txt <http://lxr.linux.no/linux/tools/perf/design.txt> \li sample tool: tools/perf/builtin-stat.c <http://lxr.linux.no/linux/tools/perf/builtin-stat.c> (note: as of v3.3.1, the documentation is out-of-date with the kernel interface, so reading the source code of existing tools is necessary) This benchlib backend monitors the current process as well as child process launched. We do not try to benchmark in kernel or hypervisor mode, as that usually requires elevated privileges. 25194 -
qbenchmarkperfevents_p.h 1221 -
qbenchmarktimemeasurers_p.h 1621 -
qbenchmarkvalgrind.cpp 6478 -
qbenchmarkvalgrind_p.h 1547 -
qcomparisontesthelper.cpp 533 -
qcomparisontesthelper_p.h END 15773 -
qcsvbenchmarklogger.cpp ! \internal \class QCsvBenchmarkLogger \inmodule QtTest QCsvBenchmarkLogger implements a comma-separated value format for benchmarks. This is intended to be suitable for import into spreadsheets. It does not print test failures, debug messages, warnings or any other details. 2333 -
qcsvbenchmarklogger_p.h 1228 -
qemulationdetector_p.h Check if we are running Arm binary on x86 machine. Currently this is only able to check on Linux. If not able to detect, return false. 2788 -
qjunittestlogger.cpp ! \internal \class QJUnitTestLogger \inmodule QtTest QJUnitTestLogger implements logging in a JUnit-compatible XML format. The \l{JUnit XML} format was originally developed for Java testing. It is supported by \l{Test Center}. 9520 -
qjunittestlogger_p.h 2270 -
qmeanvarianceaccumulator_p.h 1281 -
qplaintestlogger.cpp 19255 -
qplaintestlogger_p.h 1857 -
qpropertytesthelper_p.h ! \internal This helper macro is used as a wrapper around \l QVERIFY2() to provide a detailed error message in case of failure. It is intended to be used \e only in the helper functions below. The custom \a comparator method is used to check if the \a actual and \a expected values are equal or not. The macro uses a custom \a represent callback to generate the string representation of \a actual and \a expected. The error message is close to the one provided by the \l QCOMPARE() macro. Specifically the implementation is taken from the \c formatFailMessage() function, which is defined in the \c qtestresult.cpp file. 23769 -
qsignaldumper.cpp signal_index 4985 -
qsignaldumper_p.h 796 -
qsignalspy.cpp ! \class QSignalSpy \inmodule QtTest \brief The QSignalSpy class enables introspection of signal emission. QSignalSpy can connect to any signal of any object and records its emission. QSignalSpy itself is a list of QVariant lists. Each emission of the signal will append one item to the list, containing the arguments of the signal. The following example records all signal emissions for the \c clicked() signal of a QCheckBox: \snippet code/doc_src_qsignalspy.cpp 0 \c{spy.takeFirst()} returns the arguments for the first emitted signal, as a list of QVariant objects. The \c clicked() signal has a single bool argument, which is stored as the first entry in the list of arguments. The example below catches a signal from a custom object: \snippet code/doc_src_qsignalspy.cpp 1 \note Non-standard data types need to be registered, using the qRegisterMetaType() function, before you can create a QSignalSpy. For example: \snippet code/doc_src_qsignalspy.cpp 2 To retrieve the instance, you can use qvariant_cast: \snippet code/doc_src_qsignalspy.cpp 3 \section1 Verifying Signal Emissions The QSignalSpy class provides an elegant mechanism for capturing the list of signals emitted by an object. However, you should verify its validity after construction. The constructor does a number of sanity checks, such as verifying that the signal to be spied upon actually exists. To make the diagnosis of test failures easier, the results of these checks should be checked by calling \c QVERIFY(spy.isValid()) before proceeding further with a test. \sa QVERIFY() 9355 -
qsignalspy.h 2214 -
qt_cmdline.cmake 65 -
qtaptestlogger.cpp ! \internal \class QTapTestLogger \inmodule QtTest QTapTestLogger implements the Test Anything Protocol v13. The \l{Test Anything Protocol} (TAP) is a simple plain-text interface between testing code and systems for reporting and analyzing test results. Since QtTest doesn't build the table for a data-driven test until the test is about to be run, we don't typically know how many tests we'll run until we've run them, so we put The Plan at the end, rather than the beginning. We summarise the results in comments following The Plan. \section1 YAMLish The TAP protocol supports inclusion, after a Test Line, of a "diagnostic block" in YAML, containing supporting information. We use this to package other information from the test, in combination with comments to record information we're unable to deliver at the same time as a test line. By convention, TAP producers limit themselves to a restricted subset of YAML, known as YAMLish, for maximal compatibility with TAP consumers. YAML (see \c yaml.org for details) supports three data-types: mapping (hash or dictionary), sequence (list, array or set) and scalar (string or number), much as JSON does. It uses indentation to indicate levels of nesting of mappings and sequences within one another. A line starting with a dash (at the same level of indent as its context) introduces a list entry. A line starting with a key (more indented than its context, aside from any earlier keys at its level) followed by a colon introduces a mapping entry; the key may be either a simple word or a quoted string (within which numeric escapes may be used to indicate unicode characters). The value associated with a given key, or the entry in a list, can appar after the key-colon or dasy either on the same line or on a succession of subsequent lines at higher indent. Thus \code - first list item - second: list item is a mapping with: - two keys - the second of which is a list - back in the outer list, a third item \endcode In YAMLish, the top-level structure should be a hash. The keys supported for this hash, with the meanings for their values, are: \list \li \c message: free text supplying supporting details \li \c severity: how bad is it ? \li \c source: source describing the test, as an URL (compare file, line) \li \c at: identifies the function (with file and line) performing the test \li \c datetime: when the test was run (ISO 8601 or HTTP format) \li \c file: source of the test as a local file-name, when appropriate \li \c line: line number within the source \li \c name: test name \li \c extensions: sub-hash in which to store random other stuff \li \c actual: what happened (a.k.a. found; contrast expected) \li \c expected: what was expected (a.k.a. wanted; contrast actual) \li \c display: description of the result, suitable for display \li \c dump: a sub-hash of variable values when the result arose \li \c error: describes the error \li \c backtrace: describes the call-stack of the error \endlist In practice, only \c at, \c expected and \c actual appear to be generally supported. We can also have several messages produced within a single test, so the simple \c message / \c severity pair of top-level keys does not serve us well. We therefore use \c extensions with a sub-tag \c messages in which to package a list of messages. \sa QAbstractTestLogger 19279 -
qtaptestlogger_p.h 1634 -
qteamcitylogger.cpp ! \internal \class QTeamCityLogger \inmodule QtTest QTeamCityLogger implements logging in the \l{TeamCity} format. 8511 -
qteamcitylogger_p.h 1547 -
qtest.h 9440 -
qtest_gui.h 7333 -
qtest_network.h 1830 -
qtest_widgets.h 2281 -
qtestaccessible.cpp 568 -
qtestaccessible.h 14190 -
qtestassert.h 485 -
qtestblacklist.cpp The BLACKLIST file format is a grouped listing of keywords. Blank lines and everything after # is simply ignored. An initial #-line referring to this documentation is kind to readers. Comments can also be used to indicate the reasons for ignoring particular cases. Please scope comments to keywords if possible, to avoid confusion when additional keywords or tests cases are added later. Each blacklist line is interpreted as a list of keywords in an AND-relationship. To blacklist a test for multiple platforms (OR-relationship), use separate lines. The key "ci" applies only when run by COIN. Other keys name platforms, operating systems, distributions, tool-chains or architectures; a ! prefix reverses what it checks. A version, joined to a key (at present, only for distributions and for msvc) with a hyphen, limits the key to the specific version. A keyword line matches if every key on it applies to the present run. Successive lines are alternate conditions for ignoring a test. Ungrouped lines at the beginning of a file apply to the whole testcase. A group starts with a [square-bracketed] identification of a test function to ignore. For data-driven tests, this identification can be narrowed by the inclusion of global and local data row tags, separated from the function name and each other by colons. If both global and function-specific data rows tags are supplied, the global one comes first (as in the tag reported in test output, albeit in parentheses after the function name). Even when a test does have global and local data tags, you can omit either or both. (If a global data row's name coincides with that of a local data row, some unintended matches may result; try to keep your data-row tags distinct.) Subsequent lines give conditions for ignoring this test. You need at least one or the group has no effect. # See qtbase/src/testlib/qtestblacklist.cpp for format # Test doesn't work on QNX at all qnx [testFunction] linux # QTBUG-12345 windows 64bit # QTBUG-12345 [testSlowly] macos ci # Flaky in COIN on macOS, not reproducible by developers [testfunction2:testData] msvc-2010 # Needs basic C++11 support [getFile:withProxy SSL:localhost] android QML test functions are identified using the following format: <TestCase name>::<function name>:<data tag> For example, to blacklist a QML test on RHEL 7.6: [Button::test_display:TextOnly] ci rhel-7.6 # QTBUG-12345 Keys are lower-case. Distribution name and version are supported if QSysInfo's productType() and productVersion() return them. Keys can be added via the space-separated QTEST_ENVIRONMENT environment variable: QTEST_ENVIRONMENT=ci ./tst_stuff This can be used to "mock" a test environment. In the example above, we add "ci" to the list of keys for the test environment, making it possible to test BLACKLIST files that blacklist tests in a CI environment. The other known keys are listed below: 9421 -
qtestblacklist_p.h 908 -
qtestcase.cpp 122328 -
qtestcase.h success 38725 -
qtestcase.qdoc 68116 -
qtestcase_p.h 882 -
qtestcoreelement_p.h 3544 -
qtestcrashhandler_p.h 1834 -
qtestcrashhandler_unix.cpp we have code to set the minimum 27407 -
qtestcrashhandler_win.cpp 7578 -
qtestdata.cpp 2570 -
qtestdata.h 1482 -
qtestelement.cpp 959 -
qtestelement_p.h 1067 -
qtestelementattribute.cpp 1433 -
qtestelementattribute_p.h 1665 -
qtestevent.h w 7633 -
qtestevent.qdoc 5726 -
qtesteventloop.h 2521 -
qtesthelpers_p.h ! \internal Make a widget frameless to prevent size constraints of title bars from interfering (Windows). 5156 -
qtestjunitstreamer.cpp 4362 -
qtestjunitstreamer_p.h 1736 -
qtestkeyboard.h 13356 -
qtestlog.cpp 24088 -
qtestlog_p.h 3778 -
qtestmouse.cpp 361 -
qtestmouse.h ! \internal This function creates a QPA mouse event of type specified by \a action and calls QWindowSystemInterface::handleMouseEvent(), simulating the windowing system and bypassing the platform plugin. \a delay is the amount of time to be added to the simulated clock so that QInputEvent::timestamp() will be greater than that of the previous event. We expect all event-handling code to rely on the event timestamps, not the system clock; therefore tests can be run faster than real-time. If \a delay is not given, a default minimum mouse delay is used, and unintended double-click events are prevented by incrementing the timestamp by 500ms after each mouse release. Therefore, to test double-clicks, it's necessary to give a realistic \a delay value (for example, 10ms). 11002 -
qtestregistry.cpp 802 -
qtestregistry_p.h 1116 -
qtestresult.cpp ! \class QTestResult \inmodule QtTest \internal 29431 -
qtestresult_p.h 6526 -
qtestspontaneevent.h 471 -
qtestsystem.h 443 -
qtesttable.cpp 3780 -
qtesttable_p.h 1238 -
qtesttostring.h 15567 -
qtesttouch.h 1344 -
qtestutil_macos.mm ! \internal Disables restoration of previously saved window state. This causes tests to start with a clean slate and prevents the "previous restore failed" dialog from showing if there was a test crash. 2789 -
qtestutil_macos_p.h 910 -
qtestwheel.h ! \internal This function creates a mouse wheel event and calls QWindowSystemInterface::handleWheelEvent(). \a window is the window that should be receiving the event and \a pos provides the location of the event in the window's local coordinates. \a angleDelta contains the wheel rotation angle, while \a pixelDelta contains the scrolling distance in pixels on screen. The keyboard states at the time of the event are specified by \a stateKey. The scrolling phase of the event is specified by \a phase. 2665 -
qttestglobal.h Used for QCOMPARE() 869 -
QtTestProperties.cmake 1121 -
qxctestlogger.mm 14826 -
qxctestlogger_p.h 1634 -
qxmltestlogger.cpp ! \internal \class QXmlTestLogger \inmodule QtTest QXmlTestLogger implements two XML formats specific to Qt. The two formats are distinguished by the XmlMode enum. 15379 -
qxmltestlogger_p.h 1618 -
removed_api.cpp 663 -
selfcover.cmake 1550 -