The following are required to run tests using GINT.
- Java - Java 1.7 8 or higher is required. See Java install instructions if you don't already have it installed.
Groovy 2.x is recommended. We currently build and test with Groovy 2.14.23. See Groovy install instructions.
- GANT version compatible with Groovy version, but at least GANT 1.9 or above. See GANT install instructions.
- GINT jar (gint-x.x.x.jar) on your class path. Available from Downloads. See below. x.x.x represents the GINT version. For example, version 2.3.0 is used below.
Modify your CLASSPATH environment variable to include the GINT jar file. Either do this globally using system specific techniques or locally after opening a shell window that will be used for running GINT scripts. For instance, on Windows:
Add --classpath to the gant script call
gant --classpath <mydir>/gint-2.3.0.jar -f myscript.gant
- Add GINT jar to your ~/.groovy/lib directory (create if it doesn't exist). Groovy and GANT will load jars found in this directory by default. ~ refers to the user home directory.
- Add GINT jar to another directory of your choice and modify <GROOVY_HOME>/conf/gant-starter.conf to point to it.
- Grab the GINT jar in your test script using Grapes
- This requires the GINT jar be in a Maven or Ivy repository like your local Maven repository or one like Nexus you have already established for other reasons.
Script code snippet
@Grab(group='org.swift.tools', module='gint', version='2.3.0') import org.swift.tools.* includeTool << Gint
- This is the easiest way for a test script to control and access the GINT version it requires, especially in Continuous Integration (CI) environment with multiple build agents.