Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Acceptance testing: Difference between revisions

From MoodleDocs
m (Missing category)
(ja link)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page is a starting point for working with acceptance tests (behat tests). These tests are suited if you want to test the front-end and with that the behaviour of your site / your plugin / your code.
Moodle uses a framework called Behat to automatically test the user-interface. Tests can be written for each plugin, and for Moodle core.


If you want to write your own tests have a look at: [[Writing acceptance tests]]
* 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]]


If you want to run behat tests of the existing suite or the ones you have written for your own plugin please visit: [[Running acceptance test]]
Because Behat tests work through the Moodle user interface, they are a bit slow. Therefore, you should probably also use [[PHPUnit]] to test the detailed edge cases in your code.


[[Category:Behat]]
[[Category:Behat]]
[[ja:受け入れテスト]]

Revision as of 15:02, 22 February 2022

Moodle uses a framework called Behat to automatically test the user-interface. Tests can be written for each plugin, and for Moodle core.

Because Behat tests work through the Moodle user interface, they are a bit slow. Therefore, you should probably also use PHPUnit to test the detailed edge cases in your code.