Jenkins integration

If you are using Jenkins for continuous integration, we have good news for you.

Having automated tests run after every build provides maximum feedback speed to developers. In case you are using Jenkins for CI, here’s how you get the best benefits from Usetrace.

Goals

  • Jenkins post build step triggers Usetrace to execute all traces
  • Result from the automated tests are integrated to the Jenkins build results
  • Summary of the test results are shown by Jenkins

Integration to Jenkins (running on Linux)

  1. Installing the integration plugin on the Jenkins server

ssh to the server that is running Jenkins and run

wget http://usetrace.com/integration/jenkins-usetrace.tar.gz
tar xf jenkins-usetrace.tar.gz && cd jenkins-usetrace
sudo make install

The integration plugin is configurable at /etc/usetrace/jenkins.config – you can use the default configuration.

The Jenkins server must have curl installed for the integration to work.

  1. Enabling the integration from the Jenkins user interface

From the Jenkins build configuration, as the last build step:

Add build step > Execute shell

As the command:

usetrace.sh <project-id> <base-url-for-traces>

where

  • <project-id> is an ID string that you get from Usetrace.com settings page
  • <base-url-for-traces> is a web URL that you want to run the traces against, e.g. http://yoursite.com

From post-build actions, check

[ x ] Publish JUnit test result report

Under test report XMLs: target/test-reports/*.xml

Once these steps have been completed, every Jenkins build triggers Usetrace to execute all of your traces against the given web URL, and the results are visible in the Jenkins build results.

Feedback for these instructions are appreciated! Mail to arto@usetrace.com.

Subscribe to our mailing list

* indicates required

Leave a Reply

Your email address will not be published. Required fields are marked *