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

[QTest] Overwritten output file on multiple testcases

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.12.0
    • Testing: qtestlib
    • None
    • All

    Description

      [This question on Stackoverflow is 7,5 years open|http://example.com] and was either never raised or never addressed. To me it is more a Qt bug than something which is missing.

      When running a test executable, it prints all output from all test cases. E.g. in main test file:

       

      ...
      QTest::qExec(&testCase1, argc, argv);
      QTest::qExec(&testCase2, argc, argv);
      QTest::qExec(&testCase3, argc, argv);
      QTest::qExec(&testCase4, argc, argv);
      

      Result:

       

       

      $ ./Test
      ********* Start testing of testCase1
      ...
      ********* Finished testing of testCase1 *********
      ********* Start testing of testCase1 *********
      ...
      ********* Finished testing of testCase1 *********
      ********* Start testing of testCase2 *********
      ...
      ********* Finished testing of testCase2*********
      ********* Start testing of testCase3 *********
      ...
      ********* Finished testing of testCase3*********
      ********* Start testing of testCase4 *********
      ...
      ********* Finished testing of testCase4 *********
      

       

      But when running with -o, it looks like it has overwritten all outputs and only the last one is kept in the results file :

       

      $ ./Test -o output
      $ cat output
      ********* Start testing of testCase4 *********
      ...
      ********* Finished testing of testCase4 *********
      

       

       

       

      Attachments

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

        Activity

          People

            macadder Jason McDonald
            sam.jaques Sam Jaques
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes