We prepared a step-by-step guide how to connect Botium to Jenkins.
Installing Jenkins
Most easy 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).
That’s it, you now have a very simple Jenkins service running.
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 MyBotName-$BUILD_NUMBER in the Build Id field
-
Select JUnit XML as output format
-
Enable the Wait with HTTP(S) response until test session completed option
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:

As build option, choose Shell execute:

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:

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

You can see the failed Botium test cases in Jenkins.

And you can drill down to the detailed Botium error message.

Comments
0 comments
Please sign in to leave a comment.