There are two primary ways of integrating Dynatrace with Jenkins for Continuous Integration and Continuous Delivery (CICD):
Using the Dynatrace REST API
Using the Dynatrace Plugin for Jenkins
Dynatrace REST API
To integerate Dynatrace with Jenkins using REST API, we would use shell commands. Using the shell command we would invoke the Dynatrace REST API url for the dashboard graph we want to download or email to concerned parties.
Here is an example of shell command with sample Dynatrace REST API url:
wget –no-check-certificate -O ${WORKSPACE}/
This shell command can be added after the task for executing the performance test.
Dynatrace Plugin for Jenkins
The second method is to use Dynatrace Plugin for Jenkins. The url for the plugin is:
https://wiki.jenkins.io/display/JENKINS/Dynatrace+Plugin
This plugin uses Dynatrace Simple Regression algorithm to calculate min, max and volatility. Violation is calculated as (value / max) expressed in %.
This plugin could be reliable for longer duration performance tests. Manual intervention might also be required to broaden the violation range, so that in subsequent tests false reds are not raised. Dynatrace provides the ability to mark the violation as acceptable manually, once marked acceptable, it remembers it and broadens its violation range.