【发布时间】:2012-09-12 22:38:56
【问题描述】:
PHP 单元在运行时跳过了所有的测试。我正在运行一个开发环境。这是我的环境:
- Windows 7 专业版 64 位
- Apache 2.4
- PHP 5.4.4
- PHPUnit 3.7.0
- 硒 1.2.8
- Yii 1.1.10
每次我为 Yii 运行功能(或任何测试)时,我都会得到以下输出。
C:\xampp\htdocs\mm\protected\tests>phpunit --verbose functional
PHPUnit 3.7.0 by Sebastian Bergmann.
Configuration read from C:\xampp\htdocs\mm\protected\tests\phpunit.xml
SSSSSS
Time: 12 seconds, Memory: 3.50Mb
There were 6 skipped tests:
1) SiteTest::testIndex
Could not connect to the Selenium Server on localhost:4444.
C:\xampp\php\phpunit:46
2) SiteTest::testContact
Could not connect to the Selenium Server on localhost:4444.
C:\xampp\php\phpunit:46
3) SiteTest::testLoginLogout
Could not connect to the Selenium Server on localhost:4444.
C:\xampp\php\phpunit:46
4) SiteTest::testIndex
Could not connect to the Selenium Server on localhost:4444.
C:\xampp\php\phpunit:46
5) SiteTest::testContact
Could not connect to the Selenium Server on localhost:4444.
C:\xampp\php\phpunit:46
6) SiteTest::testLoginLogout
Could not connect to the Selenium Server on localhost:4444.
C:\xampp\php\phpunit:46
OK, but incomplete or skipped tests!
Tests: 6, Assertions: 0, Skipped: 6.
C:\xampp\htdocs\mm\protected\tests>
注意:之前从未收到无法连接到 Selenium 服务器的消息,也没有改变任何事情。仍在发布此问题并进行调查。
感谢您的帮助!
【问题讨论】:
-
Selenium JAR 还在运行吗?它在本地主机上吗?
-
如何验证 selenium 是否正在运行?我之前用 PEAR 安装过...
-
你需要一个 selenium 服务器,它独立于 PHP 库:seleniumhq.org/docs/03_webdriver.html