Getting started - veepee-oss/gingerspec GitHub Wiki
You must use the following dependency in your TestNG project to get access to all GingerSpec library functionality
<dependency>
<groupId>com.github.privaliatech</groupId>
<artifactId>gingerspec</artifactId>
<version>2.2.10</version>
</dependency>
Take a look at the latest version of GingerSpec in the maven central repository
However, we strongly suggest make use of the special maven archetype for GingerSpec based projects: gingerspec-starter. Just run the following command in your terminal (replace the values for groupId, version and artifactId as needed)
mvn archetype:generate \
-DarchetypeGroupId=com.github.privaliatech \
-DarchetypeArtifactId=gingerspec-starter \
-DgroupId=eu.vptech \
-Dversion=1.0-SNAPSHOT \
-DartifactId=myproject
Windows users: If you're on a windows terminal and the above command is not working, try putting the values between double quotes (""), it seems that depending on the terminal emulator, Windows does not correctly understand the JVM variables as -Dkey=value
mvn -U archetype:generate -DarchetypeGroupId="com.github.privaliatech" -DarchetypeArtifactId="gingerspec-starter" -DgroupId="eu.vptech" -Dversion="1.0-SNAPSHOT" -DartifactId="myproject"
After downloading some dependencies, the system will ask you to input some parameters to help you configure your project:
-
groupId: Refers to the internal name of the root packages in the project. Normally, for java projects, this name corresponds with the domain name of your organization, so here you can for example use "eu.vptech" (without quotes)
-
artifactId: Refers to the name of the project and folder where your project will be created. My recommendation is to simply input a name that describes your project, for example, "mytestproject" (without quotes). A new folder will be created with this name.
-
version: Version of your project. By default, if you just press enter, it will be assigned a default value of 1.0-SNAPSHOT.
Important! for the above-mentioned variables, avoid using "-" or any other symbol like "#,$∞,&,/,_" etc. Use Camel-case naming convention
After the process finishes, it will create a folder with the name you provided as artifactId, and inside that folder a brand new java project ready to be executed 👍
You can now proceed to open your project in your favorite IDE (We recommend you take some time to read the documentation here), and also read the Structure of a Gingerspec based project documentation to get a better understanding of all the files and project structure.