Acceptance testing for the Moodle App
This is only a proposal, MDL-63977, and is not yet available in Moodle. Please contact sam marshall if you have any queries and do not use this information for anything yet!
From Moodle 3.7 if this change is accepted it will be possible to write Behat tests for mobile app features.
Summary
There are now Behat tests for the mobile app. These are used for automated functionality testing of the mobile app.
By default, these do not run as part of a normal Behat run. This page tells you how to run the tests, and how to write them.
A key point is that these tests for some parts of the mobile app (and for its plugins) are included within the Moodle codebase, not within the app codebase, because they are run using the Moodle Behat infrastructure..
Running Behat tests for the mobile app
Set up a mobile app development environment
First you will need to set up a mobile app development environment.
Follow the first part of the instructions on this page:
You need to get as far as the part in section 5 where you open the app in the browser; this is what Behat will do. You don't need to complete the later steps.
- You will need to update this environment periodically, for example when a new version of the mobile app is released. Behat does not do this for you.
- If you need to run tests against multiple versions of the mobile app, you can do this by updating the code in this mobile app workspace and then running the Behat tests again.
Work in progress
I haven't finished writing this page yet