Closed GoogleCodeExporter closed 9 years ago
I don't think it's feasible, and I don't think you'd win much. What do you hope
to gain from this?
Original comment by pnied...@gmail.com
on 27 Sep 2012 at 3:30
Writing tests with TestNG and Mockito/Hamcrest is just not as elegant as Spock.
I really enjoy how Spock structures tests and how easy it is to assert
conditions or mock objects.
Original comment by thatsnot...@gmail.com
on 27 Sep 2012 at 3:37
Sure. The question is, why do you want to execute Spock tests via TestNG? What
do you hope to gain from this?
Original comment by pnied...@gmail.com
on 27 Sep 2012 at 3:44
I have had terrible luck integrating Spock tests with TestNG in things like
Cobertura, Findbugs when they both have to run in the same Maven task. Two
different runs has caused me problems of missing cobertura results or
inconsistent test behavior. If Spock ran under TestNG this would all run as a
single execution and I don't think I would see the inconsistent problems.
Original comment by thatsnot...@gmail.com
on 27 Sep 2012 at 3:48
I don't think that implementing a TestNG runner for Spock is a viable solution
to these problems. Last time I checked (a few years back), it didn't even seem
to be possible, because TestNG wasn't extensible in the way JUnit is. My
conversations with Cedric Beust on the TestNG mailing list confirmed this
impression.
Original comment by pnied...@gmail.com
on 27 Sep 2012 at 3:55
So I guess I will look at implementing a TestNG runner in JUnit.
Every time I try to bring some kind of new greatness to a team it fails with
issues like this. Scala and Groovy in Eclipse? Nope. *sigh* We have the
technology!
Original comment by thatsnot...@gmail.com
on 27 Sep 2012 at 4:13
Peter just so you know, I've been at a few shops that use TestNG. I show then
Spock and they go "wow that's awesome" but none of them can spend the time to
move all the tests to Spock, so it's always an awkward mashup in our pom that
never works quite right. It's very frustrating.
Original comment by thatsnot...@gmail.com
on 28 Sep 2012 at 2:56
I understand, but I don't think Spock can realistically do anything about it.
We are already investing a lot in the best possible JUnit, Groovy, Maven,
Eclipse, and IDEA support, and I wouldn't even know how to achieve
"compatibility" with TestNG. I think that the problems you mentioned are best
solved on the build tool level. For example, Cobertura coverage files can be
merged (there is both an API and an Ant task for that). I don't see how running
Spock and TestNG side by side could cause any problems with FindBugs.
By the way, it would have been better to lead this conversation at
http://forum.spockframework.org
Original comment by pnied...@gmail.com
on 28 Sep 2012 at 3:13
Original comment by pnied...@gmail.com
on 4 Oct 2012 at 6:52
Original issue reported on code.google.com by
thatsnot...@gmail.com
on 27 Sep 2012 at 3:05