本文介绍了SpecFlow - 查找方法步骤的所有方案,并找到所有未实现的步骤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
新建SpecFlow。
在规范项目变大,组织文件和重构鉴于/时/然后串变得麻烦了。
- 如何找到方法步骤的特征文件情形。有时候,我有几个场景和功能,但在C#步法看法如何查找所有引用的功能文件共享的步骤是什么?
- 如何获得所有未实现的情况下步骤(字体在所有的颜色紫色)功能的文件,这样我可以实施的步骤。目前,当我
运行所有
检验,没有警告没有实现步骤
解决方案
1.9版开始,SpecFlow支持这些东西(参阅):
- 广告1:步骤定义上下文菜单转到SpecFlow步骤定义用法(快捷键Ctrl + Shift + Alt + S):
- 广告2:在功能文件上下文菜单:生成步骤定义
New to SpecFlow.
When specs project become larger, organizing files and refactoring Given/When/Then string become troublesome.
- How to find Scenarios in feature file from method step. Sometimes I have a steps shared in a few scenarios and features but from the C# step method view how to 'Find All References' in feature file?
- How to get all unimplemented scenario steps (font color purple) in all features files so that I can implement the steps. Currently when I
Run All
tests, no warn about unimplemented steps left.
解决方案
Beginning with version 1.9, SpecFlow supports these things (refer to What's new in v1.9):
- ad 1.: Context menu in step definition: "Go To SpecFlow Step Definition Usages" (shortcut Ctrl+Shift+Alt+S):
- ad 2.: Context menu in feature file: "Generate Step Definitions"
这篇关于SpecFlow - 查找方法步骤的所有方案,并找到所有未实现的步骤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!