Search code examples
c#specflowspecrun

Specflow configure stopAfterFailures and retryFor by code


I am using Specflow with MsTest and C#.

I can configure stopAfterFailures and retryFor using Default.srprofile which applied to all scenario, but i want to configure it by code may be in Hooks. So i can configure it feature wise.

How can I configure Specrun stopAfterFailures and retryFor programatically during the test run?


Solution

  • Sorry, it is not possible to change this values during test run.

    What we added in SpecRun 1.3 (not yet released) is, that there will be an API to cancel the whole test run.