Note:

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

Moodle Mobile 2 (Ionic 1) End To End Testing

From MoodleDocs
Revision as of 14:46, 24 May 2016 by Juan Leyva (talk | contribs)

Protractor is an end-to-end test framework for AngularJS applications. Protractor runs tests against your application running in a real browser, interacting with it as a user would.

Setting-up testing environment

This currently only covers testing on Android 4.4 onwards and Chrome. iOS testing is a work in progress.

  • Head to the root directory of your MM instance.
  • Install the packages required for testing
    • npm install (do not use the -g option)
  • Install the Chrome webdriver
    • ./node_modules/protractor/bin/webdriver-manager update
  • Make sure your checkout is up to date, all the cordova plugins are installed and the android platform is set-up. The following should be enough.
    • gulp
    • ionic state restore
    • ionic build android

Once this is done, you will need to generate a protactor configuration file for the platform you intend to test the app on.