Note: You are currently viewing documentation for Moodle 3.3. Up-to-date documentation for the latest stable version of Moodle is probably available here: Dataform Tests.

Dataform Tests: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
Line 4: Line 4:


==Acceptance tests==
==Acceptance tests==
Administrator can run Dataform acceptance tests from
===Setup===
See [[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 [[Acceptance_testing#Running_tests]]).


''Administration > Site administration > Plugins > Activity modules > Dataform > Acceptance testing''
Alternately administrator can use the Dataform Acceptance testing interface from


See [[Acceptance testing]] for more information on how to prepare your Moodle installation for acceptance testing. Note that enabling test environment is not recommended for production sites.
Administration > Site administration > Plugins > Activity modules > Dataform > Acceptance testing


The current implementation of the Dataform Acceptance testing interface assumes that a selenium server is running.
for testing particular Dataform features by name or tags.
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.
 
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.


[[File:df-acceptance-testing.png]]
[[File:df-acceptance-testing.png]]
===Adding tests===
See [[Acceptance_testing#Writing_features]] for general test writing guidelines.
===Available steps===
====I add a test dataform====
====I go to manage dataform "TABNAME_STRING"====
====I add a dataform "FIELDTYPE_STRING” field “SETTINGSLIST_STRING>====
====I add a dataform "VIEWTYPE_STRING” view “SETTINGSLIST_STRING>====
====I add a dataform filter "<filter settings>”====

Revision as of 14:14, 28 January 2014


Unit tests

Acceptance tests

Setup

See 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 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.

df-acceptance-testing.png

Adding tests

See Acceptance_testing#Writing_features for general test writing guidelines.

Available steps

I add a test dataform

I go to manage dataform "TABNAME_STRING"

I add a dataform "FIELDTYPE_STRING” field “SETTINGSLIST_STRING>

I add a dataform "VIEWTYPE_STRING” view “SETTINGSLIST_STRING>

I add a dataform filter "<filter settings>”