斯波克 vs 菲特内斯
我一直在研究 Spock,并且有过使用 FitNesse 的经验。我想知道如果人们似乎正在解决相同或相似的问题空间,他们会如何选择其中之一。
另外,对于那些一直使用 Spock 或其他常规代码进行测试的人来说,您是否发现任何明显的性能下降?测试应该立即给出反馈 - 因为我们知道,如果测试需要更长的时间来运行,开发人员往往会减少运行频率 - 所以我想知道测试执行速度的降低是否对现实世界产生了任何影响。
谢谢
I've been looking into Spock and I've had experience with FitNesse. I'm wondering how would people choose one over the other - if they appear to be addressing the same or similar problem space.
Also for the folks who have been using Spock or other groovy code for tests, do you see any noticeable performance degradation? Tests are supposed to give immediate feedback - as we know that if the tests take longer to run, the developer tends to run them less frequently - so I'm wondering if the reduction in speed of test execution has had any impact in the real world.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 FitNesse 人,所以请对我所说的话持保留态度。在我看来,FitNesse 试图做的是提供一个独立于编程语言的环境来指定测试。他们使用它与程序员建立更直观的界面。在 Spock 中,Groovy ast 转换用于将表转换为 Groovy 程序。
由于您基本上停留在编程语言上,因此在 Spock 中更容易实现更复杂的测试设置。因此,您似乎经常必须在 FitNesse 中编写固定装置代码。
我个人不需要测试执行按钮,我喜欢直接的方法。我喜欢不必参加更多课程,只需进行测试即可,而且我喜欢直接查看代码。例如,我只想从命令行执行测试,而不是从 Web 界面。这在 FitNesse 中当然也是可能的,但结果是 FitNesse 试图为用户提供的整个视觉效果对我来说只是镇流器。这就是为什么我会选择 Spock 而不是 FitNesse。
当然,与语言无关的方法的优点是,许多测试规范可用于 Java 和 .Net。因此,如果这是您的要求,您可能需要做出不同的判断。通常不适合我。
至于性能,我不会太担心这部分。
I am no FitNesse guy, so please take what I say with a grain of salt. To me it seems what FitNesse is trying to do is to provide a programming language independent environment to specify tests. They use it to have a more visual interface with the programmer. In Spock a Groovy ast transform is used to transform the table into a groovy program.
Since you basically stay in a programming language it is in Spock more easy to realize more complicated test setups. As a result you often seem to have to write fixture code in FitNesse.
I personally don't need a test execution button, I like the direct approach. I like not having to take of even more classes, only to enable testing and I like looking at the code directly. For example I want to just execute my test from the command line, not from a web interface. That is surely possible in FitNesse too, but as a result the whole visual thing FitNesse is trying to give the user is just ballast for me. That's why I would choose Spock over FitNesse.
The advantage of the language agnostic approach is of course, that a lot of test specifications can be used for Java and for .Net. so if that is a requirement for you, you may want to judge different. It usually is not to me.
As for performance, I would not worry too much about that part.