dongluanan7163 2013-09-04 13:45
浏览 33

PHPUnit需要很长时间才能显示错误并失败

I'm using PHPunit to test my classes. When all assertions are correct, things are fine, but whenever there's a PHP error found in the code, PHPunit says something like "Time taken 0 seconds, 1 error" and then takes an extra 10-15 seconds just to display what the error is and where the failure occured. It seems like it does a full stack trace of where the error occurred, which seems more comprehensive than what PHP does by default. Is this the reason for taking too long? If so, is there any way to speed up this process?

  • 写回答

1条回答 默认 最新

  • dousao6313 2013-09-06 10:53
    关注

    Maybe running tests with --stop-on-failure parameter can help you to not running other tests after error occurs and see reason of error immediately.

    > phpunit --stop-on-failure .
    

    Another option is to run your tests with --tap option to find which test slow down your tests

    > phpunit --tap .
    
    评论

报告相同问题?

悬赏问题

  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题