在发生故障后,Specflow会绕过后续方案

时间:2016-11-10 10:54:12

标签: specflow

所有场景都按照预期执行,但到目前为止,我只有1。

现在我有第二种情况,出现以下问题。

如果方案1未通过断言,则跳过后续方案。

见下面跳过的情景。

Setup: ConfigFileTransformation (thread #0)
Scenario: Shows telephone numbers on the header in ShowContactInformation
    (target: BrowserBrowserStack_Win8_Chrome_52) -> Succeeded on thread #0
Scenario: Shows telephone numbers on the contact sidebar box in
    ShowContactInformation (target: BrowserBrowserStack_Win8_Chrome_52)
    -> Failed on thread #0
    [ERROR] 2 assertions failed.
Restore: ConfigFileTransformation (thread #0)
Scenario: Shows telephone numbers on the header in ShowContactInformation
    (target: BrowserBrowserStack_Win8_Firefox_42)
    -> Skipped on thread #-1
Scenario: Shows telephone numbers on the contact sidebar box in
    ShowContactInformation
    (target: BrowserBrowserStack_Win8_Firefox_42)
    -> Skipped on thread #-1
Result: 1 failed
  Total: 4
  Succeeded: 1
  Ignored: 0
  Pending: 0
  Skipped: 2 <--- **** Other scenarios must be executed regardless of anything else.
  Failed: 1

如何防止specflow跳过后续场景?

1 个答案:

答案 0 :(得分:1)

将测试配置文件的执行元素更新为:

<Execution retryFor="None" stopAfterFailures="0" testThreadCount="1" testSchedulingMode="Sequential" />

关键似乎是stopAfterFailures="0"