PHP單元在運行時跳過所有測試。我正在運行一個開發環境。下面是我的環境:PHPUnit繼續跳過測試 - Win7-64,XAMPP,Yii
- 的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仍在運行?它在本地主機上嗎? – ernie
如何驗證硒是否在運行?我之前安裝了PEAR ... – CGSmith105
您需要一個硒服務器,它與PHP庫分開:http://seleniumhq.org/docs/03_webdriver.html – ernie