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

Qt Quick Test: Optional TestCase can wait indefinitely if "when: false" is applied

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.8.4, 6.10.0 Beta4
    • Testing: QuickTest
    • Windows 10 22H2, MSVC 2022 x64

      Code

      import QtQuick
      import QtTest
      
      Item {
          TestCase {
              name: "MyMandatoryTest"
              when: true
              optional: false
      
              function test_mandatory() {
                  compare(1 + 1, 2, "sanity check");
                  verify(true);
              }
          }
      
          TestCase {
              name: "MyOptionalTest"
              when: false
              optional: true
      
              function test_optional() {
                  compare(1 + 1, 2, "sanity check");
                  verify(true);
              }
          }
      }
      

       

      Steps to reproduce

      1. Run the attached project
      2. Comment out the TestCase "MyMandatoryTest" and re-run the project.

       

      Outcomes

      • Step #1: MyMandatoryTest is initialized + run + cleaned up while MyOptionalTest has no activity at all (Expected)
      • Step #2: MyOptionalTest has no activity at all (Expected), but the empty window stays open indefinitely and closing the window leaves a zombie process (Not Expected)

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes