TestCase - Test Driven Development (TDD) in QML
-
Creating a simple test case files to run with either qmlscene or Qt Creator.
@>qmlscene test1.qml
file:///x/d/qt/testDrivenQML/test1.qml:25 Type TestCase unavailable
file:///Users/joshua/Qt5.2.0/5.2.0/clang_64/qml/QtTest/TestCase.qml:45 module "Qt.test.qtestroot" is not installed
@These instructions do not work (build error: 'QtGui/qwidget.h' file not found):
https://qt.gitorious.net/qt-labs/qtest-qml/source/a23a23cbcfa27366da9d12e535899864f6eb4cbd:README
and there is a very dated merge request referring to an OSX install issue.Is TDD for QML dead, or can this be made to work?
Thanks
-
Hi,
I get the same error but I haven't a solution.. I think you get this error for using
@TestCase{}@without
@QUICK_TEST_MAIN(example)@Maybee this is a Bug...
-
I finally got around to solving this. You can't use qmlscene for TestCase testing. You can roll your own, but easier is to just use the
qmltestrunner
utility.