- Clone this project https://github.com/cotterpl/BehatTraining
- Install VirtualBox (if you don't have one already)
- Download Linux Image from https://drive.google.com/open?id=0BwLw7ZcvI2O3OVEwOWhwNVltbk0
- Add Linux image to VirtualBox
- Set up shared folder in VirtualBox:
- name it ‘BehatTraining’ (see
shared_folder.png) - it should be pointing to the main directory of the project (the directory this file is in)
- name it ‘BehatTraining’ (see
- Run Ubuntu image (guest system)
- login: behat, password: behatpass
-
Check if your folder is shared (
cd /var/www/training & ls)- If not try running
~/mountBehatTraining.sh - If it does not help check VirtualBox settings for shared folder and restart
- If not try running
-
cd /var/www/traniningand run./build.sh. It will install composer and run it. -
Run browser and go to http://behat-training.dev/ – application should show
-
In a separate terminal window run
selenium-server-standalone. Leave it running. It is required for UI testing.
cd /var/www/trainingand runbehat3 tests should pass. One of them should fail.
Play with the behat command:
behat --suite defaultto run integration tests onlybehat --suite apito run API tests onlybehat --suite uito run UI tests onlybehat --suite ui features/ui/LatestMovies.featureto run that feature only
- You can use phpMyAdmin at http://phpmyadmin.dev/