crowdguru/crowdguru — pull request #8 by kabexnuf (2013-06-23 16:57:22+00:00)
Title: Integrated PhantomJS, Selenium and GhostDriver

## Summary
This makes view(html/javascript) unit testing and end-to-end(acceptance) testing possible. Travis-CI can automatically run these tests as well.

## Details
### Html/javascript unit testing:
- Thanks to PhantomJS and Selenium we can test&verify views by mocking service layers in webapp. This still requires some work to configure services at run-time. Such as creating fake dataset, mocking data services etc.

### End-to-end testing:
- This is done. mvn verify creates webapp war, deploys on the jetty container and runs tests. I've implemented a test checking title of the main page. Travis-CI also supports phantomjs. The beauty is that these tests run automatically after each push in addition to the unit tests.

### Set up:
- PhantomJS must be installed on your environment. See [here](https://github.com/kabexnuf/crowdguru/wiki/Set-up-your-environment).

### How to use:
- One installation completed, configure [ghostdriver.properties](https://github.com/kabexnuf/crowdguru/blob/phantomjs-selenium-integration/webapp/src/test/resources/ghostdriver.properties) so that selenium can communicate with phantomjs via RemoteWebDriver.
- There are many ways to run:

mvn integration-test -> Run tests but build result is not affected
mvn verify -> Run tests and build resut is affected
mvn cargo:run and then go to eclipse and start manually as JUnit test -> Easy to debug