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

For unit testing, use random starting sequence

XMLWordPrintable

    • MOODLE_28_STABLE
    • MOODLE_28_STABLE
    • 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.

      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.

            mr-russ Russell Smith
            mr-russ Russell Smith
            Rajesh Taneja Rajesh Taneja
            Sam Hemelryk Sam Hemelryk
            David Monllaó David Monllaó
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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