In Automatics, test execution happens within Jenkins. Please follow below steps to create and configure Jenkins Job for test execution.

1. Create Jenkins Job


2. Configure Jenkins Job

Configure Build Parameters

In General section

Configure Build 

     Configure Shell Script for Partner Java API dependency

Configuring shell script is required only if Partner Java API based project is implemented and that needs to be integrated with Automatics for test execution. Otherwise, this configuration can be skipped.

Before configuring this step in Jenkins, it is required that the Partner Java API project is developed and deployed in Partner's self hosted repository.

Copy the script file pre-test-config.sh and keep it in Jenkins VM. And configure it as shown below. Here, the script is copied to location /mnt/scripts in Jenkins VM.

The parameters to the script are 

-g - Expects the group id of partner java api maven artifact.

-a - Expects the artifact id of partner java api maven artifact.

-v - Expects the version of partner java api maven artifact.

The Jenkins job will clone the test project and then will execute below script. This script will add partner java dependency to test project pom.xml at runtime. After this script is executed, maven goal for test execution will be executed.

Under Build section, please click on 'Add build step' and select option 'Shell Script'.

     Configure Maven Goal for Test Execution

Goals 

clean install -U exec:java -DskipTests=true -DretryByDefault=false -DbuildType=RDK -Dhttps.protocols=TLSv1.1,TLSv1.2

-Dsun.security.ssl.allowUnsafeRenegotiation=true -Dautomatics.properties.file={automatics_properties_base_url}/automatics.properties -Dproperties.file.token={Base 64 encrypted login id and password separated by colon }

properties.file.token parameter is used to authenticate automatics properties. The token should be base 64 encrypted with login id and password separated by colon format.
example: admin:automatics when we encrypt it, the value will be YWRtaW46YXV0b21hdGljcw==


Configure Post-Build Actions

 Configure post build actions as shown below to view the execution logs and html reports.

Configure Archive the Artifacts


Configure Delete the workspace when build is done