Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-56354

Fail on debugging output anywhere in a test chain backtrace and include it in the failure report

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.7, 3.1, 3.2
    • Fix Version/s: 3.0.7, 3.1.3
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      Aside from unit test runs, ensure debugging does appear in the right spot when errors happen, especially on tests using @test annotation.

      1. Add my repository if you don't have it. See the repo link.
      2. cherry-pick MDL-56354_test

      vendor/bin/phpunit lib/phpunit/tests/advanced_test.php
      

      3. Ensure there is are errors and failures. The message appears with the failure reports, not inline with the .EFFF....

      Show
      Aside from unit test runs, ensure debugging does appear in the right spot when errors happen, especially on tests using @test annotation. 1. Add my repository if you don't have it. See the repo link. 2. cherry-pick MDL-56354 _test vendor/bin/phpunit lib/phpunit/tests/advanced_test.php 3. Ensure there is are errors and failures. The message appears with the failure reports, not inline with the .EFFF....
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull Master Branch:

      Description

      While looking at MDL-56347 I noticed that when the message returned there was a debugging, it did not fail the test and that the debugging information was returned inline with the test results.

      1. All debugging when a test is running should be included in a failure report and not inline.
      2. removing the requirement for test to appear in the function name allows tests with @test annotation to be used and get the correct debugging results.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Nov/16