【问题标题】:Reports PHPUnit ZendFramework报告 PHPUnit ZendFramework
【发布时间】:2011-11-23 21:37:38
【问题描述】:

我正在使用 netbeans 使用 zendframework 运行 phpunit 测试,但没有生成报告。该文件夹已创建,但没有报告。

我的直接结构:

-application
--models
--modules
-library
-log
--report
-bootstrap.php
-phpunit.xml

phpunit.xml

<phpunit bootstrap="./bootstrap.php">
<testsuite name="Application Test Suite">
    <directory>./application</directory>
</testsuite>
<testsuite name="Library Test Suite">
    <directory>./library</directory>
</testsuite>

<filter>
    <!-- If Zend Framework is inside your project's library, uncomment this filter -->
    <!-- 
    <whitelist>
        <directory suffix=".php">../../library/Zend</directory>
    </whitelist>
    -->
</filter>

<logging>
    <log type="coverage-html" target="./log/report" charset="UTF-8" yui="true" highlight = "true" lowUpperBound="50" highLowerBound="80" />
    <log type="testdox" target="./log/testdox.html" />
</logging>

测试运行正常,但我应该如何配置我的 phpunit.xml 以生成报告?

我的 PHPUnit 版本是 3.5.15

【问题讨论】:

  • phpunit的所有依赖都安装了吗?
  • 您要查询哪些报告? 代码覆盖率报告?

标签: php unit-testing zend-framework netbeans phpunit


【解决方案1】:

我也遇到过这个问题,如果我没记错的话,它与 xdebug(或类似的)没有运行有关 - 但在我的情况下,命令行工具抛出了一些错误。

【讨论】:

    【解决方案2】:

    我想通了,我尝试从终端运行。它抛出了内存异常,我增加了 php 内存限制,现在可以正常工作了。

    【讨论】:

      猜你喜欢
      • 2011-01-08
      • 2012-04-24
      • 2014-05-12
      • 2020-10-19
      • 2013-06-19
      • 2016-10-24
      • 1970-01-01
      • 2019-04-24
      • 2014-04-16
      相关资源
      最近更新 更多