0

I am working with Selenium tests in python using Nose as a test runner. I run my tests like so

nosetests -a level=gold --with-id --with-xunit

Once tests are done, I usually run

nosetests --failed

So far we have run tests using FireFox and Chrome webdrivers with no issues. It is not uncommon for one or two tests to fail (as our website is undergoes frequent builds, which causes tests to briefly fail), and only these tests are retried.

When I use PhantomJS's Ghostdriver, behavior is similar to Chrome/FF as one or two tests fail. But when I run nosetests --failed ALL tests are rerun, not just the failed ones.

webdriver setup a such:

self.driver = webdriver.PhantomJS(executable_path='C:\\SeleniumTests\\phantomjs.exe')

nosetest.xml on the first pass with phantomjs outputs

<?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="37" errors="1" failures="0" skip="0">

but on the second pass all 37 tests are rerun.

Is this a known issue with Ghostdriver? Or is there some something I am missing?

dbJones
  • 762
  • 1
  • 10
  • 31
  • Did you check the xunit file for differences between the phantomjs and chrome runs? You haven't actually provided any information to go on. You have to dig deeper. But just to be on the safe side this isn't an SSL problem, upgrade PhantomJS from 1.9.7 to 1.9.8 (yes, I saw your recent answer). – Artjom B. Oct 29 '14 at 17:45
  • Good call. I will try the update and have modified my question with more detail. – dbJones Oct 29 '14 at 19:06

0 Answers0