1. Download Jasmine standalone: https://github.com/pivotal/jasmine/downloads 2. In your ExtJS project folder create a folder: app-test…
Setup PhantomJS for automate testing
All your Jasmine TDD tests you can automate with PhantomJS.
This blog post will tell you how to setup your environment for automated testing with PhantomJS.
You should have a local webserver running. It it might be handy to have Jasmine already up and go.
Please see my post: http://www.leeboonstra.com/developer/environment/setup-jasmine-tdd-with-for-ext-js/
You can download it for MAC & Windows from: http://phantomjs.org/download.html
- Windows users can run the exe file.
- Mac OSX users can run bin/phantomjs
But make sure you add phantomjs to your paths.
For Mac users, you can also install PhantomJS with homebrew.
To get homebrew you will need to have Ruby installed.
Use the following commands on your terminal:
whoami (it will prompt ur username: for example lee) sudo chown lee:staff /usr/local sudo chmod 0777 /usr/local ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
Now that you have brew on your Mac, you can use the following command to install PhantomJS:
brew update && brew install phantomjs
After everything is installed, you should type the following command in your command/terminal.
When everything is correctly installed it should output you the version number of PhantomJS!