Setting up the test environment - acli/ATutor GitHub Wiki

This documents setting up the test environment beyond pull request 68.

Choosing a test framework

The first framework I considered was SimpleTest, since that was what I used for 6C01. However, it was not obvious how I could write my tests so that they could be reasonably portable. Other frameworks investigated were Cuke4PHP (which for some reason had to be installed twice to be properly installed), Behat (which kept failing on an obscure PHP error), and PHPSpec.

SimpleTest is the testing framework currently chosen. The decision was solidified after discovering the existence of the include/unit_tests directory which contains two dummy SimpleTest test cases.

Complications

Complications that will need to be solved along the way include the following:

  • Some scenarios will need to be tested with in both “magic_cookie_gpc on” and “magic_cookie_gpc off” modes.
  • Not obvious how to test the web interface, especially given ATutor’s needlessly heavy reliance on Javascript.

Links

⚠️ **GitHub.com Fallback** ⚠️