Uploaded image for project: 'Qt Quality Assurance Infrastructure'
  1. Qt Quality Assurance Infrastructure
  2. QTQAINFRA-6799

Create a QTest::ensure() that do and verify a specified QTest::action

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Not Evaluated Not Evaluated
    • None
    • dev
    • Quality Assurance
    • None
    • All

      Create a QTest function that do and verify a specified QTest::action. This function should simplify the creation of new tests and make them more reliable in the process.

      This function should be somewhat of a universal tool when creating test and therefore must work with any QObject and their various method.  One way to implement this could be

      with enum flags, telling the function what it should do. For example, if we want to ensure that isVisible(), we first need to do setVisible().

       

      The returned value could also be an enum informing if we timed out, platform no supported, success, fail, and so on...

       

       

      QTest::ensure(QObject *object, QTest::action, int timeout)

       

      It should replace structure similar to this one:

      show();                                                                                                         QTest::ensure(object, isVisible);                                                       
      QTest::waitfor... ;                                                 to instead be   
      QTRY_VERIFY(... ; 

       

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            fredericl Frederic Lefebvre
            fredericl Frederic Lefebvre
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes