Find here step by step instructions for adding Botium's test suite to your Jenkins pipeline.
Steps:
-
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 -
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. -
-
Configure Jenkins Project: Now there are several small steps to do in
Jenkins
-
Create a “Free Style” test project: Select the “Free Style”
option:
-
Build: As build option, choose Execute Shell:
-
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:
-
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!):
- That’s it. Jenkins is ready for running Botium tests!
-
Create a “Free Style” test project: Select the “Free Style”
option:
-
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.
- 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!