Skip to main content

Add Botium Test Suite to Jenkins Pipeline

Find here step by step instructions for adding Botium's test suite to your Jenkins pipeline.

Steps:

  1. Install Jenkins: The quickest way to get started is to run the Jenkins docker image. You will get a running instance of Jenkins within a few minutes:
    docker run -p 8080:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts

    Wait a minute, then point your browser at your localhost or http://127.0.0.1:8080 and enter the authorization key shown in the docker output window to finish the Jenkins installation (just accept default options).

    Note: More information on the Jenkins docker image here
  2. Configure Botium Pipeline Integration: In Botium, open the test project you want to run from Jenkins, select the Build Pipeline Integration tab and adapt the parameters:
    • Enter ProjectName-${BUILD_NUMBER} in the Build Id field

      Example: Cyara-API-Jenkins-${BUILD_NUMBER}

      Note: ProjectName must not contain spaces
    • Select JUnit XML as output format

    • Enable the Wait with HTTP(S) response until test session completed option



    Tip: Select the Curl Command Line tab, and copy the command line for later use.
  3. Configure Jenkins Project: Now there are several small steps to do in Jenkins
    1. Create a “Free Style” test project: Select the “Free Style” option:

    2. Build: As build option, choose Execute Shell:

    3. Add curl Script: Now add the curl script from Botium to the build script, adding the --output testresult.xml command line option to curl and put the url between quotation marks:

    4. Post-build Actions: In the Post Build actions, use the Publish JUnit Test Results option, adding testresult.xml as output file (the one written from the curl command above!):

    5. That’s it. Jenkins is ready for running Botium tests!
  4. Running Botium Tests:
    • Now you can use the Build Now command to run the Botium tests, or connect your project to a Git repository, or connect it to another build project, or whatever other options Jenkins provides!

    • And you can drill down to the detailed Botium error message by clicking on any of the failed Test Results.

Was this article helpful?

0 out of 0 found this helpful