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

Reduce redirect() delays when running in behat

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Labels:
      None
    • Affected Branches:
      MOODLE_27_STABLE

      Description

      As a way of improving the speed of behat tests we could reduce the amount of time spent waiting after a redirect() call with a message.

      The delay parameter is used so that a message can be read by a human before the redirect. The automated tests don't need this delay to read and in fact we're just wasting time.

      Of course this is pretty horrible anyway and we should be moving away from this for humans too because it makes Moodle feel slow. But thats not a job for today (and there are other issues open for it).

      In my test test on @mod_forum the test running time was reduced by 10% by forcing the delay to 1s under behat.

      before:

      21 scenarios (21 passed)
      785 steps (785 passed)
      19m53.102s

      after:

      21 scenarios (21 passed)
      785 steps (785 passed)
      17m47.896s

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              poltawski Dan Poltawski
              Reporter:
              poltawski Dan Poltawski
              Participants:
              Component watchers:
              Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: