easyb 故事和规范之间有什么区别?

发布于 2024-09-14 22:17:37 字数 178 浏览 2 评论 0原文

我已经尝试 easyb BDD 框架大约一天半了,我不确定我是否理解故事和规范之间的区别(除了语法之外)。故事使用给定的、when、then 语法,场景使用描述、it、it... 语法。

除了语法之外,两者之间还有区别吗?

使用一种格式是否比另一种更好——或者只是“使用你喜欢的格式”?

谢谢!

I've been trying out the easyb BDD framework for about a day and a half and I'm not sure I understand the difference between a story and a specification(besides the syntax). A story uses the given, when, then syntax and a scenario uses the description, it, it... syntax.

Besides the syntax is there a difference between the two?

Is using one format over the other better - or is it just a 'use what you like' kind of thing?

Thanks!

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

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

发布评论

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

评论(1

春夜浅 2024-09-21 22:17:37

我认为两者同样强大。故事是 easyb 定义行为驱动测试的原始方式,而后来添加了规范来复制 RSpec(Ruby 的 BDD 框架)的规范风格。所以最终,这只是一个品味问题。

I think both are equally powerful. Stories are easyb's original way of defining behavior driven tests, whereas specifications were added later to copy the specification style of RSpec which is the BDD framework for Ruby. So in the end, it's just a matter of taste.

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