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

The Dashboard makes every Behat test very very slow for @javascript tests

    XMLWordPrintable

Details

    • MOODLE_36_STABLE, MOODLE_37_STABLE

    Description

      1. When you log in in Moodle, you are redirected to your Dashboard.
      2. Since every Behat test starts with all the caches empty, it takes >10s to render the dashboard. (Acutally, in my last Behat test run which had 4 scenarios, the times for the login steps were 34s, 17s, 18s and 22s most of that caused by the dashboard.)
      3. What I am testing has nothing to do with the dashboard anyway.

      More generally, we have this history that every Behat scenario starts be testing some irrelevant navigation.

      My suggestion would be that we should make a single step:

      When I am on "C100" "core_course" "homepage" logged in as "admin"

      To support this every component could optionally implement a get_url($type, $descriptor) method in their behat class. E.g. the above would call behat_course::get_url with "homepage" and "C100".

      I am assuming there is some way to get $SESSION->wantsurl set to make it work.

      Attachments

        Issue Links

          Activity

            People

              timhunt Tim Hunt
              timhunt Tim Hunt
              Votes:
              1 Vote for this issue
              Watchers:
              3 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 - 10 minutes
                  10m