使用phpunit运行测试的输出中逗号的含义是什么?
我从phpunit
运行测试套件的输出。我了解期间(.
)是指通过测试,但逗号(,
)是什么意思?使用phpunit运行测试的输出中逗号的含义是什么?
16:10:12
PHPUnit 6.1.3 by Sebastian Bergmann and contributors.
..............................F...,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,....,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,E..,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,...........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
.......... 63/145 (43%)
如果你把字符串
..............................F...,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,....,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,E..,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,...........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
..........
,并删除新的生产线,它相当于字符。
如果我们去掉,
,它相当于字符,这与从phpunit
输出进度:
63/145
也就是说,@Hollings建议,您回荡在你的测试中,
反复某处。具体
<phpunit
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
...
</testsuites>
</phpunit>
,你正在寻找启用该选项
beStrictAboutOutputDuringTests="true"
结合启用冗长
:你可以调整你的phpunit.xml
要尽可能严格有关风险测试
verbose="true"
如果您然后运行测试,phpunit
wi LL让你知道哪些测试会导致输出,例如:
PHPUnit 6.1.3 by Sebastian Bergmann and contributors.
Runtime: PHP 7.1.5
Configuration: /Users/am/Sites/stackoverflow/45547842/phpunit.xml
R,
Time: 43 ms, Memory: 4.00MB
There was 1 risky test:
1) FooTest::testBar
This test printed output: ,
仅供参考,请参阅:
如果你喜欢我的回答,你能接受吗?请参阅https://stackoverflow.com/help/someone-answers。 – localheinz
我使用此方法检查了代码,最终找到了将文件发送到Amazon SQS的功能。在等待文件上传时,它会输出一个逗号(,)。这是逗号的来源!在所有的时期,E,F,S,I都与PHPUnit相关联,我自然认为逗号是该包的一部分。感谢@localheinz的详细解释。 – redheadedstep
','通常不从PHPUnit的输出。你是否在回应代码中的逗号? – Hollings