How to tell phpunit to stop on failure

前端 未结 1 1694
闹比i
闹比i 2021-02-11 11:34

I\'m running a large suite of phpunit tests, and I\'d like see which test failed as soon as it failed, rather than waiting for all of the tests to complete then having it list o

相关标签:
1条回答
  • 2021-02-11 12:20

    Add the stopOnFailure="true" attribute to your phpunit.xml root element.

    You can also use it in the CLI: phpunit --stop-on-failure

    Info from manual and some others that are maybe useful for you:

    • stopOnError - "Stop execution upon first error."
    • stopOnFailure - "Stop execution upon first error or failure."
    • stopOnIncomplete - "Stop execution upon first incomplete test."

    More info at: PHPunit manual

    0 讨论(0)
提交回复
热议问题