Is there a way to implement a binding AfterScenarioto restart the current test in case of failure?
AfterScenario
Something like that:
[AfterScenario("retry")] public void Retry() { if (ScenarioContext.Current.TestError != null) { // ? } }
Note . Tests in my project are combined in ordered tests and run through MsTest .
The goal of Specflow scripts is to claim that the system behaves as expected.
- , " " ! , . , .
, , , , :
: ... . .
. , .
- , , - . , ( , , ), . WebDriverWait , DOM.
. https://github.com/arrty/specflow-retry. Nunit MS-Test
:
@retry:2 Scenario: Tag on scenario is preferred Then scenario should be run 3 times