Specflow 通过代码配置 stopAfterFailures 和 retryFor

Specflow configure stopAfterFailures and retryFor by code

我正在将 Specflow 与 MsTest 和 C# 结合使用。

我可以使用适用于所有场景的 Default.srprofile 配置 stopAfterFailures 和 retryFor,但我想通过可能在 Hooks 中的代码来配置它。所以我可以明智地配置它。

如何在测试期间以编程方式配置 Spec运行 stopAfterFailures 和 retryFor 运行?

抱歉,无法在测试期间更改此值 运行。

我们在 SpecRun 1.3(尚未发布)中添加的是,将有一个 API 来取消整个测试 运行。