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
marking test as skipped if selenium is not running fails test #94
Comments
You can find a pssible workaround at 1ad9105 |
I had the same problem when I upgraded from 1.2.1 to 1.2.4. When the test suite was started all tests were marked as "S" instantaneously. In my console I saw the following: INFO - Got result: ERROR Server Exception: sessionId led to start new browser session: Browser not supported: Supported browsers include: |
Can you attach a test to replicate the error in 1.2.4? With SeleniumTestCaseTest I get: $ php run-phpunit.php testOpen Tests/SeleniumTestCaseTest.php Configuration read from /home/giorgio/code/phpunit-selenium/phpunit.xml.dist SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS |
Hey there Giorgio -- thanks for the reply :) Excuse my ignorance, but I'm not getting any output when I run the command you referred to above. So I changed directory to the 1.2.4 download package and ran the command:
But there was no output generated. When I ran the test suite the other day after upgrading to 1.2.4, the results were similar to yours where every test returned a result of "S", which to my understanding means "skipped" and not "success". |
I don't think a zip can work as it's missing the git submodules, so PHP is probably swallowing errors due to some setting.
|
Thanks again for the response. Ok, hopefully here's some more useful info. With a combination of PHPUnit 3.6.9 and PHPUnit_Selenium 1.2.4 installed through PEAR I see the following errors when using an xml configuration file to specify host/browser/etc Current URL: OR Server Exception: sessionId led to start new browser session: Browser not supported: Supported browsers include: It appears that in versions newer than 1.2.1 the phpunit->selenium->browser->browser attribute as specified in the XML config file doesn't get read any more (or if it does it loses its value).
If i update all my tests and add the $this->setBrowser("*firefox") within all of the setUp() functions, then the tests work again. However I prefer to specify browser from the XML config file so that I can use the same tests over for different browsers rather than having to maintain duplicate copies of all tests with just the 1 line browser change. Any idea why the browser that is defined via the XML config file is respected in version 1.2.1 and not 1.2.4? |
on further inspection, it seems like the phpunit->selenium->browser->host attribute is also being ignored has something changed in how the XML config file is parsed? |
Actually it's the $browsers static property which was broken in 1.2.4, and is now fixed in master. It appears fixing that fixed also the XML configuration: probably PHPUnit is reading the XML configuration and writing it as static properties or something similar. |
Here's what's happening: |
awesome! so which version of phpunit-selenium should I revert to -- 1.2.1? Do you have an ETA on when 1.2.5 will be available through PEAR? Also do you know of an easy way to install an older version of phpunit-selenium? I've tried pear uninstall phpunit/PHPUnit_Selenium but that doesn't do anything. i've also tried pear install phpunit/PHPUnit_Selenium-1.2.1 but get the following: phpunit/PHPUnit_Selenium is already installed and is newer than detected released version 1.2.1 |
@briantully and now install old one: problem will be solved |
thanks, hnamd, but that didn't work for me. I was still stuck at 1.2.4 However, |
If selenium is not running all Selenium tests should be marked as skipped by SeleniumTestCase->skipWithNoServerRunning(). This works but SeleniumTestCase->onNotSuccessfulTest() calls getLocation() of the driver which throws a RuntimeException because curl fails. This exception is not caught properly and fails all selenium tests.
The text was updated successfully, but these errors were encountered: