If you are not familiar with Groovy, then you need to get a better understanding of Groovy in order to use GINT effectively. Check out the Groovy documentation site. Groovy covers a lot of territory, but for GINT use, only the basics are really needed in most cases. If you are coming from a Java background, picking up Groovy is really easy because it shares similar syntax and, in most cases, just extends all the things you can do. If you are coming from a non-Java or non-programming background, GINT can still be used effectively with just a minimal set of Groovy skills. The following is a quick overview with pointers to the key topics that are important to learn to use Groovy in a GINT context.
Here is a starter list of topics taken from the Groovy Documentation Site and other places. Lists, Maps, Closures, and String are the key Groovy concepts when testing using GINT.
- Installation and Dependencies - installation of necessary products
- Getting started
- Regular expressions
- Differences with Java
- Groovy style
- Groovy Goodness - 'String', "Strings", /Strings/ and GStrings
- Especially important to understand the concept of lazy evaluation
Gant was built as an ANT tool but with Groovy replacing XML. However, for me, the power of Gant as an extension Groovy is in its declarative nature with it's dependency based programming model (think targets ).
- A key conceptual difference between Groovy scripts and Gant scripts is that gant scripts are declarative
- Gant target definitions are processed in the first pass and then appropriate target code is run in the second pass
- This allows for targets to be dynamically created by standard Groovy processing code at declare time
- It enables a convenient listing of targets via the gant -p option. Essentially, this runs the declare pass but not the second runtime pass
- It means you need to be careful and understand lazy evaluation concepts (see Groovy references)
What is Gradle?
Gradle is another build tool (like Gant) based on Groovy and also having a dependency based programming model. Gradle has replaced Gant as the primary build tool for many projects. A future release of GINT may migrate to a Gradle base at some point. It is expected that this will be a relatively easy migration for most GINT tests.