spock 与 easyb

发布于 2024-10-23 17:51:43 字数 194 浏览 2 评论 0原文

我只是简单地浏览了一下 easyb 和 spock ,两者似乎都很相似,但是 spock 似乎更注重技术,是否有关于何时使用哪个的最佳实践?

例如,对于新的 Grails 项目,应该首选哪一个? 对于只需要编写自动化测试的遗留java项目,应该首选哪一个? 其中一个比另一个更适合集成测试吗?

诸如此类的事情..

谢谢 苏达山

I just had brief looks at easyb and spock , both seem to be similar, however spock seems to be more technically oriented, is there any best practice regarding when to use which ?

For example which should one preferred for a new grails project ?
which should one preferred for a legacy java project for which automated tests just need to be written ?
is one more suited for integration tests than the other ?

Things of that sort ..

Thanks
Sudarshan

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

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

发布评论

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

评论(1

无人问我粥可暖 2024-10-30 17:51:43

Spock 与 EasyB Spock 是一个受 BDD 启发的框架,它为开发人员提供了让他们的生活更轻松的工具。 EasyB 是捕获需求和构建验收测试的好方法。 EasyB 场景可以是故事,并且可以将其留空以使其成为描述性故事。然后开始添加闭包代码,可以放入selenium等(源码)

在浏览网页时我看到有人认为 EasyB 存在一些可用性问题,但仍待解决。此外,我在 Spock 上找到了比 EasyB 更多的文章、教程等,而 EasyB 似乎不太受欢迎。

Spock 基于 JUnit,因此运行常规 Java 项目的测试用例与运行任何常规 JUnit 测试一样简单,无论是从 IDE 还是持续集成服务器。请查看使用 Spock 进行测试

总而言之,我会坚持Spock。

Spock vs EasyB Spock is a BDD inspired framework that gives devs tools to make their lives easier. EasyB is a great way to capture requirements and build the acceptance tests. EasyB scenarios can be stories, and can leave them blank to make them descriptive stories. Then start adding closure code and can put in selenium, etc. (source)

While browsing the web I've seen opinions that EasyB has some usability issues that are still being puzzled out. Moreover I was able to find much more articles, tutorials, etc on Spock than EasyB which seems to be less popular.

Spock is based on JUnit so running the test cases for regular Java projects is as easy as running any regular JUnit tests, be it from an IDE or continuous integration servers. Take a look at Testing with Spock.

To conclude, I'd stick to Spock.

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