我的PHP将此输出到控制台上。63/129 ( 48%)和一般的东西到底意味着什么?它是否运行所有测试?
PHPUnit 3.7.22 by Sebastian Bergmann.
Configuration read from phpunit.xml
............................................................... 63 / 129 ( 48%)
............................................................... 126 / 129 ( 97%)
...
Time: 0 seconds, Memory: 6.75Mb
OK (129 tests, 245 assertions)phpunit.xml看起来像:
<?xml version="1.0" encoding="utf-8" ?>
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="SDK Testsuite">
<directory suffix="Test.php">src/MyNamespace/Test/Unit</directory>
</testsuite>
</testsuites>
</phpunit>发布于 2013-08-09 08:34:10
每个点表示一个单元测试。运行每个测试后,它会打印一个点。第一行有63个点,这意味着129个测试中有63个(约占48%)已经运行。第二行还有63个点,使测试总数达到126个。最后三个测试在第三行。
当测试需要很长的时间,并且您可以跟踪屏幕上的进度时,这个特性就意味着。如果其中一个测试使系统陷入死锁,这也很有用。进度计量器可以让您看到哪个是有问题的测试。
发布于 2013-08-10 18:38:12
每个点表示一个成功完成的测试。其他输出的符号包括“I”、“S”、“R”、“F”和“E”。
当测试包括行时会产生'I‘。
$this->markTestIncomplete('Your reason for being incomplete string');当测试包括行时会生成“S”
$this->markTestSkipped('Your reason for skipping string');当测试以某种方式存在风险时,即不执行任何断言时,就会产生“R”。
当phpunit在测试执行过程中遇到错误时会产生'E‘,而当正在执行的测试中的断言失败时会产生'F’。
https://stackoverflow.com/questions/18142699
复制相似问题