-
Notifications
You must be signed in to change notification settings - Fork 4
The Winery
##Ingredients (components) The below components make this tool functional. This repository is powered by:
curl http://getcomposer.org/installer | php
php composer.phar install
Or you may need to just update to install thhe dependancies listed in composer.json
via:
php composer.phar update
wget http://pear.php.net/go-pear.phar
php go-pear.phar
pear channel-discover pear.phpunit.de
pear channel-discover components.ez.no
pear channel-discover pear.symfony-project.com
pear install phpunit/PHPUnit
##Getting tipsy (local setup)
Make sure you have Safari
, Internet Explorer
, Chrome
& Firefox
downloaded on the machines used for testing, respectively.
Open Terminal, then navigate to the project directory:
cd ~/path/to/saucey/
By default Selenium starts with default:
java -jar vendor/saucey/drivers/selenium-server-standalone-2.45.0.jar
Open a new window/tab, then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: chrome
Start Selenium with the chromeDriver as a parameter:
java -jar vendor/saucey/drivers/selenium-server-standalone-2.45.0.jar -Dwebdriver.chrome.driver=vendor/saucey/drivers/chromedriver
Open a new window/tab, then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: safari
####Requirements
- Download this plugin.
- Install the developers certificate in your "Keychain"
- Open Safari
- Go to Preferences
- Click on the Extensions tab
- Make sure WebDriver for WebDriver 2.38.0 is checked "enabled"
- Close Safari
Start Selenium with the safariDriver as a parameter:
java -jar vendor/saucey/drivers/selenium-server-standalone-2.45.0.jar -Dwebdriver.safari.noinstall=true
Open a new window/tab, then:
vendor/bin/behat
If you're on a Virtual Machine, there are a couple of things needed to get behat running. Make sure you have Internet Explorer
, Chrome
& Firefox
downloaded on your machine or virtual machine.
- Visual C++ 2008 Redistributables
- WAMP
- Add java to your PATH via steps
- Similar to the above step, add PHP to your PATH
C:\wamp\bin\php\php5.5.12;
- Depending on your Internet Explorer settings, you may need to Enable Protection Mode
Open Command Prompt, then navigate to the project directory:
cd path\to\saucey
Start Selenium with the ieDriver as a parameter:
java -jar vendor\saucey\drivers\selenium-server-standalone-2.45.0.jar -Dwebdriver.ie.driver=vendors\saucey\drivers\IEDriverServer.exe
Open a new window/tab, then:
vendor\bin\behat
In behat.yml
, from the root of the project directory.
Then change:
selenium2:
browser: ie
To:
selenium2:
browser: firefox
Start Selenium:
java -jar vendor\saucey\drivers\selenium-server-standalone-2.45.0.jar
Open a new window/tab, then:
vendor\bin\behat
###Chrome
In behat.yml
, from the root of the project directory.
Then change:
selenium2:
browser: ie
To:
selenium2:
browser: chrome
Start Selenium with the firefoxDriver (default) as a parameter:
java -jar vendor\saucey\drivers/\elenium-server-standalone-2.45.0.jar -Dwebdriver.chrome.driver=vendors\saucey\drivers\chromedriver.exe
Open a new window/tab, then:
vendor\bin\behat
#Getting drunk (cloud setup) Find additional information on drivers here.
To point saucey to SauceLabs, you'd need your user_name
and access_key
.
After registering for a free SauceLabs account:
-
Get your username and api-key, should be available via /account. Copy the info into your clipboard.
-
Open the
behat.yml
file with your favorite IDE and replace all instances ofusername:api-key
with your username (used to log in) and api-key. Save. -
To test something on a localhost in the cloud, you can open a tunnel with sauce connect. With your username and api-key/access_key from the steps above, run:
vendor/bin/sauce_config user_name access_key
To start the connect tunnel:
vendor/sauce/connect/bin/sauce_connect
In behat.yml
, from the root of the project directory.
selenium2:
browser: firefox
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "OS X 10.8", "version": "8", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: chrome
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "OS X 10.8", "version": "8", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
In Terminal or Finder open behat.yml
in the root of the project directory.
selenium2:
browser: safari
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "OS X 10.8", "version": "8", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
##Windows Simulating
In behat.yml
, from the root of the project directory.
selenium2:
browser: ie
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "Windows 7", "version": "8", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: firefox
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "Windows 2012", "version": "10", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: chrome
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "Windows 7", "version": "39", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: iPad
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "OS X 10.9", "version": "8.1", "name": "NAME THIS SUITE"}
Additionally, you can add "deviceOrientation": "landscape",
or portrait
to test orientation.
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: iPhone
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "OS X 10.9", "version": "8.1", "name": "NAME THIS SUITE"}
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: android
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "Linux", "version": "4.4", "name": "NAME THIS SUITE", "deviceType": "phone"}
Then:
vendor/bin/behat
In behat.yml
, from the root of the project directory.
selenium2:
browser: android
wd_host: user_name:[email protected]/wd/hub
capabilities: { "platform": "Linux", "version": "4.4", "name": "NAME THIS SUITE", "deviceType": "tablet"}
Additionally, you can add "deviceOrientation": "landscape",
or portrait
to test orientation.
Then:
vendor/bin/behat