PHP单元在运行时跳过了所有的测试。我正在运行一个开发环境。这里是我的环境:
每次我为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服务器的消息,也没有更改任何内容。还在发帖调查这个问题。
谢谢你的帮忙!
发布于 2012-12-05 04:26:12
RTM在官方的Yii指南中有一个叫功能测试的章节。它的开头是:
在阅读本节之前,建议您阅读Selenium文档。
本章以以下注记结束,左缘有一个大号:
提示:在运行功能测试之前,必须启动Selenium-RC服务器。这可以通过在Selenium服务器安装目录下执行java -jar selenium-server.jar命令来完成。
https://stackoverflow.com/questions/12514731
复制相似问题