Behat Vagrant install and local testing
You can see the video here
This is a fork of Steve Power's work https://github.com/appnosteev
The goal here is to enable you to work locally in either Windows, Mac, Linux but using behat in an environment we can offer support in. After you are done with this install you will
- Have a working Vagrant install with behat working
- A website with the Behat Editor and integrated Report system
- Integration with Github so you can synchronize your work via the BehatEditor GUI
- Ability to trigger your Desktops browser from tests running in the Vagrant VM vai the website or command line.
Download and install Virtualbox
See the help info here https://www.virtualbox.org/
Download and install Vagrant
See the help here http://docs.vagrantup.com/v2/installation/index.html
You just need to get it installed so the executable works. The next steps will setup the VM
Download the Git Repo to a directory you will keep it in.
We will use this repo for now
So go to the command line and type
then go into that folder
cd into that behat-vagrant directory
After you are in there type
And wait for about 5 minutes or so for it to build. It may ask you for a system password along the way.
Then update your host file for the new IP as seen in these docs
Linux and Mac
sudo vim /etc/hosts
For any of these your IP will be
Once done you can visit the site http://drupal.vbox.local BUT still a few more steps.
Setting up your behat.yml file
Get your machines IP address
Then Edit your behat.yml file found in the folder you setup your Vagrant install
This file will assist you in running your local tests. Just find the file here
Then edit that file and add the lines seen here https://gist.github.com/alnutile/9273691 in the behat_after.yml
Set that IP to your IP and set the browser to firefox or safari or chrome as needed.
Finally run the Selenium Server on your machine (not the vagrant box)
Download and run by typing this in the folder you downloaded it to
java -jar selenium-server-standalone-2.39.0.jar
Now it will run in the background.
So now you can visit the website and run a test (not in Saucelabs yet)
Go to the URL http://drupal.vbox.local
log in admin/admin
Click Add and for now just click
to fill in a default wikipedia test. Then click “Run Test” and a new window should pop up on your computer for Firefox or Safari running the test. That is it!
comments powered by Disqus