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

Expand unit test coverage defaults

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-72701-master
    • Hide
      1. Initialise phpunit

        php admin/tool/phpunit/cli/init.php
        

      2. Ensure that you have the pcov extension installed
      3. Run phpunit with coverage:
        1. master, 311, 310:

          php -dpcov.enabled=1 -dpcov.initial.files=1024 -dpcov.directory=`pwd` -dmemory_limit=4096M vendor/bin/phpunit --coverage-html coverage
          

        2. 39:
          You need xdebug3 as pcov did not exist when the phpunit version for 3.9 was released.

          php -dpcov.enabled=0 -dxdebug.mode=coverage -dmemory_limit=4096M vendor/bin/phpunit --coverage-html coverage
          

      4. Wait an hour or more
        1. Confirm that the coverage report was generated
      Show
      Initialise phpunit php admin/tool/phpunit/cli/init.php Ensure that you have the pcov extension installed Run phpunit with coverage: master, 311, 310: php -dpcov.enabled=1 -dpcov.initial.files=1024 -dpcov.directory=`pwd` -dmemory_limit=4096M vendor/bin/phpunit --coverage-html coverage 39: You need xdebug3 as pcov did not exist when the phpunit version for 3.9 was released. php -dpcov.enabled=0 -dxdebug.mode=coverage -dmemory_limit=4096M vendor/bin/phpunit --coverage-html coverage Wait an hour or more Confirm that the coverage report was generated

    Description

      We should include some defaults for unit test coverage information to automatically include:

      • classes
      • tests/generator
      • lib.php
      • locallib.php

      We should do this:

      • when no coverage.php has been created; and
      • when a coverage.php exists but does not contain these items and they are not in an exclude list.

      Attachments

        Issue Links

          Activity

            People

              dobedobedoh Andrew Lyons
              dobedobedoh Andrew Lyons
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Jun Pataleta Jun Pataleta
              Jun Pataleta Jun Pataleta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 10 minutes
                  6h 10m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.