- Install Java (Selenium requires it)
brew tap caskroom/cask && brew install brew-cask && brew cask install java - Checkout current directory
cd tests/functionaland runnpm install
- Run
npm testto test all scenarios - Run
npm test -- <filename>to test a single feature file, e.g.npm test -- features/challenges.feature - Run
npm run watchto test all scenarios tagged with@watchtag
- Run
npm testto test onlocalmachine (protipster.dev) - Run
HOST=beta npm testto test onbeta - Run
HOST=prod npm testto test onprod
- Install phantomjs
brew install phantomjs - Run
npm run ci(environments supported as well viaHOST=dev|beta|prodprefix) - Screenshots are saved on each failure to
.screenshotsdir (gitignored) - To be run on beta after deploying changes.
- Install Node.js LTS
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -and thensudo apt-get install nodejs - Install Java Headless Runtime
sudo apt-get update && sudo apt-get install openjdk-7-jre-headless - Install phantomjs
sudo npm install -g phantomjs - Install beta / prod functional tests dependencies
sudo su www-data && cd /var/www/beta/current/tests/functional && npm install && cd /var/www/prod/current/tests/functional && npm install - Test with
HOST=prod npm run ci
http://pt-atdd.bitballoon.com/#24_Introduction_video_for_developers
https://chimp.readme.io/docs/tutorial
https://chimp.readme.io/docs/cheat-sheet
- Include as a part of deployment (
npm run ci) - Introduce controller that resets test-users to given state
- E.g. After logging in as incomplete user, filling in profile, uploading avatar, call to
/tests/resetwould revert him back to the initial state
- E.g. After logging in as incomplete user, filling in profile, uploading avatar, call to
- (Optional) Background to specify resolution (e.g. mobile / tablet / desktop)