PHPUnit覆盖率报告不断返回示例内容

我们目前正在使用PHPUnit(由Sebastian bergmann和贡献者共同编写的PHPUnit 7.1.5和7.4.5 )对代码进行单元测试。我们已经完成了多个测试套件,并希望生成一份覆盖率报告。

我可以按预期正常运行测试。现在,启用xdebug和coverage-html标志后,我再次运行它,但没有一个好的报告,而是得到了一个“大表排序-1000行”表,其中有1000行“样本内容”作为控制台中的输出,并且没有报告在给定目录中。

我无法通过Google找到任何相关问题,有人知道如何解决此问题吗?

执行命令:

php bin/phpunit --filter ClassnameTest::testMethodname --coverage-html ./reports/20191103 

<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>rowsorter.js - big table</title>
    <script type="text/javascript" src="../dist/RowSorter.js"></script>
</head>
<body>

<style>
table {width: 80%; font-size: 14px; font-family: tahoma,arial,sans-serif;}
table thead th {background-color: #ccc; padding: 5px 8px;}
table td {background-color: #ddd; padding: 5px 8px;}

table.sorting-table {cursor: move;}
table tr.sorting-row td {background-color: #8b8;}
table td.div {padding: 0;}
table td.div > div {background-color: #b88;line-height:2;}
</style>

<table class="sample_table">
    <thead>
        <tr>
            <th colspan="4">Big Table Sorting - 1000 Rows</th>
        </tr>
    </thead>
    <tbody>
            <tr>
            <td>Row 0</td>
            <td>Sample Content 0</td>
            <td class="div"><div><div><span>Inner Elements 0</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 1</td>
            <td>Sample Content 1</td>
            <td class="div"><div><div><span>Inner Elements 1</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 2</td>
            <td>Sample Content 2</td>
            <td class="div"><div><div><span>Inner Elements 2</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 3</td>
            <td>Sample Content 3</td>
            <td class="div"><div><div><span>Inner Elements 3</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 4</td>
            <td>Sample Content 4</td>
            <td class="div"><div><div><span>Inner Elements 4</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
            <tr>
            <td>Row 5</td>
            <td>Sample Content 5</td>
            <td class="div"><div><div><span>Inner Elements 5</span></div></div></td>
            <td>Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content Sample Content</td>
        </tr>
           
        
        <!-- .. up to 1000 .. -->
        
        </tbody>
    <tfoot>
        <tr>
            <td colspan="4"><button type="button" onclick="RowSorter.destroy('.sample_table');">Destroy RowSorter</button></td>
        </tr>
    </tfoot>
</table>

<script type="text/javascript">
RowSorter(".sample_table");
</script>

</body>
</html>

zhangchengmao 回答:PHPUnit覆盖率报告不断返回示例内容

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3167382.html

大家都在问