Merge "Add phantomJS as supported browser"

This commit is contained in:
Jenkins 2014-04-23 19:14:08 +00:00 committed by Gerrit Code Review
commit 387d2e931e
4 changed files with 14 additions and 6 deletions

View File

@ -13,12 +13,15 @@ Steps to set up a virtual machine for running fuelweb selenium tests:
* Install “postgresql” and “pip”, setup python virtual environement and install python packages. Follow instructions at https://github.com/stackforge/fuel-web/blob/master/docs/develop/env.rst#setup-for-nailgun-unit-tests Steps #2 - #5.
* Install NodeJS. Follow instructions in step #1 at https://github.com/stackforge/fuel-web/blob/master/docs/develop/env.rst#setup-for-web-ui-tests.
* Try to run fuel-web in fake-ui mode. Follow steps #1 - #3 at https://github.com/stackforge/fuel-web/blob/master/docs/develop/env.rst#running-nailgun-in-fake-mode . Try to navigate to http://localhost:8000
* Install Chrome web browser.
* Install next browsers.
* Chrome
* Firefox
* PhantomJS
* Download latest version of Chrome driver from http://chromedriver.storage.googleapis.com/index.html and extract it to home folder at the VM
* “git clone https://github.com/Mirantis/fuelweb-test.git” Checkout a stable branch
* “git clone https://github.com/stackforge/fuel-main”
* activate fuel virtual environment “workon fuel”
* install pip packages “pip install -r fuelweb-test/requirements.txt“
* Try to run selenium tests (fake-ui should be launched).
* workon fuel
* export PYTHONPATH=$PYTHONPATH:[path to /fuel-web/nailgun]
* nosetests fuelweb-test.tests
* nosetests fuelweb-test.tests

View File

@ -29,6 +29,9 @@ def start_driver(browser=None):
executable_path=CHROME_EXECUTABLE_PATH,
desired_capabilities=DesiredCapabilities.CHROME)
def start_phantom():
return webdriver.PhantomJS()
global driver
if browser == "iexplore":
driver = start_iexplore()
@ -38,6 +41,8 @@ def start_driver(browser=None):
driver = start_firefox()
elif browser == "headless":
driver = start_headless()
elif browser == "phantom":
driver = start_phantom()
# driver.set_window_size(1024, 768)
driver.maximize_window()

View File

@ -1,2 +1,2 @@
selenium
pyvirtualdisplay
pyvirtualdisplay

View File

@ -15,7 +15,7 @@ FOLDER_SCREEN_CURRENT = os.environ.get(
'FOLDER_SCREEN_CURRENT', '/home/nfedotov/testscreens/current')
OPENSTACK_RELEASE_CENTOS = os.environ.get(
'OPENSTACK_RELEASE_CENTOS', 'Havana on CentOS 6.4 (2013.2.2)')
'OPENSTACK_RELEASE_CENTOS', 'Havana on CentOS 6.5 (2013.2.2)')
OPENSTACK_RELEASE_REDHAT = os.environ.get(
'OPENSTACK_RELEASE_REDHAT', 'RHOS 3.0 for RHEL 6.4 (2013.2.2)')
OPENSTACK_RELEASE_UBUNTU = os.environ.get(
@ -34,6 +34,6 @@ OPENSTACK_UBUNTU = openstack_name(OPENSTACK_RELEASE_UBUNTU)
NAILGUN_FIXTURES = os.environ.get('NAILGUN_FIXTURES', '')
URL_HOME = os.environ.get('URL_HOME', 'http://localhost:8000/')
URL_HOME = os.environ.get('URL_HOME', 'http://localhost:5544/')
SELENIUM_IMPLICIT_WAIT = os.environ.get('SELENIUM_IMPLICIT_WAIT', 10)