Frontend unit tests done correctly with QUnit and CasperJS
QUnit for unit testing
CasperJS over PhantomJS for functional testing
1. Download appropriate software (links are for Windows)
* Python 3.4.2 64-bit or get the latest;
* PhantomJS 1.9.8 or get the latest;
* CasperJS 1.0.3 the stable release of 1.0.3 does not work with their examples; it will give you the error : TypeError 'undefined' is not a function evaluating 'casper.test.begin'.
* CasperJS latest BETA;
2. Install python
* Just run the install
* Add this to your PATH C:\Python34;C:\Python34\Scripts (assuming Python got installed in C:\Python34
3. Install PhantomJS
* extract it to C:\phantomjs
* add to PATH C:\phantomjs
or I just copy/paste phantomjs.exe to C:\Tools which is already on my PATH (if you want to do the same add C:\Tools to your PATH)
4. Install CasperJS
* extract all files to C:\casperjs (The directory in the .zip is not good)
* add to PATH C:\casperjs\bin (Note: C:\casperjs\bin is good for versions v1.1 and above. For older versions 1.0.X you need C:\casperjs\batchbin)
* The official documentation is at http://docs.casperjs.org/en/latest/installation.html#casperjs-on-windows
Recent Comments