Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

Unit tests: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
Cap resum de modificació
Línia 1: Línia 1:
administration > reports> Unit tests
administration > reports> Unit tests


The Unit Test report(s)purpose is to evaluate the individual parts of a program (functions, and methods of classes) to make sure that each element individually does the right thing.  
The Unit Test report is a tool for developers to let them automatically test various parts of the Moodle code.


Developers have added specific tests which are used in this report.
You are advised 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 date 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.


==Filters for report==
==Filters for report==
[[Image:Reports_Unit_Tests_1.jpg]]
[[Image:Reports_Unit_Tests_1.jpg]]


==Example report==
==Example report==
[[Image:Reports Site Unit Test Example 1.jpg|thumb|center|500px|Example of unit test]]
[[Image:Reports Site Unit Test Example 1.jpg|thumb|center|500px|Example of unit test]]


==See also==
==See also==
[[Development:Unit tests]]


[[Site reports]]
* [[Development:Unit tests]]
* [[Site reports]]

Revisió del 11:26, 16 nov 2009

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 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:

  1. The tests involve a lot of processing, and so will slow down your Moodle for all your other users for a while.
  2. 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 date 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.

Filters for report

Reports Unit Tests 1.jpg

Example report

Example of unit test

See also