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

Output Behat tests results using a progress format, like PHPUnit, instead of a verbose format

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Install your behat testing environment
      • Run the tests
        • http://docs.moodle.org/dev/Acceptance_testing#Running_tests
        • They SHOULD all pass
        • You SHOULD NOT see all the steps that are being executed, you SHOULD see an output format similar than the phpunit default output format, where a '.' is printed for each passed test, 'F' for each failed test and 'S' for skipped tests (ATM you should only see dots and maybe some Fs)
      • Open your behat config file (located in $CFG->behat_dataroot/behat/behat.yml)
      • In the lower part of the file you SHOULD find something like:

        formatter:
          name: progress
        

      (Note that some tests can fail due to unavailable elements (the error would be something like "there is no element with id|label|title 'Username'") further work is being done in MDL-37750 to solve it.)

      Show
      Install your behat testing environment If you don't have PHP 5.4 check $CFG->behat_switchcompletely in config-dist.php but remember to remove the var and disable the test environment after the tests http://docs.moodle.org/dev/Acceptance_testing#Installation Run the tests http://docs.moodle.org/dev/Acceptance_testing#Running_tests They SHOULD all pass You SHOULD NOT see all the steps that are being executed, you SHOULD see an output format similar than the phpunit default output format, where a '.' is printed for each passed test, 'F' for each failed test and 'S' for skipped tests (ATM you should only see dots and maybe some Fs) Open your behat config file (located in $CFG->behat_dataroot/behat/behat.yml) In the lower part of the file you SHOULD find something like: formatter: name: progress (Note that some tests can fail due to unavailable elements (the error would be something like "there is no element with id|label|title 'Username'") further work is being done in MDL-37750 to solve it.)
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-37787_master

      Description

      The default Behat output is very verbose, showing all the steps that are running, with the files involved, line numbers...

      The PHPUnit output used progress dots "....." as tests are passing and other characters for fails, errors and skipped tests. Info about non-passing tests could be delayed until the completion of the tests.

        Attachments

          Activity

            People

            Assignee:
            dmonllao David Monllaó
            Reporter:
            dmonllao David Monllaó
            Peer reviewer:
            Dan Poltawski Dan Poltawski
            Integrator:
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Tester:
            Rossiani Wijaya Rossiani Wijaya
            Participants:
            Component watchers:
            Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              14/May/13