- 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/tranining
and 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/training
and runbehat
3 tests should pass. One of them should fail.
Play with the behat command:
behat --suite default
to run integration tests onlybehat --suite api
to run API tests onlybehat --suite ui
to run UI tests onlybehat --suite ui features/ui/LatestMovies.feature
to run that feature only
- You can use phpMyAdmin at http://phpmyadmin.dev/