我正在使用SpecFlow設置NUnit C#測試,但在SpecFlowFeature中聲明的測試似乎沒有被選中由文本資源管理器啓動。當試圖手動運行情況(通過右鍵單擊),我收到以下錯誤:嘗試運行SpecFlow NUnit測試時出錯:「無法訪問已處理的對象。」對象名稱:'GherkinLanguageService'「
"Cannot access a disposed object. Object name: 'GherkinLanguageService'"
...不響鐘聲任何在所有。任何人有任何建議如何讓他們跑?
特徵代碼如下:
Feature: SpecFlowFeature
As a user
I would like to go to the what we do page
In order to see what we do information
@UI
Scenario: What we do Browsing
Given I have the home page open
When I select what we do from the menu
Then I see the what we do information
@UI
Scenario: Add an Asset to a Client page
Given I have the home page open
When I go to a client page
And I click the Add Download button
And I fill in the form
And I choose a file to upload
And I submit the form
Then I see the newly-submitted file
和臺階的定義都是自動生成的。
編輯:名單我的測試項目安裝的NuGet包:
- Microsoft.Net.Compilers 1.1.0-RC1
- NUnit的3.4.0
- NUnitTestAdapter 2.0.0
- 硒.WebDriver 2.53.0
- SpecFlow 2.1.0
- SpecFlow.NUnit 2.1.0 個
- SpecFlow.NUnit.Runners 2.1.0
你可以添加你的代碼嗎? –
增加了SpecFlowFeature。還有什麼你需要的?代碼的其餘部分是從該功能自動生成的,並且不存在生成錯誤。 –
這些函數中是否有任何代碼?或者它仍然只是默認的空生成的? –