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. Can QTest or Qt Quick Test be used for automated system (not unit) testing of QtQuick Control2/C++ application?
QtWS25 Last Chance

Can QTest or Qt Quick Test be used for automated system (not unit) testing of QtQuick Control2/C++ application?

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
automated testiqtquicktesting
3 Posts 2 Posters 1.7k 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.
  • A Offline
    A Offline
    Alexey Soloviev
    wrote on last edited by
    #1

    Hello!
    We'd like to create some automated tests for the whole QtQuickControls2/C++ application with C++ middleware layer providing QML with complex/nested context properties for binding and signals/slot interaction.
    And wonder if Qt unit test frameworks can be used for that.

    Mostly the tests would include navigation through the screens with verification that proper controls are displayed and content of some controls is updated i.e. just changes on some mouse/key events.
    So we need to have the application started, an access to controls on the screen and an emulation of mouse clicks/key presses.

    Qt Quick test is designed for unit test of separate QML components and probably could be used for system test of pure Qml application but not for mixed QML/C++. Right? We thought about conditional loading of TestCase components but this doesn't seem to be a good way.

    With QTest how can we start the application? Do we have to repeat main.cpp logic in initTestCase() ?

    Maybe there are other approaches to automated testing with Qt means without 3rd party frameworks as it's not easy to get approval from management on 3rd party software in our prototype. Snapshot testing doesn't fit our case as controls properties are unpredictably changing.

    Would appreciate any suggestions.

    1 Reply Last reply
    1
    • jpnurmiJ Offline
      jpnurmiJ Offline
      jpnurmi
      wrote on last edited by
      #2

      How about Squish? It's also used for release test automation of Qt.

      A 1 Reply Last reply
      2
      • jpnurmiJ jpnurmi

        How about Squish? It's also used for release test automation of Qt.

        A Offline
        A Offline
        Alexey Soloviev
        wrote on last edited by
        #3

        @jpnurmi said in Can QTest or Qt Quick Test be used for automated system (not unit) testing of QtQuick Control2/C++ application?:

        How about Squish? It's also used for release test automation of Qt.

        Thank you for the suggestion! Yes we noticed Squish. But now we develop an application prototype using QML and until some milestone would like not to use commercial tools. On the other hand we don't need a thorough test coverage yet. We'd like mostly sanity tests to validate. And we want to try Qt test frameworks or implement feeding navigation commands and verification ourselves with Qt C++/QML means.

        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