Spock vs FitNesse
Asked Answered
C

1

11

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

Complaisant answered 10/7, 2011 at 20:17 Comment(3)
I dont think there is a noticeable performance degregation at all. I have found Spock has changed how I write tests more than anything for the better (structure with the given/whens etc). I also think spock is more widely used and accepted.Noli
I haven't used FitNesse however I can recommend Spock. It's really expressive way of writing easy to read tests. Those tests are executed quick. There is no significant impact in terms of performance.Psalm
also see https://mcmap.net/q/1159297/-karate-vs-spockAalto
N
4

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.

Nunhood answered 24/10, 2011 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.