giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
602 stars 271 forks source link

Missing SeleniumTestCase.php in version 2.0.1? #372

Closed jhnferraris closed 8 years ago

jhnferraris commented 8 years ago

I've upgraded my phpunit composer

 "phpunit/phpunit": "4.2.*",
"phpunit/php-invoker": "*",
"phpunit/dbunit": ">=1.2",
"phpunit/phpunit-selenium": ">=1.2",
"phpunit/phpunit-story": "dev-master",

When I run my phpunit, It complains that include(PHPUnit_Extensions_SeleniumTestCase.php): failed to open stream: No such file or directory.

When I checked with the directories in phpunit-selenium, there is no SeleniumTestCase but Selenium2TestCase

Can anyone confirm? Are there any changes?

giorgiosironi commented 8 years ago

According to semantic versioning, major versions can break compatibility. Take a look at: https://github.com/giorgiosironi/phpunit-selenium and probably use ~1.2 instead.

sitoshma commented 8 years ago

To extend PHPUnit_Extensions_SeleniumTestCase we need to install "phpunit/phpunit-selenium": "~1.2", from composer Did you mean that? I installed "phpunit/phpunit-selenium": ">=1.2" from composer and m not being able to extend seleniumTestCase . It gives me RunTimeException with message 'Invalid response while accessing Seleniumn Server'

jhnferraris commented 8 years ago

@sitoshma What I did was to use version 1.4.2 of phpunit-selenium just so SeleniumTestCase still exists. Since SeleniumTestCase was removed in version 2.0.1.

Closing this..

giorgiosironi commented 8 years ago

Indeed, Selenium 1 is a very old protocol and it's also difficult to make it work with a modern PHPUnit. Therefore you can continue using ~1.4 to stay on the 1.x branch which still has the related class.

sitoshma commented 8 years ago

@giorgiosironi Ok I installed phpunit 4.0.2 phpunit-selenium 1.4.2 Still when i tried to run my script, I get this issue Configuration read from phpunit.xml.dist <-[36;1ms<-[0m ............................., Skipped:1

* phpunit.xml.dist* file

"PHPUNIT_TESTSUITE" value="true"/> "PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_HOST" value="127.0.0.1"/> "PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PORT" value="4444"/> "PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_BROWSER" value="*firefox"/> "PHPUNIT_TESTSUITE_EXTENSION_SELENIUM2_BROWSER" value="firefox"/> "PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_TESTS_URL" value="http://127.0.0.1:8080/"/> "PHPUNIT_TESTSUITE_EXTENSION_SELENIUM_PATH" value="/tmp"/>

Anything I need to do regarding this?