PHPUnit 使用随机执行顺序发现更多问题

修改 phpunit.xml 配置文件:



phpunit 不再按照测试方法的定义顺序执行,可以避免测试程序和执行顺序发生耦合。为了便于复现错误,phpunit 运行时会显示 random seed:

PHPUnit 9.5.10 by Sebastian Bergmann and contributors.

Random Seed:   1638957459

Testing 
... 

使用命令行参数:–random-order-seed 1638957459 指定 seed,复现错误。

你可能感兴趣的:(PHPUnit 使用随机执行顺序发现更多问题)