PHPUnit跳过所有测试 [英] PHPUnit skips all tests

查看:169
本文介绍了PHPUnit跳过所有测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I attempt to run PHPUnit, all tests are skipped immediately - there is no error or anything. Can someone point me in the right direction?

[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>

推荐答案

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

I finally found this (searching for "skipped all tests" didn't return this result apparently)

PHPUnit ::获取消息:好的,但是测试不完整或已跳过!没有任何信息发生在哪里

建议我使用phpunit --verbose并为每个测试用例获得以下消息:

Which suggests I use phpunit --verbose and got the following messages for each test case:

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

所以我想这就是我的问题所在.

So I guess that's where my problem lies now.

这篇关于PHPUnit跳过所有测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆