Cucumber alternative for .NET(.NET 的黄瓜替代品)
问题描述
快速,有没有人在 .NET 领域遇到过类似于 Ruby 的 cucumber(一种人类可读的 DSL,用于定义可以测试的用例故事)的库?
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),例如 cucumber,但您可以在 .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 的黄瓜替代品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:.NET 的黄瓜替代品
基础教程推荐
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
