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

Error in generator info does not provide sufficient debug info

    XMLWordPrintable

    Details

    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_30_STABLE

      Description

      Steps to reproduce:

      1. Write a feature file like this:

      And the following "users" exist:
            | username | firstname | lastname | email |
            | teacher1 | Teacher | 1 | teacher1@example.com |
            | student1 | Student | 1 | student1@example.com |
            | student1 | Student | 2 | student1@example.com |
      

      2. Run behat

      Expected results:
      Get error about the duplicate key (I assume)

      Actual results:

      (::) failed steps (::)
       
      01. Error writing to database
          In step `And the following "users" exist:'.                              # behat_data_generators::the_following_exist()
          From scenario background.                                                # /Users/danp/moodles/im/moodle/report/participation/tests/behat/message_participants.feature:7
          Of feature `Use the particiaption report to message groups of students'. # /Users/danp/moodles/im/moodle/report/participation/tests/behat/message_participants.feature
      

      No info about the error was provided, so it took me a while to work out what was going on.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            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:
            3 Start watching this issue

              Dates

              Created:
              Updated: