Jenkins

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:


Configuration validation

  1. Verify that Jenkins can start on the configured HTTP port and that the service account can access the AIQ installation and ANT executable.
  2. After saving the Jenkins system configuration, run a small test job and review the console output before scheduling larger executions.
  3. 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.

Some of the ant tags are explained below:

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

  1. 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

  2. Retrieve files locally to run a pipeline from the terminal

    git clone https://<replace_gitRepoURL>.git

    cd -clonedRepoName-

    git checkout -yourBranch-

    git pull

  3. 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"

  4. 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:

  1. Once downloaded and installed launch http://localhost:8080 (or with the changed port number) in your browser or log in to your Jenkins cloud

  2. Click on New Item from the left navigation

  3. Provide a valid Job name

  4. Select “Build a free-style software project”

  5. Click on the OK button

  6. Provide a description of the project

  7. Locate Source Code Management and choose Git, Provide the Repository URL with the credential details where all the above files reside and changes made

  8. Mention the branch details from the files that reside

  9. Build Environment - Check "Delete workspace before build starts", this will ensure the latest assets are uploading when running the Jenkins job

  10. 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.

  1. Save this Jenkins project with these configurations.

  2. Click build now.

  3. 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:


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:

  1. To update the URL of the AUT, based on the environment chosen

  2. 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:

  1. Install and set up Jenkins

  2. Login to Jenkins as Admin

  3. Create the project

  4. In General - provide the required description

  5. 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

  6. 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

  7. 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

  8. Under the build option - Choose the following

  9. Save the project

  10. Click Build with Parameters

  11. Choose the Environment from the drop-down and click Build

  12. 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:

  1. Navigate to Build Triggers.
  2. Check the Build Periodically option.
  3. Define the Schedule as:
    TZ=EST5EDT
    0 16 * * 1-5
    t21eOqDbAyyhD2fg-91b73f3048c4.png
  4. This means we are setting the timezone to be EST and setting the run time at 16:00 PM from Monday to Friday.

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

  1. Login to Jenkins.
  2. Navigate to Manage Jenkins.
  3. Navigate to “Go to plugin manager”
  4. Search for “Email Extension” under filter section in plugin manager
    O5txKzCzwY3UN7FA-7cf9f9eea73d.png
  5. Download and Install the Email Extension
  6. Create APP Password for GMAIL account - Follow below steps to create App Password
  7. If you configure Jenkins e-mail please you should follow the below steps:
    1. first enable two step verification for reference click here
    2. generate an app password
    3. add the app password instead of your password
  8. After successfully creation of APP Password for GMAIL
  9. Go to Configure System in Manage Jenkins.
  10. Under Configure system go to “Extended Email Notification and add
    1. SMTP Server field - smtp.gmail.com
    2. SMTP Port - 465
      DnvQBJNlRoW2RcoJ-f8a5d6e821f7.png
  11. Click Advanced button below SMTP Port
    c7ab3GKZaGQXyvO5-89a38d399bd3.png
  12. Click Add button
  13. Go to Jenkins credentials provider and add the Username and APP Password ( Which was created on Step 6) and click Add button.
    nC5B2Q7PIamuGeF2-350b63c801eb.png
  14. Click save button in Configure system
  15. Go to the project and click configure
  16. Under post-build Actions Choose Editable Email notification under Build
    neWmcwcBhjC7bex7-660d4e948dbe.png
    JLhqCCjWrl9jnGop-f3081a1bc00b.png
  17. Under Editable Email notification add
  18. “Email id” under Project From
  19. Other field are by-default filled
  20. Click Advance settings
    9zpE3TibtRsGRxkT-815733524b35.png
  21. All the field are are by-default filled
  22. Click Add trigger under Triggers
    wfJBghj0HpwK8zlF-e073c3be2cf1.png
  23. Select Always (User can change as per requirement)
    jKxxxQgHgvd9BfxR-35867894e701.png
  24. Click Advanced under Triggers
    3ikTEvtzIJfRKUzc-71a54ed1e1b8.png
  25. Add Recipient Mail id under Recipient List
    OUd6QGXW8gt1hytH-998122944206.png
  26. Click Save and Apply
  27. 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