Unit tests: Difference between revisions
From MoodleDocs
(assume advised NOT to , Thx Tim.) |
mNo edit summary |
||
Line 5: | Line 5: | ||
You are advised not to run the unit tests on a production site (unless you are sure you know what you are doing). There are two main reasons for this recommendation: | You are advised not to run the unit tests on a production site (unless you are sure you know what you are doing). There are two main reasons for this recommendation: | ||
# The tests involve a lot of processing, and so will slow down your Moodle for all your other users for a while. | # The tests involve a lot of processing, and so will slow down your Moodle for all your other users for a while. | ||
# Some of the tests involve adding and deleting data from the database. This should be done in a reversible way, but if there is a bug in the test code, it might damage the real | # Some of the tests involve adding and deleting data from the database. This should be done in a reversible way, but if there is a bug in the test code, it might damage the real data in the database. | ||
On the other hand, if you are doing development, then running the tests on your development server is strongly encouraged, as is writing new tests. | On the other hand, if you are doing development, then running the tests on your development server is strongly encouraged, as is writing new tests. |
Revision as of 08:23, 10 August 2011
administration > reports> Unit tests
The Unit Test report is a tool for developers to let them automatically test various parts of the Moodle code.
You are advised not to run the unit tests on a production site (unless you are sure you know what you are doing). There are two main reasons for this recommendation:
- The tests involve a lot of processing, and so will slow down your Moodle for all your other users for a while.
- Some of the tests involve adding and deleting data from the database. This should be done in a reversible way, but if there is a bug in the test code, it might damage the real data in the database.
On the other hand, if you are doing development, then running the tests on your development server is strongly encouraged, as is writing new tests.