Acceptance testing: Difference between revisions
From MoodleDocs
m (Missing category) |
No edit summary |
||
Line 1: | Line 1: | ||
Moodle uses a framework called Behat to automatically test the user-interface. Tests can be written for each plugin, and for Moodle core. | |||
* To run the existing tests, read [[Running acceptance test]]. You really need to do this first. | |||
* To write new tests, read [[Writing acceptance tests]]. | |||
* To define new steps that can you used when writing tests, see [[Writing new acceptance test step definitions]] | |||
Because Behat tests work through the Moodle user interface, the are a bit slow. Therefore, you should probably also use [[PHPUnit]] to test the detailed edge cases in your code. | |||
[[Category:Behat]] | [[Category:Behat]] |
Revision as of 20:32, 25 April 2019
Moodle uses a framework called Behat to automatically test the user-interface. Tests can be written for each plugin, and for Moodle core.
- To run the existing tests, read Running acceptance test. You really need to do this first.
- To write new tests, read Writing acceptance tests.
- To define new steps that can you used when writing tests, see Writing new acceptance test step definitions
Because Behat tests work through the Moodle user interface, the are a bit slow. Therefore, you should probably also use PHPUnit to test the detailed edge cases in your code.