.NET的黄瓜替代品 [英] Cucumber alternative for .NET

查看:287
本文介绍了.NET的黄瓜替代品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

快速,有人遇到类似Ruby的黄瓜(一个人类可读的DSL用于定义可以测试的用例故事)在.NET领域的库?

Quick one, has anyone come across a library similar to Ruby's cucumber (a human readable DSL for defining use case stories that can be tested against) in the .NET sphere?

推荐答案

您还应该查看 SpecFlow ,这是一个使用.NET做BDD的开源项目。

You should also check out SpecFlow, that is an open-source project to do BDD with .NET.

SpecFlow使用相同的定义格式(Gherkin),例如黄瓜,但您可以在.NET中编写步骤定义。它基本上从你的特性文件生成单元测试类(NUnit,MsTest,xUnit等),所以你可以使用相同的单元测试执行引擎,就像你用真实的单元测试。这样,更容易将BDD功能测试集成到集成构建中。

SpecFlow is using the same definition format (Gherkin), like cucumber, but you can write your step definitions in .NET. It basically generates unit-test classes (NUnit, MsTest, xUnit, etc.) from your feature files, so you can use the same unit test execution engine, like you do with the real unit tests. This way it is also easier to integrate the BDD functional tests to the integration build.

在最近的版本中,SpecFlow具有Visual Studio 2010的语法着色功能并支持Silverlight和Mono / MonoDevelop。

In the recent versions SpecFlow has a syntax coloring feature for Visual Studio 2010 and support for Silverlight and Mono/MonoDevelop.

这篇关于.NET的黄瓜替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆