![](/img/trans.png)
[英]Specflow calling step from step definition throws TechTalk.SpecFlow.SpecFlowException: Container of the steps class has not been initialized
[英]Specflow 2022 Generate a Step Definition file - VSC BDD: All steps have been defined in this file already
這是解決此問題的方法
右鍵單擊項目級別- 這是我的項目
Select添加新項目3 添加 SpecFlow 配置文件
刪除 JSON 文件是什么
將此代碼粘貼到配置文件中
{ "language": { "feature": "en-nz" } }
Go 進入特征文件並右鍵單擊一個步驟
Select定義步驟選項
Go 通過定義步驟向導
將生成步驟定義文件
添加到步驟定義文件夾
要仔細檢查 select 步驟,右鍵單擊並 select ' go 到定義'
您應該被帶到您選擇的步驟定義文件步驟。
我有同樣的問題。
您必須先構建解決方案 (ctrl+shift+B) 或項目 (ctrl+B)。 然后再次嘗試定義步驟。
希望這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.