Reputation: 12394
I just installed the PHPUnit Selenium extensions through "pear install phpunit/PHPUnit_Selenium". The system is currently still using PHP 5.2 so I've got to use PHPUnit_Extension_SeleniumTestCase rather than PHPUnit_Extension_Selenium2TestCase. I've been trying to run the basic test given in the PHPUnit documentation:
<?php
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser('firefox');
$this->setBrowserUrl('http://www.example.com/');
}
public function testTitle()
{
$this->url('http://www.example.com/');
$this->assertEquals('Example WWW Page', $this->title());
}
}
?>
However, test results in the test being skipped due to:
1) WebTest::testTitle
Could not connect to the Selenium Server on localhost:4444.
Z:\applications\xampplite\php\phpunit:46
Anyone have any suggestions as to why I might be running into this problem? Thank you much!
Upvotes: 0
Views: 930
Reputation: 12394
The solution was a silly one. I didn't have the Selenium server up and running. If you have the same problem just make sure to download the server from the Selenium download page and then just start the jar before attempting the test.
Upvotes: 1