Installation and Dependencies
The following are required to run tests using GINT.
- Java - Java 1.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.4.3. 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.
Windows
See the Groovy install instructions. Some releases supported a Windows-installer. The installer includes Groovy extensions like GANT. This is the easiest way to install both Groovy and GANT .
In order for Windows users to take advantage of the file compare support provided as part of Feature - Automatic Comparisons, a suitable diff program needs to be installed. DiffUtils only takes a few minutes to download and install the binary package.
GINT jar access
GINT test scripts need access to the GINT jar in order to run. There are a number of techniques that can be used depending on your situation. Most of these assume you have downloaded the most recent jar file to a convenient location.
Choose one of these methods for your situation. 5 is recommended.
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:
set CLASSPATH=<mydir>/gint-2.3.0.jar;%CLASSPATH%
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.
Installing into your local Maven repository
Normally not necessary, but, if you need to install the jar file into your local Maven repository:
- Download the jar file
- Use something like the following where use substitute x.x.x for the version of the jar file you downloaded:
mvn install:install-file -Dfile=gint-x.x.x.jar -DgroupId=org.swift.tools -DartifactId=gint -Dversion=x.x.x -Dpackaging=jar
© 2005 -2024 gint.org