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

Details

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

    Description

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

       

       

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes