You are on page 1of 4

Installation instructions for Mac

Install ruby 1.9.3


Ruby can be installed in 2 ways * If you are installing chef, then chef comes with an
embedded ruby. * Make sure the embedded chef is on your Path. <opscode-install-
dir>/chef/embedded/bin needs to be on your Path * If you are not installing chef, then
you need to install ruby 1.9.3 from here
Install bundler
gem install bundler
Install phantomjs
If you do not have Homebrew installed, install it then run:
brew install phantomjs
Install Selenium chrome driver
Chromedriver downloads
Unzip this driver and install it into some directory in your PATH.
Setup the tests
This only needs to be done once
cd <apollo-home-dir>/acceptance/ui
bundle install
Installation instructions for Windows
Install ruby 1.9.3
Ruby can be installed in 2 ways * If you are installing chef, then chef comes with an
embedded ruby which also comes with a devkit. * Make sure the embedded chef is on your
Path. <opscode-install-dir>/chef/embedded/bin needs to be on your Path * If you are
not installing chef, then you need to install ruby 1.9.3 * There have been problems installing
nokogiri with ruby 64 bit on windows. nokogiri version 1.6.2.rc1 which supports ruby 64-bit
has just been released as of April 8th, 2014, but this needs to be tested out. For more
details, please see this and this. To install ruby 32-bit, follow the instructions below. *
Installing ruby 32-bit and ruby DevKit 32-bit on Windows. * Install ruby 1.9.3 32-bit from
here. * Installing ruby DevKit * Download ruby devkit 32-bit from here. The DevKit for ruby
1.9.3 is DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe. * Extract it to a permanent location *
Run ruby dk.rb init from where it has been installed. This generates the cong.yml le in the
directory where the DevKit has been extracted to.
```
cd <rubyDevKit-install-dir>
ruby dk.rb init
```
* Add the ruby installation path to config.yml file. Add a line similar
to below to the config.yml file. The "-" is important.
```
- C:/Ruby32
```
* Run ruby dk.rb install.
```
cd <rubyDevKit-install-dir>
ruby dk.rb install
```
Install bundler
cd <apollo-home-dir>\acceptance\ui
gem install bundler
Install phantomjs
Download phantomjs for windows here and install (unzip) it. Add the phantomjs installation
folder (ex: C:\phantomjs-1.9.1-windows) to your "Path" environment variable
Install Selenium chrome driver
Download Selenium Chrome driver here and install (unzip) it. Add the installation folder (ex:
C:\chromedriver_win32) to your "Path" environment variable.
Setup the tests
This command runs on cmd shell, powershell and cygwin, but doesnt run on MS Git shell
(msysgit bash shell). This only needs to be done once.
On cmd shell and powershell
cd <apollo-home-dir>/acceptance/ui
bundle install
On cygwin
cd <apollo-home-dir>/acceptance/ui
bundle.bat install
Run the tests for all platforms (Mac &
Windows) using rake
This command runs on cmd shell, powershell and cygwin, but doesnt run on MS Git shell
(msysgit bash shell).
On cmd shell and powershell
bundle exec rake CAPYBARA_DRIVER=selenium_chrome VALID_USERID=$$$$$
VALID_PASSWORD=$$$$$
On cygwin
bundle.bat exec rake CAPYBARA_DRIVER=selenium_chrome VALID_USERID=$$$$$
VALID_PASSWORD=$$$$$
Rake Commandline options
VALID_USERID is the userid that will be used to login to apollo. This is required parameter.
VALID_PASSWORD is the password for the userid that will be used to login to apollo. This is
required parameter.
APPLICATION_URL is the host to be tested. This defaults to a local instance running on port
8080.
To set it to a di!erent host
APPLICATION_URL=http://localhost:8890
HEADLESS_GUI determines whether or not this needs to be run in a headless environment
(Typically only required on Linux machines without a display). It is set to false by default.
To enable headless testing with Selenium
HEADLESS_GUI=true
CAPYBARA_DRIVER is the Capybara driver to use. It defaults to selenium_chrome .
To run the tests with poltergeist , add this as a command line option
CAPYBARA_DRIVER=poltergeist
CUCUMBER_PROFILE species the prole the tests should be executed under. Look at
cucmber.yml for the di!erent prole options. It is set to json reports by default.
To output json style reports
CUCUMBER_PROFILE=json_report
To run the tests using gradle
To run the tests on local host
gradle :acceptance:ui:acceptanceTest -Puserid=<userid> -Ppassword=<password>
To run the UI acceptance on a remote instance running a headless environment
gradle :acceptance:ui:acceptanceTest -Puserid=<userid> -Ppassword=<password>
-PapplicationUrl=<remoteUrl> -PheadlessGui=true

You might also like