2016-11-10 45 views
0

所有場景做什麼,他們都應該,但是,到現在爲止後繞過隨後的場景,我只用了現在,我有第二個方案1.Specflow失敗

,會出現以下問題。

如果場景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跳過後續情況?

+0

您使用哪個測試跑步者? Specrun? –

+0

我曾嘗試NUnit和SpecRun分開。現在沒有區別,但現在的答案解釋了我的問題。謝謝@SamHolder! –

回答

1

更新了測試配置文件的執行元素:

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

最關鍵的事情似乎是stopAfterFailures="0"