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

For unit testing, use random starting sequence

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1. Initialize the PHPUnit environment
      2. See the value of PHPUNIT_SEQUENCE_START
      3. Initialize the PHPUnit environment again and confirm a different PHPUNIT_SEQUENCE_START value.
      4. Run phpunit on all databases to confirm they continue to operate correctly.
      5. Run behat tests on all databases to confirm they operate correctly.

      Show
      1. Initialize the PHPUnit environment 2. See the value of PHPUNIT_SEQUENCE_START 3. Initialize the PHPUnit environment again and confirm a different PHPUNIT_SEQUENCE_START value. 4. Run phpunit on all databases to confirm they continue to operate correctly. 5. Run behat tests on all databases to confirm they operate correctly.
    • Affected Branches:
      MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      MDL-43835 setup different sequence starting values for each table to ensure that values did not collide with each other. When code is tested, the values from different tables cannot be mistaken for each other.

      This however does not remove the possibility of a user hard coding the id's that run on their environment. By randomizing the IDs used, different people and different init's will cause new table IDs to be used. This will ensure that developers do not hard code id information into their tests.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mr-russ Russell Smith
              Reporter:
              mr-russ Russell Smith
              Peer reviewer:
              Rajesh Taneja
              Integrator:
              Sam Hemelryk
              Tester:
              David Monllaó
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Nov/14