Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-69413

QTestLib Changes in Qt 6

    XMLWordPrintable

    Details

      Description

      Test execution

      The need to write scripts to determine test plans and execute them (flaky handling) should be minimized (for example, COIN currently runs qmake -r to create a test plan). However, it should be considered what ctest provides, first.

      • Add functionality create test plan and present results
      • Move flaky rerun policies into testlib (note ctest also has some re-run feature)

      Extend functionality

      • Provide more Gui utilities (High DPI screen/window sizes, High DPI fuzz comparison, image comparison); potentially as a separate module? This would allow for removing a lot of code duplicated in the tests.
      • Re-evaluate reasons why we limit executables to single test classes and if the reasons do no more apply add functionality to fully support this feature
        (QTest::qExec() can be used multiple times and results could be added to return the final result.. but this loses e.g. functionality of explicitly running single test functions)

      Code

      • Bring code up to scratch (however carefully considering performance)
      • Check macros:
        • Consider using exceptions instead of void returns - this would remove the need to always use void for helper functions
        • Performance: Restructure QCOMPARE to only format the operands to strings in case of failure (currently, operands are always formatted, which is costly)
        • Provide other operators (QLESS_THAN,...) which allows for removing a lot of QVERIFY and log the values in case of fails
      • Data driven tests
        • Performance: Use coroutines to yield test data via some tuple (would remove the need to store a matrix of QVariants which is a performance hit, currently)
        • Provide something for resources during shared over the live time of data driven tests. This is currently not possible.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-69413
          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                paeglis Gatis Paeglis
                Reporter:
                paeglis Gatis Paeglis
              • Votes:
                0 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Gerrit Reviews

                  There is 1 open Gerrit change