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

Make Behat Web Driver failures more informative

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_38_STABLE

      Description

      Today I had trouble with behat. On running my tests I would see:

      "Selenium server is not running, you need to start it to run tests that involve Javascript."

      However, the real issue was that the chrome browser had crashed.

      I found this out by modifying

      lib/tests/behat/behat_hooks.php

       

      try

      { $session = $this->getSession(); }

      catch (CurlExec $e)

      { // Exception thrown by WebDriver, so only @javascript tests will be caugth; in // behat_util::check_server_status() we already checked that the server is running. throw new behat_stop_exception($driverexceptionmsg); }

      catch (DriverException $e)

      { var_dump($e->getMessage()); die; throw new behat_stop_exception($driverexceptionmsg); }

      catch (UnknownError $e)

      { // Generic 'I have no idea' Selenium error. Custom exception to provide more feedback about possible solutions. throw new behat_stop_exception($e->getMessage()); }

       

      I'll file a proper patch when I get time.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              brudinie guy thomas
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: