BDD测试框架

发布于 2024-11-01 16:06:20 字数 293 浏览 0 评论 0原文

我们是一家微软商店,拥有相当成熟的技术堆栈,并且拥有非常熟练的.net资源。我们从一开始就一直在使用 TDD,现在正在涉足 BDD 领域。我们的工作是由敏捷团队使用强大的敏捷实践来交付的。

我们的最终可测试产品是 web、wpf 和 windows 表单。

测试资源已经介绍了BDD,想学习并使用Ruby和Cucumber来进行测试。开发人员提出了一些阻力,因为我们更愿意坚持使用相同的技术堆栈并使用 Specflow(或类似的)。测试人员的论点是它更容易学习。

我想确保开发人员和测试人员没有偏见,并且值得引入另一种技术。

We are a Microsoft shop, have a reasonably mature technology stack and have very skilled .net resources. We have been using TDD since we started and now are venturing into the BDD space. Our work is delivered by agile teams, using strong agile practices.

Our end testable product is web, wpf and windows forms.

The testing resources have introduced BDD and would like to learn and use Ruby and Cucumber to perform the testing. There has been some resistance from the developers, as we would prefer to stick with the same technology stack and use Specflow (or similar). The argument from the testers is that it is simpler to learn.

I want to be sure that the developers and testers are not being biased, and that it is worthwhile introducing another technology.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

囚我心虐我身 2024-11-08 16:06:20

SpecFlow 和 Cucumber 使用完全相同的业务人员可读语言 (gerkhin) 来指定功能;唯一的区别是您是否使用 C#(使用例如 WatiN 来驱动基于浏览器的测试)或 Ruby(使用例如 Watir)编写步骤定义。因此,无论您选择哪一种,测试都会以非常相似的方式构建,并且会产生相似的好处。

我认为使用 SpecFlow 相对于 Cucumber 的好处是可以从 Visual Studio 以及 TeamCity 或其他基于 .NET 的持续集成工具轻松运行测试。另一方面,当 Cucumber 测试发生更改或添加新测试时,您不需要等待重新编译(但是,测试代码的更改通常伴随着生产代码的更改,因此这可能不会'这将是一笔可观的节省)。当谈到测试基于 WPF 或基于 Windows 窗体的应用程序时,我认为从 .NET 控制这些应用程序会更容易(但可能有一些 Ruby 库用于控制其他 GUI 应用程序......)

Both SpecFlow and Cucumber use the exact same business-person-readable language (gerkhin) to specify the features; the only difference is whether you'll write the step definitions in C# (using e.g. WatiN to drive browser-based tests) or Ruby (using e.g. Watir). So the tests will be structured in a very similar manner and will yield similar benefits no matter which one you choose.

I guess that the benefit of using SpecFlow over Cucumber is that the tests will be easily runnable from Visual Studio, as well as from e.g. TeamCity or other .NET-based continuous integration tools. On the other hand, when Cucumber tests are changed or new tests are added, you don't need to wait for recompilation (however, a change in the test code is often accompanied by a change in the production code, so this probably won't be a significant savings). When it comes to testing WPF-based or Windows Forms-based apps, I assume that it will be easier to control those applications from .NET (but it could be that there is some Ruby library for controlling other GUI applications...)

爱本泡沫多脆弱 2024-11-08 16:06:20

我们有类似的设置,我们有测试人员在场景后面编写和实施步骤。我们的测试人员非常乐意使用 .net 和 c#。我认为,如果引入另一种技术,开发人员在提交之前不会运行测试,并且在测试失败时不承担责任,因为调试起来非常困难。这意味着您的构建将比它的工作更糟糕。

测试人员最好开始编写场景并将其传递给开发人员,由将要将该功能引入应用程序的开发人员来实现。然后,他们也许可以与开发人员配对并一起实现场景,直到他们自己能够轻松完成为止。

We have a similar setup, we have testers writing and implementing steps behind scenarios. Our testers are quite happy staying with .net and c#. I think that if you introduce another technology you would have developers not running the tests before they commit and not taking responsibility for the tests when they fail as it would be extremely hard to debug it. This would mean your build would be broke more than it's working.

It would probably be good to start for the testers to write the scenarios and passing them to development to be implemented by the developer that is going to introduce the feature into the application. They can then perhaps pair up with the developer and implement the scenarios together until they are comfortable doing it themselves.

温柔戏命师 2024-11-08 16:06:20

我一直在使用 SpecFlow,到目前为止我发现它相当令人满意。但比工具更重要的是 BDD 背后的本质和思想。所有这些工具确实可以为业务和开发人员提供一个通用平台,以形成对系统的共同理解。这是一篇关于 BDD 与 SpecFlow 的非常好的文章

http://codingcraft.wordpress .com/2011/12/17/bdd-with-specflow

BDD 也可以让您正确执行 TDD。

http://codingcraft.wordpress.com/2011/ 11/12/bdd-get-your-tdd-right/

I have been using SpecFlow and found it quite satisfactory up till this point. But it is the essence and the idea behind BDD that is more important than the tool. All these tools can do facilitate a common platform for the business and the development folks to develop a shared understanding of the system. Here is a very good post on BDD with SpecFlow

http://codingcraft.wordpress.com/2011/12/17/bdd-with-specflow

BDD can get you to do your TDD right too .

http://codingcraft.wordpress.com/2011/11/12/bdd-get-your-tdd-right/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文