Training Groovy, Geb, Spock

Based on the Java background, learning Groovy does not seem to be a very radical way of learning many of the concepts inherent in dynamic languages.

I plan to start learning Groovy through

  • The module for testing my existing Java code with Groovy (there are many articles for it on www, but what are the disadvantages?)

  • Automation testing through Geb (using Spock with Geb)

Are there any problems with this approach? Best ways to learn Groovy and apply as well? Are there any problems using Spock with Geb?

+4
source share
2 answers

As the author of Spock, I could be biased, but

  • Spock was specifically designed to work great for testing Java code. The disadvantages of testing Java code with Groovy: the second language adds some complexity (although the gain is big), no other JVM language matches Java tools (although Groovy probably comes closest, for example, cross-refactoring in IDEA works very well).
  • Geb is a β€œsimple” library and thus works well with any test environment (even if there is no integration). How well does he work with Spock? Well, I think it’s enough to say that Luke Daily, the author of Hebe, is Spock’s commander and uses Spock whenever he can. :-)
+8
source

The way I recognized Groovy may be a bit old-fashioned, but I just took the book and read it. I highly recommend:

Groovy Programming: Dynamic Performance for Venkat Subramaniam Java Developer http://www.pragprog.com/titles/vslg/programming-groovy

This is a very fast, easy and focused reading. After I read the book, I just started coding in Groovy and learned more and more from there.

0
source

All Articles