Icon

Comments have been closed on this page. Please use AppMon & UEM Open Q & A forum for questions about this plugin.

Overview

 

This plugin displays performance metrics captured by the Dynatrace Test Center Edition (for Unit, Performance, Web API and Browser-based tests) in Bamboo.

Name and Version

Dynatrace Plugin for Atlassian Bamboo

Compatible with

6.1+

Author

Jan Swaelens, Sofico NV

License

dynaTrace BSD

Support Level

Not Supported

Download

Install through the Atlassian Marketplace: https://marketplace.atlassian.com/plugins/be.sofico.bamboo.plugins.bamboo-dynatrace-plugin 

Installation

Install via https://marketplace.atlassian.com/plugins/be.sofico.bamboo.plugins.bamboo-dynatrace-plugin 

Usage

Configure the Dynatrace settings (in the Plan's Misc configuration section):

Screenshots

Register a test run with Dynatrace (has to be executed BEFORE the tests are run)

 

View the dynatrace test automation overview on the plan level

Fail the build for performance degradation

  1. Anonymous (login to see details)

    Nice! Any experiences in the field on this?

    1. Anonymous (login to see details)

      Hi Kristof, it's still pending approval in the Atlassian Marketplace (hence no download link so far), I'm sure there'll be more experience coming (wink)

  2. Anonymous (login to see details)

    Hi Wolfgang, you mean to say Bamboo does not support the above dynatrace integration yet?

    1. Anonymous (login to see details)

      Hi Vikash, in the meantime it was approved and is available through the Atlassian Marketplace - so you can give it a try!

      1. Anonymous (login to see details)

        Hi Wolfgang,

        I have installed Bamboo Dynatrace plugin on my local Bamboo set up. Then I configured integration under "Miscellaneous" tab. I can also see Dynatrace" tab in my build plan.

        But when I run my task "Register Test Session", I get an error "Failed to execute plugin 'Dynatrace Server Build Processor' with error: The server 10.56.25.143 failed to respond with a valid HTTP response"

        The dynatrace server details are correctly configured but still I am getting this error.

        Could you please let me know what could cause this error and also please let me know if I can raise any support ticket to address this issue.

         

  3. Anonymous (login to see details)

    Hi,

    When I execute my Bamboo Plan having task "Register Test Session", it fails with error "Failed to execute plugin 'Dynatrace Server Build Processor' with error: The server 10.56.25.143 failed to respond with a valid HTTP response". Could you please let me know how this issue can be resolved?

    1. Anonymous (login to see details)

      Is there any info in the bamboo log about the error? Or on the dynatrace server? You are running a Test Center Edition DT instance right?

      thanks

  4. Anonymous (login to see details)

    Hi there,

     

    I've  also started playing around with dynaTrace and Bamboo and I'm getting errors too. The latest is the two I got,

    Unable to get repositoy url from repository configuration (not an svn repository?)

    Failed to execute plugin 'Dynatrace Server Build Processor' with error: Invalid uri 'http://[host]:8020/rest/management/profiles/system profile/testruns?short=true&versionBuild=19': escaped absolute path not valid


    Can anybody shed some light, please.

     

    Regards,

    Sean


    1. Anonymous (login to see details)

      Based on the URL I would assume the Dynatrace server host and System Profile name are not configured in the Misc. tab of the build plan under the Dynatrace Section.

  5. Anonymous (login to see details)

    Hi Jan,

    When testing I used the actual url, I just put space holders when I posted this on the forum.

     

    Thanks,

     

     

    1. Anonymous (login to see details)

      Hello,

      Ok, which version of Dynatrace are you using? I will see if I can reproduce, do note it will take me some time to set this up.

      br,
      jan 

  6. Anonymous (login to see details)

    Hi,

     

    I'm using v6.2 of Dynatrace and v5.9.7 Bamboo. And they're both running on RHEL 7.

     

    Thanks,

    Sean

    1. Anonymous (login to see details)

      Hi Jan,

       

      Were you able to replicate my issue on your end?

       

      Thanks,

      Sean

  7. Anonymous (login to see details)

    Hi,

    we can't install this plugin in bamboo 5.9.7, because this plugin is for 5.7.2?

    Is it possible to make it work for 5.9.7?


    Regards,

    Jan

    1. Anonymous (login to see details)

      Hello,

      You can try downloading it directly and then installing it from the downloaded archive. Chances are the API hasn't changed and it will still be compatible.

      We are rebuilding our infrastructure at the moment, I am planning to do a rebuild for latest Bamboo and Dynatrace versions (this will probably be by end of year or early 2016).

       

      br

      jan 

      1. Anonymous (login to see details)

        Hello Jan-Hendrik,

        I just published a new version to the marketplace, it will show up soon or is already.

        br
        jan 

        1. Anonymous (login to see details)

          Hi Jan,

          thank you very much. (smile)

          Really cool, that you were answering this fast.

          Regards,

          Jan

      2. Anonymous (login to see details)

        Hi

        My tasks include "register Test run" and "Run Test". Both tasks successfully complete where the test is registered and the testrun id is parsed to my soap test which is visible in dynatrace in the the test overview. However Bamboo doesnt know about the dynatrace test results - is there an additional task that I need to add to query this?

        I have checked the box that says "fail build-Fail the build when the Test Automation reports the build as failed"

        Thanks

        1. Anonymous (login to see details)

          Hello,

          Not sure how you trigger the tests but in our case we do this via ant and pass these parameters to hook up Dynatrace with the relevant references to find its build results afterwards (Ant Target Field): 

          test_webservice -Ddynatrace.testsession.id=${bamboo.dynatrace.testsession.id}

          In the Ant script we then use this tag inside the JUnit task to pass the ID:

          <!-- Pass the dynatrace test session id to the JUnit task -->
          <sysproperty key="dynatrace.testsession.id" value="${dynatrace.testsession.id}"/>

          If you are doing this nothing else is required.

           

          br

          jan

           

  8. Anonymous (login to see details)

    Thanks - herewith a log output of what I'm doing, in principe sounds like the same thing.

     

    Starting task 'Register session' of type 'be.sofico.bamboo.plugins.bamboo-dynatrace-plugin:task.dynatrace.regsession'

    simple  14-Mar-2016 10:48:40   Dynatrace - Created test session with ID: 3ca09539-3498-4eea-9580-3728fb18647f

    simple  14-Mar-2016 10:48:40   Finished task 'Register session' with result: Success

    command 14-Mar-2016 10:48:40   Substituting variable: ${bamboo.dynatrace.testsession.id} with 3ca09539-3498-4eea-9580-3728fb18647f

    simple  14-Mar-2016 10:48:40   Starting task 'SoapUI test' of type 'com.atlassian.bamboo.plugins.scripttask:task.builder.script'

    build   14-Mar-2016 10:48:44   10:48:44,671 INFO  [PluginManager] 0 plugins loaded in 24 ms

    build   14-Mar-2016 10:48:44   10:48:44,671 INFO  [DefaultSoapUICore] All plugins loaded

    build   14-Mar-2016 10:48:46   10:48:46,192 INFO  [WsdlProject] Loaded project from [file:/usr/local/applications/SoapUI/SoapUI-5.2.0/bin/entitiestest_property2.xml]

    build   14-Mar-2016 10:48:46   10:48:46,204 INFO  [SoapUILoadTestRunner] Setting project property [testRunId] to [3ca09539-3498-4eea-9580-3728fb18647f]

    build   14-Mar-2016 10:48:46   10:48:46,205 INFO  [SoapUILoadTestRunner] Running LoadTest [LoadTest 1]

    build   14-Mar-2016 10:48:46   Progress: 1 - Creating Virtual User 1

    build   14-Mar-2016 10:48:46   Progress: 1 - Started thread 1

    build   14-Mar-2016 10:48:46   10:48:46,842 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest 1] progress: 0.0, 1

    build   14-Mar-2016 10:48:47   10:48:47,332 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request

    build   14-Mar-2016 10:48:47   10:48:47,332 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /entities-service-ws/core.wsdl HTTP/1.1

    build   14-Mar-2016 10:48:47   10:48:47,364 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 500 Internal Server Error

    build   14-Mar-2016 10:48:47   10:48:47,367 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely

    build   14-Mar-2016 10:48:47   10:48:47,842 INFO  [SoapUILoadTestRunner] LoadTest [LoadTest 1] finished with status FINISHED

    build   14-Mar-2016 10:48:47   10:48:47,842 INFO  [SoapUILoadTestRunner] SoapUI suite [coreSoap11 TestSuite] finished in 1637ms

    simple  14-Mar-2016 10:48:47   Finished task 'SoapUI test' with result: Success

    1. Anonymous (login to see details)

      I see, thanks for the info.

      Can you verify that the dynatrace test session id listed in the output is also linked to the actual data in Dynatrace? I think you can see it when viewing details on the top level node of one of the pure paths.

       

      br

      jan

      1. Anonymous (login to see details)

        Hi Jan

         

        Yes the test run Id is exactly the same

  9. Anonymous (login to see details)

    Is the bamboo plugin responsible for querying the rest interfaces or am I supposed to add a task to query the rest interface.

     

    If I query the rest interface with the testrun Id in my logs I do get the test run results.

    1. Anonymous (login to see details)

      Hello,

      Yes the plugin automatically does this, it uses the url as follows:

      http://[host]:8020/rest/management/profiles/[system profile]/testruns?short=true&versionBuild=[bamboo_build]

      Where:

      • host: your dt server
      • system profile: the profile you use
      • bamboo_build: the build nr of the bamboo build that runs the tests being monitored

      Maybe its that last one which is not matching as it should?

      You did enable the dynatrace integration for the particular build plan?

      br

      jan

  10. Anonymous (login to see details)

    Changed my Bamboo variable to bamboo.buildNumber and herewith the response from the rest interface directly from dynatrace. The graph on the dynatrace tab just shows as all gree"passed"

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <testRun category="webapi" versionBuild="81" versionMajor="1" versionMinor="0" versionRevision="81" platform="Linux" startTime="1458149695337" id="4bcdf0dd-b65d-4b3c-91cb-6604c4c6db5e" numPassed="0" numFailed="1" numVolatile="0" numImproved="0" numDegraded="0" numInvalidated="0"> <testResult name="EntitiesTest" status="failed" exectime="1458149695337"> <measure name="Count" metricGroup="Exceptions" value="3.0" unit="num" expectedMin="0.0" expectedMax="0.0" numFailingOrInvalidatedRuns="9" numValidRuns="2" numImprovedRuns="0" numDegradedRuns="0" violationPercentage="0.0"/> <measure name="DB Count" metricGroup="Database" value="0.0" unit="num" expectedMin="9.0" expectedMax="9.0" numFailingOrInvalidatedRuns="9" numValidRuns="2" numImprovedRuns="0" numDegradedRuns="0" violationPercentage="0.0"/> <measure name="PurePath Duration" metricGroup="PurePaths" value="6.242431640625" unit="ms" expectedMin="0.0" expectedMax="10603.008115669434" numFailingOrInvalidatedRuns="9" numValidRuns="2" numImprovedRuns="0" numDegradedRuns="0" violationPercentage="0.0"/

    1. Anonymous (login to see details)

      Aha, it seems a new field was added which was not present before: numFailed (or I overlooked it) - which dynatrace version are you running? The plugin is looking at other fields to evaluate its failure. Will need some code changes it seems.

      1. Anonymous (login to see details)

        its dynatrace 6.2.6.1006

        1. Anonymous (login to see details)

          Just to let you know, I am working on this but it will take a bit longer since I have to wrestle with the 3D chart api as well.

          1. Anonymous (login to see details)

            Thanks Jan, appreciate it.

            Thanks for this awesome contribution.

            1. Anonymous (login to see details)

              Hi Lester,

              I just published a new version on the marketplace (v1.2) which contains support for the 'numFailed' value as well.
              I also added a 'demo' mode which when enabled generates some sample data and works without actual Dynatrace server integrated, makes it easy for me to debug as well (wink).

              br

              jan 

  11. Anonymous (login to see details)

    Hi Jan

    So the good news is that the graph depicts the failed tests now.

    However the build doesnt fail even although the test failed. The  "Fail Build" tick is enabled but doesnt seem to take effect.

    Regards

    Lester

    1. Anonymous (login to see details)

      Okey, that means something still goes wrong in either getting the data for 1 particular build or interpreting it. I added some additional logging to diagnose further, would be great if you could test with this version of the plugin and provide the output of the build log: https://www.dropbox.com/s/9b5bnpie2sirnft/bamboo-dynatrace-plugin-1.2.1.jar?dl=0

      It generates entries like this:

      31-Mar-2016 09:55:06DynatraceBuildProcessorServer - Interpreting results for build number: 7
      31-Mar-2016 09:55:06DynatraceBuildProcessorServer - Test Run Data: numPassed=23, numVolatile=1, numImproved=3, numDegraded=0, numInvalidated=1, numFailed=5, buildNr=7, startTime=1459410906311

      tx

      1. Anonymous (login to see details)

        Hi

        As requested - this is on version 1.2.1

        simple	31-Mar-2016 13:03:06	Build CONF-NRI-JOB1-100 completed.
        simple	31-Mar-2016 13:03:06	Running on server: post build plugin 'Sonar Build Log Password Obfuscator'
        simple	31-Mar-2016 13:03:06	Running on server: post build plugin 'Dynatrace Server Build Processor'
        simple	31-Mar-2016 13:03:06	DynatraceBuildProcessorServer - Interpreting results for build number: 100
        simple	31-Mar-2016 13:03:06	DynatraceBuildProcessorServer - Did not receive any run date, unable to interpret build result
        simple	31-Mar-2016 13:03:06	Running on server: post build plugin 'NCover Results Collector'
        simple	31-Mar-2016 13:03:06	Running on server: post build plugin 'Clover Delta Calculator'
        simple	31-Mar-2016 13:03:06	Running on server: post build plugin 'Maven Dependencies Postprocessor'
        simple	31-Mar-2016 13:03:06	Running on server: post build plugin 'Build Hanging Detection Configuration'
        1. Anonymous (login to see details)

          Thanks, so we have a problem with processing the actual rest results. I added some more logic, can you please try again with this one: https://www.dropbox.com/s/0pry2ltw3146kco/bamboo-dynatrace-plugin-1.2.2.jar?dl=0

           

          1. Anonymous (login to see details)

            Hi Jan

            So herewith the output from Bamboo

            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - Interpreting results for build number: 101
            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - Calling Dynatrace on: http://172.24.29.20:8020/rest/management/profiles/Discovery%20Applications/testruns?short=true&versionBuild=101
            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - Called Dynatrace successfully HTTP code: 200
            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - Obtained response: <?xml version="1.0" encoding="UTF-8"?>
            <testRuns message="No test metadata was set or no testrun occurred between 1970-01-01T02:00:00 (timestamp: 0) and 2016-04-01T11:01:17 (timestamp: 1459501277827) with additional parameters: [versionBuild=[101]]" />
            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - Number of returned testRun instances: 0
            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - No test run data available
            simple	01-Apr-2016 11:01:17	DynatraceBuildProcessorServer - Did not receive any run data, unable to interpret build result.

            If I query the rest interface directly using the same url highlighted above herewith the xml response

             

            <testRuns>
            <testRun category="webapi" versionBuild="101" versionMajor="1" versionMinor="0" versionRevision="101"platform="Linux" startTime="1459501276838" id="1dcf2725-cd77-446b-b17a-1ae918a0467f" numPassed="0" numFailed="1"numVolatile="0" numImproved="0" numDegraded="0" numInvalidated="0"href="http://172.24.29.20:8020/rest/management/profiles/Discovery%20Applications/testruns/1dcf2725-cd77-446b-b17a-1ae918a0467f"/>
            </testRuns>
            1. Anonymous (login to see details)

              Hmm, I suspect that the data isn't available yet in the dyanatrace server at the time we request it. I will add some polling mechanism to see if that resolves it.

              I'l be back with a new build (wink)

              1. Anonymous (login to see details)

                just wanted to say THANKS for the effort that you put into providing a great plugin for Bamboo!!! GREETINGS!!

              2. Anonymous (login to see details)

                Please have a run with this version: https://www.dropbox.com/s/hx6xkb6illkb0m8/bamboo-dynatrace-plugin-1.2.3.jar?dl=0

                You should see additional loggings where it sleeps for a while until data is there. If it plays out ok I will publish an official version with this fix.

                br
                jan 

                1. Anonymous (login to see details)

                  Hi Jan

                  Works 100% now.

                  Thanks making the necessary changes.

                  Will do a write up on how Bamboo, SoapUI and Dynatrace Test Automation integrates.

                  Thanks

                  Lester

                   

                  1. Anonymous (login to see details)

                    My pleasure, released a new version in the marketplace containing the fix with some logging removed.

                    br
                    jan 

  12. Anonymous (login to see details)

    When running a build with the Register Test Session task included, I receive a substitution error.
    I am using bamboo.dynatrace.testsession.id variable.

     

    03-May-2016 01:36:56 Starting task 'Dynatrace Test Registration' of type 'be.sofico.bamboo.plugins.bamboo-dynatrace-plugin:task.dynatrace.regsession'
    03-May-2016 01:36:56 Finished task 'Dynatrace Test Registration' with result: Success
    03-May-2016 01:36:56
    Substituting variable: ${bamboo.buildNumber} with 23
    03-May-2016 01:36:56
    Substituting variable: ${bamboo.buildKey} with CDEL-DEMO-JOB1
    03-May-2016 01:36:56 Starting task 'Ant' of type 'com.atlassian.bamboo.plugins.ant:task.builder.ant'
    03-May-2016 01:36:56
    Beginning to execute external process for build 'CDelivery_Demo - Demo - Default Job #23 (CDEL-DEMO-JOB1-23)'
    ... running command line:
    /usr/share/ant/bin/ant -Djava.io.tmpdir=/var/lib/bamboo/bamboo-install/temp/CDEL-DEMO-JOB1 -f build.xml test -Dbamboo.build.Number=23 -Dbamboo.build.key=CDEL-DEMO-JOB1 -Ddynatrace.testsession.id=${bamboo.dynatrace.testsession.id}
    03-May-2016 01:36:56 /usr/share/ant/bin/ant: 1: eval: Bad substitution
    03-May-2016 01:36:56 Failing task since return code of [/usr/share/ant/bin/ant -Djava.io.tmpdir=/var/lib/bamboo/bamboo-install/temp/CDEL-DEMO-JOB1 -f build.xml test -Dbamboo.build.Number=23 -Dbamboo.build.key=CDEL-DEMO-JOB1 -Ddynatrace.testsession.id=${bamboo.dynatrace.testsession.id}] was 2 while expected 0

    1. Anonymous (login to see details)

      Hi Daniel,

      Based on the output I think it is failing to create the test session, later resulting in the substitution failure (which makes sense). You should see a line between register task start and end saying 'Dynatrace - Created test session with ID abc123'.

      As far as I can see errors should be logged, so the remaining option is - did you enable dynatrace on the plan level (misc tab).

      br

      jan

      1. Anonymous (login to see details)

        Hi Jan,

        Yes, dynatrace is enabled in the miscellaneous plan settings with a valid system profile and authentication.  

        1. Anonymous (login to see details)

          That's odd, maybe Bamboo is losing the reference to the configuration - which Bamboo version are you using?

          br,
          jan

          1. Anonymous (login to see details)

            Version 5.10.1.1

            Could this have to do anything with permissions? Does the plugin use any other directory besides the bamboo directories?

            Is there any additional logging we can enable?

          2. Anonymous (login to see details)

            I looked through your source code and sound the exception that is thrown.

            03-May-2016 15:24:16 Running pre-build action: VCS Version Collector
            03-May-2016 15:24:16 Starting task 'Dynatrace Test Registration' of type 'be.sofico.bamboo.plugins.bamboo-dynatrace-plugin:task.dynatrace.regsession'
            03-May-2016 15:24:16 Unable to get repositoy url from repository configuration (not an svn repository?).
            03-May-2016 15:24:16 Finished task 'Dynatrace Test Registration' with result: Failed
            03-May-2016 15:24:16 Finished task be.sofico.bamboo.plugins.bamboo-dynatrace-plugin:task.dynatrace.regsession Dynatrace Test Registration

            So it appears that the plugin is throwing an exception in the RegisterTestSessionTask. The catch on that method contains this exception message.

             

            1. Anonymous (login to see details)

              Hello,

              The plugin does not access any resource expect the URL from Dynatrace. Looks like the registering is throwing an error indeed, but my error handling there is a bit non-existing. I'll try to get you a better version early next week.

              br
              Jan 

              1. Anonymous (login to see details)

                The issue was in the system profile name. The profile name entered into the plugin configuration cannot have any spaces.

                Any space needs to be replaced with %20 in the system profile name field. Once that was changed, everything worked (smile)

                1. Anonymous (login to see details)

                  Hello,

                  Thanks, I adapted the code to encode the url - should work better when the name has spaces using version 1.2.6.

                  br
                  jan