【发布时间】:2018-05-17 16:22:12
【问题描述】:
有没有办法在命令行中断言失败时继续执行 PHPUnit 测试?
是否有一个 PHPUnit 命令的标志例如:
phpunit --continueonfailure
或在执行一系列测试期间的某事
【问题讨论】:
-
不完全-这是在单个测试函数中。我想知道在执行一系列测试期间是否有 phpunit --continueonfailure 标志或其他东西
有没有办法在命令行中断言失败时继续执行 PHPUnit 测试?
是否有一个 PHPUnit 命令的标志例如:
phpunit --continueonfailure
或在执行一系列测试期间的某事
【问题讨论】:
我认为 PHPUnit 默认会在失败时继续运行测试。所以你可能在phpunit.xml 中定义了stopOnFailure="true"。要么完全删除它,要么尝试将其设置为true。
您可以在命令中附加几个标志,使 PHPUnit 在错误/失败时停止:
--stop-on-defect Stop execution upon first not-passed test
--stop-on-error Stop execution upon first error
--stop-on-failure Stop execution upon first error or failure
--stop-on-warning Stop execution upon first warning
--stop-on-risky Stop execution upon first risky test
--stop-on-skipped Stop execution upon first skipped test
--stop-on-incomplete Stop execution upon first incomplete test
【讨论】: