Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63855 Tasks and issues related to flaky tests
  3. QTBUG-63987

qtestlib doc: create a section on common patterns and good practices

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None

    Description

      Auto tests in Qt have been written with various flavours of qtestlib, with the same test functions mixing several styles. Subsequent tests are frequently added by copy-and-paste from other tests, including bad practices. Over the years this have resulted in non-optimal and flakey tests. Create a section in docs on common patterns and good practices. This page later could easily be extended when discovering other anti-patterns found during fixing flakey and other odd looking tests.

      Reduce fragmentation by merging https://wiki.qt.io/Unit_Testing and https://wiki.qt.io/Writing_Unit_Tests into this official documentation. Wiki pages is a lazy way of documenting things properly. Note: the contents of these wiki pages needs to be evaluated when moving to the official documentation.

      There should also be a subsection on debugging techniques. See https://codereview.qt-project.org/#/c/208303/5/src/testlib/qtesthelpers_p.h for an example of what this section could contain.

      End result of this task would be a single point of a reference for new contributions of tests.

      Attachments

        Issue Links

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

          Activity

            People

              macadder Jason McDonald
              paeglis Gatis Paeglis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes