Skip to main content

Configure ant to run Scenarios from Jenkins

guidanceAll the ant calls are case-sensitive.

UseTo run scenarios using local files, Jenkins andmust Antbe onlyinstalled whenon 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 projectuser stillcan requires an Ant-based automation pipeline. For new pipelines, confirm whether a newer CI/CD approach is available before extending legacy Ant jobs.

    Before configuringsee the job

    logs
    • Confirmby 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 environment,4.10.0 project,release, scenario,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 executionCICD target.

    Usewill servicerun accountseach orscenario CIwithin credentialsthat storedfolder. in

    To Jenkinspass credentialsscenario management.

    Doand notfolder hard-codeas AIQa usernames,parameter, passwords, tokens, or environment secrets in build files.Confirmsetup the agentfollowing: machine

      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 reachbe AIQ,passed repositories,by browsers, Test Nodes, and required application URLs.

      Keep build files, scripts, and configuration under version control.

      Pipeline checks

      1. Runusing the AntBuild> target locally or on a controlled Jenkins agent before scheduling it.
      2. Capture AIQ execution IDs, Jenkins build numbers, logs, and artifacts.
      3. Fail the Jenkins job when the AIQ result fails, times out, or cannot be retrieved.
      4. Archive only the evidence required for troubleshooting and compliance.
      5. Review old Ant jobs periodically and retire duplicate or unused jobs.

      Terminology note:Advanced Use Scenario Editor when referring to current AIQ scenarios. Keep legacy terms only when describing old job names, file names, or historical assets.option


      Last updated: OctoberMarch 5,01, 20262024

      If you have any feedback on this topic, please contact us at documentation@appvance.ai