PHPUnit会跳过所有测试

时间:2013-11-21 03:40:23

标签: phpunit

当我尝试运行PHPUnit时,会立即跳过所有测试 - 没有错误或任何错误。有人能指出我正确的方向吗?

[vagrant@vagrant selenium]$ phpunit .
PHPUnit 3.7.28 by Sebastian Bergmann.

Configuration read from /applications/selenium/phpunit.xml

SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

Time: 61 ms, Memory: 5.50Mb

OK, but incomplete or skipped tests!
Tests: 47, Assertions: 0, Skipped: 50.

我的phpunit.xml

<?xml version="1.0" encoding="UTF-8"?>
<phpunit
    colors="true"
    stopOnFailure="false"
    backupGlobals="false"
    bootstrap="bootstrap.php">
    <php>
        <const name="BASE_URL" value="http://localhost" />
        <const name="SCREENSHOT_PATH" value="/tmp/selenium" />
        <const name="SCREENSHOT_URL" value="http://localhost/screenshots" />
        <const name="COVERAGE_URL" value="http://localhost/remote/codeCoverage" />
    </php>
    <selenium>
        <browser browser="*firefox"/>
    </selenium>
</phpunit>

1 个答案:

答案 0 :(得分:4)

我终于找到了这个(搜索“跳过所有测试”并没有显然返回这个结果)

PHPUnit :: get message: OK, but incomplete or skipped tests! without any information where is happen

这表明我使用phpunit --verbose并为每个测试用例收到以下消息:

Could not connect to the Selenium Server on localhost:4444.

所以我猜这就是我现在的问题所在。