easyb 故事和规范之间有什么区别?
我已经尝试 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为两者同样强大。故事是 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.