Converting UI tests to JavaScript will confer many benefits including:
- Clearer test output (& no travis timing issues).
- Faster tests (we can setup just once for all tests & don't have to execute phantomjs multiple times).
- Clearer test code (via Jasmine's BDD style output).
Steps to complete:
Move all of test environment setup to Fixture class. (done in uiunittests branch)
Extend mocha & chai to handle screenshot compare use-case.
Create JS script that will run a PHP program to setup the database and run each UI test suite.
Modify existing UI tests.
Modify travis config to run via phantomjs.
Reason for using Jasmine: phantomjs uses Jasmine internally for its tests so we know it'll work. mocha + chai can be used as an alternative.
CC-ing tsteur as per matt's request.
Update: Using mocha + chai is actually easier to get running and easier to extend.
Converting UI tests to JavaScript will confer many benefits including:
Steps to complete:
Move all of test environment setup to Fixture class.(done in uiunittests branch)Extend mocha & chai to handle screenshot compare use-case.Create JS script that will run a PHP program to setup the database and run each UI test suite.Modify existing UI tests.Modify travis config to run via phantomjs.Reason for using Jasmine: phantomjs uses Jasmine internally for its tests so we know it'll work. mocha + chai can be used as an alternative.
CC-ing tsteur as per matt's request.
Update: Using mocha + chai is actually easier to get running and easier to extend.