Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36269 META: Create basic steps and steps definitions
  3. MDL-37659

Add data generators to quickly set up the initial environment required by tests

XMLWordPrintable

    • MOODLE_25_STABLE
    • MDL-37659_master
    • Hide

      (Note that some tests can fail due to unavailable elements (the error would be something like "there is no element with id|label|title 'Username'") further work is being done in MDL-37750 to solve it.)

      Show
      Install your behat testing environment If you don't have PHP 5.4 check $CFG->behat_switchcompletely in config-dist.php but remember to remove the var and disable the test environment after the tests http://docs.moodle.org/dev/Acceptance_testing#Installation Run the tests http://docs.moodle.org/dev/Acceptance_testing#Running_tests They SHOULD all pass (Note that some tests can fail due to unavailable elements (the error would be something like "there is no element with id|label|title 'Username'") further work is being done in MDL-37750 to solve it.)

      Acceptance tests are black-boxed so we can't deal with the application internals (== run PHP code) to test anything, but most of the tests will need a course, a student, a teacher, their enrolments... and we don't want to replicate the same steps users follows to set it up at every test. What we can do to keep our test black-boxes is to tests this features (add a user, add a course...) like any other feature and separately we can have white-box steps to set up the most common initial environments.

      We can use the current data generators for the basic actions and add more as long as we require them if they fill usual needs.

      The basic entities/relations we will need are:

      • Courses
      • Users
      • Enrolments
      • Groups
      • Groupings
      • Blocks
      • Activities

      With this steps and MDL-37657 steps we have enough to add tests to tests this basic steps definitions

            dmonllao David Monllaó
            dmonllao David Monllaó
            Dan Poltawski Dan Poltawski
            Andrew Davis Andrew Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.