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

Behat data generator to add modules instances

    XMLWordPrintable

Details

    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • MDL-40672_master
    • Hide
      1. Set your behat testing environment
      2. Edit admin/tool/behat/tests/behat/data_generators.feature 's Add modules scenario
      3. Change the the following "activities" exists step using other modules, for each different module:
        • If the module does not have data generators you should see an exception stating that, for this activity, you need to use another step instead of the current one
        • It will pass or fail depending on the other steps, but we want to know if the activities are properly created, to check it, open a browser and access you behat test site URL logging in with admin/admin
        • Access Course 1, you SHOULD see the activities you specified
      Show
      Set your behat testing environment Edit admin/tool/behat/tests/behat/data_generators.feature 's Add modules scenario Change the the following "activities" exists step using other modules, for each different module: If the module does not have data generators you should see an exception stating that, for this activity, you need to use another step instead of the current one It will pass or fail depending on the other steps, but we want to know if the activities are properly created, to check it, open a browser and access you behat test site URL logging in with admin/admin Access Course 1 , you SHOULD see the activities you specified

    Description

      Many of our tests (and more to come) require interaction with activities, at the moment we create them through the moodle UI following steps, but a data generator will speed up many tests that are not really testing that the activity is properly created, but other functionalities.

      Attachments

        Issue Links

          Activity

            People

              dmonllao David Monllaó
              dmonllao David Monllaó
              Dan Poltawski Dan Poltawski
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Jérôme Mouneyrac Jérôme Mouneyrac
              Andrew Lyons, 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:
                Resolved:
                18/Nov/13