Dataform Tests: Difference between revisions
- Overview
- Activity administration
- Building an activity
- CSS tips and tricks
- JS tips and tricks
- Activating RSS
- Activity workflow
- Grading
No edit summary |
|||
Line 23: | Line 23: | ||
====I add a test dataform==== | ====I add a test dataform==== | ||
====I go to manage dataform "TABNAME_STRING"==== | ====I go to manage dataform "TABNAME_STRING"==== | ||
====I add a dataform "FIELDTYPE_STRING" | ====I add a dataform field "FIELDTYPE_STRING" with "SETTINGSLIST_STRING"==== | ||
====I add a dataform "VIEWTYPE_STRING" | ====I add a dataform view "VIEWTYPE_STRING" with "SETTINGSLIST_STRING"==== | ||
====I add a dataform filter "SETTINGSLIST_STRING"==== | ====I add a dataform filter with "SETTINGSLIST_STRING"==== |
Revision as of 15:53, 28 January 2014
Unit tests
Acceptance tests
Setup
See https://docs.moodle.org/dev/Acceptance_testing for information about preparing your Moodle installation for acceptance testing. Note that this is not recommended for production sites.
Running the tests
Administrator can run Dataform acceptance tests with the Moodle behat command line tool (see https://docs.moodle.org/dev/Acceptance_testing#Running_tests).
Alternately administrator can use the Dataform Acceptance testing interface from
Administration > Site administration > Plugins > Activity modules > Dataform > Acceptance testing
for testing particular Dataform features by name or tags.
The current implementation of the Dataform Acceptance testing interface assumes that a selenium server is running. To run a test, select a feature or tags and click 'Run tests'. The page will hang until the tests are completed. If you run long tests it may be better to run them from a command line.
Adding tests
See https://docs.moodle.org/dev/Acceptance_testing#Writing_features for general test writing guidelines.