Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium VM: run.py lacks permissions to write out results html #27

Open
jaredhirsch opened this issue Aug 20, 2012 · 1 comment
Open
Assignees
Labels

Comments

@jaredhirsch
Copy link
Collaborator

Ozten's traceback from emailed bug report:

it looks good through a couple screens then when it goes to write to disk it dies.
I'm running as the user 'vagrant'.

This is the output from when it fails:
collecting ... collected 1 items
.bid_selenium)vagrant@selenium:~/mozilla-browserid-b1c9cca/automation-tests$ ./run.py 2>&1 > ~/run_py_output.txt
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/lib/python2.7/site-packages/py/test.py", line 4, in
sys.exit(pytest.main())
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 469, in main
exitstatus = config.hook.pytest_cmdline_main(config=config)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 421, in call
return self._docall(methods, kwargs)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 432, in _docall
res = mc.execute()
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 350, in execute
res = method(**kwargs)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/main.py", line 100, in pytest_cmdline_main
return wrap_session(config, _main)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/main.py", line 92, in wrap_session
exitstatus=session.exitstatus or (session._testsfailed and 1))
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 421, in call
return self._docall(methods, kwargs)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 432, in _docall
res = mc.execute()
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 350, in execute
res = method(**kwargs)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/terminal.py", line 314, in pytest_sessionfinish
multicall.execute()
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/_pytest/core.py", line 350, in execute
res = method(**kwargs)
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/local/lib/python2.7/site-packages/pytest_mozwebqa/html_report.py", line 181, in pytest_sessionfinish
logfile = py.std.codecs.open(self.logfile, 'w', encoding='utf-8')
File "/home/vagrant/mozilla-browserid-b1c9cca/automation-tests/bid_selenium/lib/python2.7/codecs.py", line 881, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: 'results/index.html'

@ghost ghost assigned jaredhirsch Aug 20, 2012
@ozten
Copy link
Owner

ozten commented Aug 22, 2012

I was able to run the tests by staying in vagrants's home directory.

I now am running into issues with Selenium's firefox not trusting the SSL cert.

Steps To Reproduce

  1. Launch a terminal window from the Selenium VM GUI

  2. Do the following:

. /home/vagrant/mozilla-browserid-*/automation-tests/bid_selenium/bin/activate
python -m py.test --destructive --baseurl=http://localhost:8765 --driver=firefox -q /home/vagrant/mozilla-browserid-*/automation-tests/123done/

Expected

Firefox launches and works through the various pages. Tests are green

Actual

123done.org fails render the login button. If you play with Firefox, you'll see it doesn't trust webhead.intcluster.mozilla.com.

Attempted fix - The self-signed cert is for webhead.intcluster.mozilla.com. I also created new certs for *.webhead.intcluster.mozilla.com. This didn't work either.

It's possible that giving selenium -firefoxProfileTemplate=~/.mozilla/firefox/10lsdfjk.default/ would fix the problem, but I don't know how to pass that into the py.test module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants