Moodle

Unit tests showing many failures of all kinds

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9.1, 2.0
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Nicolas, can you explore why the Unit tests are currently showing so many failures in Moodle 1.9? is this just a recent regression?

Issue Links

Activity

Hide
Jani Lemmetyinen added a comment -

Here's some Unit test reports, related to MDL-14059.
---------------------------------
This one is from Moodle 1.8.2. When restoring backup from 1.8.2 to 1.9, course totals were OK.

Moodle testit: KAIKKI
Epäonnistui: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_get_user / ?
True assertion got False at [/home/webadmin/mdemo.planeetta.com/html/moodle/group/simpletest/test_basicgrouplib.php line 37]
Epäonnistui: lib/simpletest/testdmllib.php / ? datalib_test / ? test_insert_record / ?
Insert bad data - error should have been printed. This is known not to work on MySQL. at [/home/webadmin/mdemo.planeetta.com/html/moodle/lib/simpletest/testdmllib.php line 286]
12/12 test cases complete: 179 passes, 3 fails and 0 exceptions.
Suorita testi klo 27-03-2008 09:44 EETUsing SimpleTest version 1.0.1alpha3.
----------------------

Show
Jani Lemmetyinen added a comment - Here's some Unit test reports, related to MDL-14059. --------------------------------- This one is from Moodle 1.8.2. When restoring backup from 1.8.2 to 1.9, course totals were OK. Moodle testit: KAIKKI Epäonnistui: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_get_user / ? True assertion got False at [/home/webadmin/mdemo.planeetta.com/html/moodle/group/simpletest/test_basicgrouplib.php line 37] Epäonnistui: lib/simpletest/testdmllib.php / ? datalib_test / ? test_insert_record / ? Insert bad data - error should have been printed. This is known not to work on MySQL. at [/home/webadmin/mdemo.planeetta.com/html/moodle/lib/simpletest/testdmllib.php line 286] 12/12 test cases complete: 179 passes, 3 fails and 0 exceptions. Suorita testi klo 27-03-2008 09:44 EETUsing SimpleTest version 1.0.1alpha3. ----------------------
Hide
Jani Lemmetyinen added a comment -

And this one is from moodle 1.8.4, Mysql 5.0.37, php 5.2.5
When updating this site to 1.9., course totals were missing.
------------------------------

Moodle unit tests: ALL
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_get_user / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 33]
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 74]
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 75]
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 76]
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 78]
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 80]
Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_remove_member / ?
True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 84]
Fail: lib/simpletest/testdmllib.php / ? datalib_test / ? test_insert_record / ?
Insert bad data - error should have been printed. This is known not to work on MySQL. at [C:\Apache2.2\htdocs\palautus_moodle\lib\simpletest\testdmllib.php line 286]
Starting digest processing... Cleaned old digest records Sending forum digests: Thursday, 27 March 2008, 10:17 AM
Fail: question/type/numerical/simpletest/testquestiontype.php / ? / ?
Bad GroupTest [C:\Apache2.2\htdocs\palautus_moodle/question/type/numerical/simpletest/testquestiontype.php] with error [Creating default object from empty value]
12/12 test cases complete: 202 passes, 10 fails and 0 exceptions.
Run at 27-03-2008 10:17 EET.Using SimpleTest version 1.0.1alpha3.

Show
Jani Lemmetyinen added a comment - And this one is from moodle 1.8.4, Mysql 5.0.37, php 5.2.5 When updating this site to 1.9., course totals were missing. ------------------------------ Moodle unit tests: ALL Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_get_user / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 33] Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 74] Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 75] Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 76] Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 78] Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_add_member / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 80] Fail: group/simpletest/test_basicgrouplib.php / ? basicgrouplib_test / ? test_remove_member / ? True assertion got False at [C:\Apache2.2\htdocs\palautus_moodle\group\simpletest\test_basicgrouplib.php line 84] Fail: lib/simpletest/testdmllib.php / ? datalib_test / ? test_insert_record / ? Insert bad data - error should have been printed. This is known not to work on MySQL. at [C:\Apache2.2\htdocs\palautus_moodle\lib\simpletest\testdmllib.php line 286] Starting digest processing... Cleaned old digest records Sending forum digests: Thursday, 27 March 2008, 10:17 AM Fail: question/type/numerical/simpletest/testquestiontype.php / ? / ? Bad GroupTest [C:\Apache2.2\htdocs\palautus_moodle/question/type/numerical/simpletest/testquestiontype.php] with error [Creating default object from empty value] 12/12 test cases complete: 202 passes, 10 fails and 0 exceptions. Run at 27-03-2008 10:17 EET.Using SimpleTest version 1.0.1alpha3.
Hide
Nicolas Connault added a comment -

There were a few issues in gradebook tests, and the backuplib unit test suite was completely messed up and will have to be refactored using better methods. WIth these changes, all unit tests pass (541 tests in total).

Show
Nicolas Connault added a comment - There were a few issues in gradebook tests, and the backuplib unit test suite was completely messed up and will have to be refactored using better methods. WIth these changes, all unit tests pass (541 tests in total).
Hide
Martin Dougiamas added a comment -

Looking fine now, thanks!

Show
Martin Dougiamas added a comment - Looking fine now, thanks!

People

Vote (1)
Watch (8)

Dates

  • Created:
    Updated:
    Resolved: