Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.1
-
None
-
74a5ce02667ceefe31aba9a23246b9c512527014 (qt/qtdeclarative/5.12)
Description
The documentation states:
Skips the current test case and prints the optional message. If this is a data-driven test, then only the current row is skipped. Similar to QSKIP(message) in C++.
However, if a data-row is skipped, the rest of the rows are not tested:
import QtTest 1.0 import QtQuick 2.1 TestCase { id: testCase name: "QTBUG" visible: true when: windowShown width: 400 height: 400 function test_qtbug_data() { return [ { tag: "foo" }, { tag: "bar" }, { tag: "baz" }, ]; } function test_qtbug(data) { if (data.tag === "bar") skip("skip bar") } }
Output:
********* Start testing of testcase ********* Config: Using QtTest library 5.6.1, Qt 5.6.1 (x86_64-little_endian-llp64 shared (dynamic) debug build; by MSVC 2015) PASS : extras::QTBUG::initTestCase() PASS : extras::QTBUG::test_qtbug(foo) SKIP : extras::QTBUG::test_qtbug(bar) skip bar C:\Path\to\tst_testcase.qml(21) : failure location PASS : extras::QTBUG::cleanupTestCase() Totals: 3 passed, 0 failed, 1 skipped, 0 blacklisted ********* Finished testing of extras *********