Hello Sir

          I wrote test cases which in selenium and execute that test local 
machine which is properly executed. Then setup Jenkins.In Jenkins I 
executed test cases.
I write following script in Jenkins shell

PYENV_HOME=$WORKSPACE/.pyenv/
# Delete previously built virtualenv
if [ -d $PYENV_HOME ]; then
    rm -rf $PYENV_HOME
fi

virtualenv --no-site-packages $PYENV_HOME
. $PYENV_HOME/bin/activate


pip install -r /home/smita/Code/mphoriacatalog/requirements.txt
python 
/home/smita/Code/mphoriacatalog/test/selenium/test_login_with_email.py

save that script and create build got following error

Successfully installed bitly-api CouchDB Django Fabric Mako MarkupSafe 
distribute gunicorn meld3 pycrypto python-memcached simplejson ssh supervisor 
boto postmonkey selenium pil sorl-thumbnail slugify requests
Cleaning up...
+ python /home/smita/Code/mphoriacatalog/test/selenium/test_login_with_email.py

E
======================================================================
ERROR: test_new (__main__.Newtest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/home/smita/Code/mphoriacatalog/test/selenium/test_login_with_email.py", line 
11, in setUp
    self.driver = webdriver.Firefox()
  File 
"/var/lib/jenkins/workspace/mphoriacatlog/default/.pyenv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py",
 line 51, in __init__
    self.binary, timeout),
  File 
"/var/lib/jenkins/workspace/mphoriacatlog/default/.pyenv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py",
 line 47, in __init__
    self.binary.launch_browser(self.profile)
  File 
"/var/lib/jenkins/workspace/mphoriacatlog/default/.pyenv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py",
 line 44, in launch_browser
    self._wait_until_connectable()
  File 
"/var/lib/jenkins/workspace/mphoriacatlog/default/.pyenv/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py",
 line 81, in _wait_until_connectable
    self._get_firefox_output())
WebDriverException: Message: 'The browser appears to have exited before we 
could connect. The output was: Error: cannot open display: :99\n' 

----------------------------------------------------------------------
Ran 1 test in 1.444s

FAILED (errors=1)
Build step 'Execute shell' marked build as failure
Finished: FAILURE

What should I do solve that error.

Please help



 


Reply via email to