Jenkins
- Jenkins
- Jenkins Configuration
- Jenkins File Reference for AIQ Integrations
- Required File Changes for AIQ Integrations
- Creating First Jenkins Project
- Run AIQ Scenarios from Jenkins with Ant
- Configure Ant to Run AISG from Jenkins
- Configure a Parameterized Jenkins Project for AIQ
- Scheduling Jobs in Jenkins
- Changing Time Zones in Jenkins
- Jenkins Email Notification
Jenkins
This section details how to configure and run scenarios from Jenkins. This is applicable for both Jenkins installed locally as well as in the cloud, such as using Cloudbees-Jenkins.
Last updated: June 01, 2023
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Jenkins Configuration
Setup a build in Jenkins: Configuration and pre-requisite:
- Download Links for the following are available at “>CI Jenkins”
- After installation, Jenkins automatically launches using port 8080. To change the port number, locate Jenkins/jenkins.xml and modify the --httpPort argument.
For example: -Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8081 - Install ANT using >http://ant.apache.org/bindownload.cgi
- Download and install the appropriate file on your machine depending on the operating system used
- Click Manage Jenkins
- Click Configure System
- Scroll to Global Properties
- Check Environment variables
- Enter PATH in the Name box
- Enter the Java and Ant paths in the Value box as illustrated below
- Click Save (Changes)
- Configure Project to Point to Plugin
- Please make sure to install GIT on the machine where Jenkins is installed, once installed please restart the Jenkins service.
Download git from >https://git-scm.com/downloads based on your operating system.
Configuration validation
- Verify that Jenkins can start on the configured HTTP port and that the service account can access the AIQ installation and ANT executable.
- After saving the Jenkins system configuration, run a small test job and review the console output before scheduling larger executions.
- Keep the AIQ controller URL, credentials, and workspace paths aligned with the environment used by the job.
Last updated: October 15, 2026
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Jenkins File Reference for AIQ Integrations
About the files and from where to download them
All the files related to the CICD integration can be downloaded from the >GITRepo, Please check with an Appvance team member to get access to the Repository.
Following are the files that are available in the folder and what configuration changes need to be made.
Build.xml
Build.xml files hold the configuration settings and also all the defined ANT tags.
-
deps - Downloads the required AppvanceRestClientWithDeps.jar
-
startNode - Starts the mentioned EC2 instance using the file ec2.creds and controller.json files which holds details about account and instance details.
-
setupEnvironment - Depending on the parameters, we could use this to set up the environment.
-
executeScenario - Executes the mentioned scenarios.
-
stopNode - Stops the instance once the execution is done.
-
createScenariosDashboard - This tag will create the Scenario Dashboard once execution is complete.
-
createScenariosDashboard - This tag will create the Scenario Dashboard once execution is complete.
AISG Related Targets
-
blueprintCreation - Starts the creation of the AISG.
-
reportUpload - uploads the smoke test report, timing report, and a BlueprintReport.html which is a human-readable report.uploads the smoke test report, timing report, and a BlueprintReport.html which is human-readable report.
-
blueprintDashboard: this target generates an HTML report that includes the history of all previous build reports and uploads it to an S3 bucket.
-
checkResult: this target checks the AISG generated report and it will fail the build if the number of failures surpasses a user-defined parameter.
-
generateRegressionScenario - Generates the Regression scenarios.
Details about all the ant targets can be found in CICD- AntTags.
controller.json File
Basically has details about the controller machine and the credentials. Above can be used when we have the EC2 setup.
When we are running AIQ local builds, instances in the 2nd line could be replaced with "URL" and the full URL of the AIQ controller could be provided.
{"controller": {
"url": "http://<replace_IP>:8080",
"instances": ["<replace_instanceID>"],
"ec2Creds": "ec2.creds",
"timeOut": 180,
"username": "<replace_username>",
"password": "<replace_password>",
"workFolder": "<replace_path/to/AIQ/resources>"
}
}
ec2.creds
ec2.creds will have details of the AWS account: This can be used when we are using AIQ Controller on the EC2 machine and when your tests are run in the AWS cloud.
AWS_ACCESS_KEY_ID=<replace_awsKEYIDE>
AWS_SECRET_ACCESS_KEY=<replace_awsSecretAccessKey>
Last updated: July 18, 2023
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Required File Changes for AIQ Integrations
-
Update build files as needed
Only a few files require an update for a given environment
Search the following build files for "replace_"
-
build.xml
-
consoleDetails.json
-
controller.json
-
ec2.creds
-
githttp.json
-
jiraCreds.json
The documentation below also contains "replace_" where helpful documentation can be updated
-
-
Retrieve files locally to run a pipeline from the terminal
git clone https://<replace_gitRepoURL>.git
cd -clonedRepoName-
git checkout -yourBranch-
git pull
-
Ant Calls to Run Pipeline
Ant calls must be run from the root of the cloned git repository (i.e. where the build.xml file resides)
Execution Variables
NOTE: When referencing variables from a terminal, you must prefix each variable with -D
Product Variable examples
-Dproduct=<replace_productName>
Project Variable examples (Test Name)
-DprojectName=<replace_productName> -DprojectName=<replace_productName>
AI Template Specific Variables
-Dtemplate is relative path, file (with extension) to template
-Dtemplate=<replace_path>/ai/templates/<replace_templateName>.abpt
Scenario Specific Variables
-Ddir is a directory or path where the scenario resides or will reside (if generated)
-Dscenario is the scenario file name and extension
Example AI Runs:
ant blueprintDashboard -Dtemplate=ipts/ai/templates/<replace_templateName>.abpt -Dproduct=<replace_productName> -DprojectName=<replace_projectName> -DminPages=<replace_#> -DminActions=<replace_#>
Other helpful / optional parameters (These parameters override default values in build.xml):
maxFailingRequests="-1"
minValidationRatio="-1"
maxValidationFailures="1"
minPages=20
minActions=20
Example Scenario Runs:
ant createScenariosDashboard -Ddir=<replace_path>/scenarios -Dscenario=aiGenerated.scenario -Dproduct=<replace_productName> -DprojectName=<replace_projectName>
ant createScenariosDashboard -Ddir=<replace_path>/scenarios -Dscenario=<replace_scenarioName>.scenario -Dproduct=<replace_productName> -DprojectName=<replace_projectName>
Example AI + Script Gen
ant generateRegressionScenario -Dtemplate=<replace_path>/ai/templates/templateName.abpt -Dproduct=<replace_productName> -DprojectName=<replace_projectName>
also, see parameters from "Example AI Runs"
-
Dashboard URL
Dashboards publish at https://<replace_bucketDomain>/products/main.html
To learn more about Dashboards, see CICD - Dashboards
Last updated: June 26, 2023
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Creating First Jenkins Project
Creating your first project and configuring GIT Repo:
-
Once downloaded and installed launch http://localhost:8080 (or with the changed port number) in your browser or log in to your Jenkins cloud
-
Click on New Item from the left navigation
-
Provide a valid Job name
-
Select “Build a free-style software project”
-
Click on the OK button
-
Provide a description of the project
-
Locate Source Code Management and choose Git, Provide the Repository URL with the credential details where all the above files reside and changes made
-
Mention the branch details from the files that reside
-
Build Environment - Check "Delete workspace before build starts", this will ensure the latest assets are uploading when running the Jenkins job
-
Build - Add Build step > Invoke Ant and add the Ant Call as mentioned below
** If Ant is not configured in Jenkins but its installed on the Jenkins agent, the job still can be executed with the following command:
Last updated: June 02, 2023
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Run AIQ Scenarios from Jenkins with Ant
All the ant calls are case-sensitive.
To run scenarios using local files, Jenkins must be installed on a local machine, after which local paths can be specified in place of REPOSITORY paths using SERVER.
-
Save this Jenkins project with these configurations.
-
Click build now.
-
Upon successful build, the user can see the logs by clicking on the build link and then clicking on Console Output which will display all the logs and the link to navigate to Reports of the test run.
Jenkins console or output logs (run from the command line) will show all the details, test case pass / fail, Execution times being taken from all the iterations.
Beginning in the AIQ 4.10.0 release, if you want to run multiple scenarios in parallel you no longer have to specify the individual scenarios in the build.xml file. You can now just add the root folder and CICD will run each scenario within that folder.
To pass scenario and folder as a parameter, setup the following:
-
In the build.xml file, parameters on top should have the variable reference for the value.
<!-- Execute Scenario's parameters -->
<property name="dir" value="${dirName}" />
<!-- folder that contains scenario and resources needed by it -->
<property name="scenario" value="${scenarioName}" />
-
Execute Scenario target should have the same variable name defined for the dir and scenario.
<target name="executeScenario" depends="setupEnvironment">
<taskdef name="executeScenario" classname="com.appvance.ci.ExecuteScenario">
<classpath refid="RestClientLibPath" />
</taskdef>
<executeScenario aiqCreds="${credsData}" dir="${dirName}" scenario="${scenarioName}" consoleDetails="${consoleDetailsData}" resultsFolder="${scenarioResults}" />
<taskdef name="fetchScenarioResults" classname="com.appvance.ci.FetchScenarioResults">
<classpath refid="RestClientLibPath" />
</taskdef>
<fetchScenarioResults aiqCreds="${credsData}" consoleDetails="${consoleDetailsData}" resultsFolder="${scenarioResults}" scenario="${scenarioName}" stopOnFailure="${stopOnFailure}" />
</target> -
From Jenkins, the parameters for dir and scenario can be passed by using the Build> Advanced option
Last updated: March 01, 2024
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Configure Ant to Run AISG from Jenkins
Similarly, projects can also be created to run AISG based on templates.
AISGDashboard would be the ant target that would be used to create a dashboard for the AISG which internally will call targets like report upload, AISG creation, etc.
Once the initial AISG is created, the AISG template exported from file menu options would be the input that would be used for the re-creation of the AISG in everyone runs or as scheduled.
Current terminology
In current AIQ terminology, the generated test definition is an AISG. The existing Ant target names and template-file workflow are retained; update only the label used in new Jenkins documentation and job descriptions.
Verification
Run the Ant target manually once from the Jenkins workspace and confirm that AISG creation, report upload, and dashboard creation complete before enabling a scheduled build.
Last updated: October 15, 2026
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Configure a Parameterized Jenkins Project for AIQ
Use case:
-
To update the URL of the AUT, based on the environment chosen
-
To run A scenario or B scenario depending on the environment chosen.
NOTE: In the build.xml file, The ant.lib/ant-contrib-1.0b3.jar file is needed for the conditional IF support needed in setupEnvironment target
The file can be downloaded from >here
Folder Structure:
-
Download the >zip from GITRepo which has the folder structure that has been used for this use case as an example.
-
In the root folder, you will find build.xml
-
ant.lib folder holding the supporting lib required for the if statements used in build.xml
-
Inside Folder1, you will have ec2.creds file, controller.json file
-
Also, there are CSV files, Creds_prod.csv, Creds_Staging.csv files, these are the files that are mentioned in setUpEnvironment section, depending on the choice from Jenkins, the right file shall be picked and replaced inside the ExplicitValidation folder which holds the other CSV file
-
When Production is called, it only runs the production scenario, and also it picks the file that belongs to production and it replaces it with the actual CSV file used hence the production scenario is used with the right files
Setting the CI Tool (Jenkins used in the example)
-
Install and set up Jenkins
-
Login to Jenkins as Admin
-
Create the project
-
In General - provide the required description
-
Check This project is parameterized check-box and depending on the choice, choose the parameter, in this example, Choice Parameter was chosen to provide the choices of the Environment as Production and Staging
-
Choose Source Code Management, select the repository, and provide your credentials.
Under branches, provide the branch if the files are in a different branch or master if the files are in the master branch
-
Under Build Triggers - Choose Delete Workspace before building starts
This will delete the previous results which are required so each time the dashboard is created fresh with fresh results. All the history files will already be stored in the mentioned S3 bucket in build.xml file
-
Under the build option - Choose the following
-
Save the project
-
Click Build with Parameters
-
Choose the Environment from the drop-down and click Build
-
Jenkins will run the build and the output can be seen in the Console Output
Last updated: June 26, 2023
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Scheduling Jobs in Jenkins
By setting the schedule period to 15 13 * * * you tell Jenkins to schedule the build every day of every month of every year at the 15th minute of the 13th hour of the day.
Jenkins uses a >cron expression, and the different fields are:
MINUTES Minutes in one hour (0-59)
HOURS Hours in one day (0-23)
DAYMONTH Day in a month (1-31)
MONTH Month in a year (1-12)
DAYWEEK Day of the week (0-7) where 0 and 7 are Sunday
If you want to schedule your build every 5 minutes, this will do the job : */5 * * * *
If you want to schedule your build every day at 8h00, this will do the job : 0 8 * * *
For the past few versions (2014), Jenkins has a new parameter, H (extract from the >Jenkins code documentation):
To allow periodically scheduled tasks to produce an even load on the system, the symbol H (for “hash”) should be used wherever possible.
For example, using 0 0 * * * for a dozen daily jobs will cause a large spike at midnight. In contrast, using H H * * * would still execute each job once a day, but not all at the same time, better using limited resources.
Note also that:
The H symbol can be thought of as a random value over a range, but it actually is a hash of the job name, not a random function, so that the value remains stable for any given project.
Schedule validation
Use Jenkins' “Build periodically” trigger and validate the cron expression with a test job before enabling a production pipeline. Jenkins evaluates the schedule in the controller's configured time zone unless a TZ= prefix is supplied. Prefer H for groups of similar jobs to distribute load, and avoid schedules that start many resource-intensive AIQ executions simultaneously.
Last updated: October 15, 2026
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Changing Time Zones in Jenkins
By default, the timezone is in UTC.
If you want to change the timezone to a different one:
For more timezone codes, please refer to>Time Zones information at Java Locale for “English (United States)” (en-US) at LocalePlanet.
Jenkins schedule behavior
Jenkins evaluates the TZ prefix for the cron entry. Keep the timezone identifier and cron expression together in the schedule field, and verify the resulting run time in the Jenkins job history after saving.
Example interpretation
In TZ=EST5EDT followed by 0 16 * * 1-5, Jenkins schedules the job at 16:00 on weekdays in the specified Eastern time rules. Confirm daylight-saving behavior for the timezone used by your environment.
Last updated: October 15, 2026
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Jenkins Email Notification
- Login to Jenkins.
- Navigate to Manage Jenkins.
- Navigate to “Go to plugin manager”
- Search for “Email Extension” under filter section in plugin manager
- Download and Install the Email Extension
- Create APP Password for GMAIL account - Follow below steps to create App Password
- If you configure Jenkins e-mail please you should follow the below steps:
- first enable two step verification for reference click here
- generate an app password
- add the app password instead of your password
- After successfully creation of APP Password for GMAIL
- Go to Configure System in Manage Jenkins.
- Under Configure system go to “Extended Email Notification and add
- SMTP Server field - smtp.gmail.com
- SMTP Port - 465
- Click Advanced button below SMTP Port
- Click Add button
- Go to Jenkins credentials provider and add the Username and APP Password ( Which was created on Step 6) and click Add button.
- Click save button in Configure system
- Go to the project and click configure
- Under post-build Actions Choose Editable Email notification under Build
- Under Editable Email notification add
- “Email id” under Project From
- Other field are by-default filled
- Click Advance settings
- All the field are are by-default filled
- Click Add trigger under Triggers
- Select Always (User can change as per requirement)
- Click Advanced under Triggers
- Add Recipient Mail id under Recipient List
- Click Save and Apply
- Recipient user will start getting Email Notifications
If you have any feedback on this topic, please contact us at documentation@appvance.ai
Last updated: October 15, 2026