Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TestCase - Test Driven Development (TDD) in QML
QtWS25 Last Chance

TestCase - Test Driven Development (TDD) in QML

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 4.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrJoshua
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • L Offline
      L Offline
      LongJohn
      wrote on last edited by
      #2

      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...

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MrJoshua
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved