PHPUnit_Framework_Exception:无法连接到Selenium RC服务器

时间:2011-12-20 07:45:21

标签: selenium terminal phpunit yii command-line-interface

我使用PHPUnit和Selenium Server来测试Yii应用程序,但每当我尝试它时总是给我这个错误。

这是我终端上的代码

GusDeCooL:tests budiarsana$ phpunit functional/SiteTest.php
PHPUnit 3.5.15 by Sebastian Bergmann.

EEE

Time: 04:31, Memory: 8.50Mb

There were 3 errors:

1) SiteTest::testIndex
PHPUnit_Framework_Exception: Could not connect to the Selenium RC server.

/Users/budiarsana/host/yii/1.1.8/test/CWebTestCase.php:61

2) SiteTest::testContact
PHPUnit_Framework_Exception: Could not connect to the Selenium RC server.

/Users/budiarsana/host/yii/1.1.8/test/CWebTestCase.php:61

3) SiteTest::testLoginLogout
PHPUnit_Framework_Exception: Could not connect to the Selenium RC server.

/Users/budiarsana/host/yii/1.1.8/test/CWebTestCase.php:61

FAILURES!
Tests: 3, Assertions: 0, Errors: 3.

怎么会发生这种情况?
硒是我的firefox打开,但在我的Firefox上发生了不应该,我得到了这个错误。 我尝试使用PHPUnit仅使用NetBeans IDE测试一些代码,它正常工作(测试没有使用Selenium)

如果有任何信息需要我的问题清楚,请告知。

工作站:
MAC OSX LION 10.7.2
PHP版本5.2.17
Sebastian Bergmann的PHPUnit 3.5.15。

1 个答案:

答案 0 :(得分:-1)

问题解决了,我更新了我的Selenium Server并且它正常工作。