我正在使用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