Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用假设的状态测试功能编写测试。
我发现在一定数量的状态更改后,测试会从头开始。
我怎样才能让它沿着现有的路径继续?
我已经设置了max_examples=1,stateful_step_count=999999但这似乎没有帮助。
max_examples=1
stateful_step_count=999999
偶尔重启是有状态测试的一个有意特性,如果您的测试失败,我们必须能够提供一个最小(最少步骤)的反例。
在您的具体情况下,我怀疑状态机“卡住”并且不得不重试一些步骤。因为它无法完成max_step步骤,所以它可能不能算作max_examples!
max_step
max_examples
有关更详细的评论,我必须查看您的实际代码和示例输出:-)