我正在使用Specflow(http://specflow.org/)編寫一些集成測試,我想運行一個場景。有什麼方法可以用Resharper 6運行單一場景?順便說一下,我配置specflow使用MSTest。如何在Resharper中運行單個Specflow場景
我Specflow測試看起來像:
Feature: Customer management
Scenario: Add a new Customer into system
Given the User has entered the customer with the following data
| name | last_name | birthday |
| Peter | Stein | 12.09.1955 |
When the User has pressed the Save Button
Then the following customer should be stored in the data base
| name | last_name | birthday |
| Peter | Steim | 12.09.1955 |
Scenario: Second scenario.....
Scenario: Third scenario.....
我想只運行第一個場景。
嗨邁克爾,謝謝你的回答。這是一個很好的解決方案,但它似乎是一個解決方法。我正在尋找的是插件或其他方式來運行場景,就像單元測試一樣。 – Diego 2012-02-28 08:12:41
我很困惑你的評論。 SpecFlow將每個場景轉換爲單元測試。我的答案是解釋如何運行一個單元測試,這恰好是一種情況。也許我不明白你在找什麼...... – 2012-02-29 16:31:03
嗨邁克爾,你是對的,specflow將每個情景轉化爲單元測試,並且你的建議很有用。不過,我想到了一個解決方案,我在編輯器中選擇一個場景,然後運行它。例如使用resharper編輯單元測試時,爲了執行它,我們有一個綠色的點。有了你的建議,我必須搜索生成的單元測試,並且當我有很多方案時需要一些時間。也許我正在尋找一個選項,它不是仍然在Resharper中實現。你懂我的意思嗎? – Diego 2012-02-29 22:46:05