Tests

  1. move /tests/TestingController.php to /web/includes/controllers/TestingController.php
    do not leave this file in controllers folder in productive environment, it causes security issues!
  2. The testfolder has to be placed as a sibling of your webroot folder. (like in git repository or downloaded archive). If you cannot fulfil this then make sure the pathes to sql dumps in TestingController.php match your filesystem.
    \Yii::getAlias('@webroot')."/../tests/02_login/users.sql")
    \Yii::getAlias('@webroot')."/../tests/04_listteams/teams.sql")
  3. Install Selenium IDE for Firefox. (We used Selenium IDE 2.6.0 and Firefox 32.0 under Ubuntu 14.04.1 LTS)
  4. Go to your application page and open Selenium IDE
  5. For testing each suite you have to perform the following steps:
    1. Log off from application
    2. open the suite you want to use (for example /tests/01_register/suite)
    3. Click Actions → Run entire testsuite
  6. move /web/includes/controllers/TestingController.php to /tests/TestingController.php
    do not leave this file in controllers folder in productive environment, it causes security issues!


  7. Issues

    01_register → register_neg_01_mail: We are not sure how to test the html5 email input with selenium. It is possible for testing to change it to a normal textfield.