Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58489

Convert .jtl output to binary image

    Details

    • Similar Issues:

      Description

      I want to create a standard image file for external email. (eg; Outlook)

      Currently Performance Trend reports are created (via Jmeter) as .jtl files.

      This works great as long as the email destination is inside the network and accessible to the Jenkins server.

      <img border="0" width="225" height="169" id="Picture 1" src="http://build:3333/job/my-load-test/performance/respondingTimeGraph?width=225&height=169&&legendLimit=5&performanceReportPosition=my_test.jtl">

      I want to send email to an address outside the network and would like to send the image binary data to email.

      A suggestion could be to include in email-ext-plugin to utilize something like:

      <img border="0" width="225" height="169" id="Picture 1" src='${FILE,path="mypath/my-loadtest/target/jmeter/results/my-loadtest.jtl"}'

      Not technically correct, but you get the idea. (document.getElementById("image").src = jtlFile; [base64 encoded]

       

      An alternate to this would be ability to save .jtl files as images (png/gif/jpg) and copy to external public web space that can be referenced in email.

      Another advantage of this would be to capture unique snapshot graphs for each build -> email

      Currently if you look at a Performance Trend report email from 2 years ago, it is still going to have latest build graph information.

        Attachments

          Activity

          Hide
          slide_o_mix Alex Earl added a comment -

          So, I am not sure what else can be done by the plugin. 

          Show
          slide_o_mix Alex Earl added a comment - So, I am not sure what else can be done by the plugin. 
          Hide
          slide_o_mix Alex Earl added a comment -

          What is the format of the xml file? Is it an svg?

          Show
          slide_o_mix Alex Earl added a comment - What is the format of the xml file? Is it an svg?
          Hide
          slide_o_mix Alex Earl added a comment -

          I misread you initial description I think. Really the issue here is that you need to fetch the contents of the URL and then base64 encode. I didn't understand that at first. Being able to access any URL would be a huge security issue that I am not willing to undertake . You could possibly use a groovy template to do it though.

          Show
          slide_o_mix Alex Earl added a comment - I misread you initial description I think. Really the issue here is that you need to fetch the contents of the URL and then base64 encode. I didn't understand that at first. Being able to access any URL would be a huge security issue that I am not willing to undertake . You could possibly use a groovy template to do it though.
          Hide
          packcat John Pierce added a comment -

          yes, I think you understand partially.

          I want to take a .jtl file, which when viewed in a browser aggregates a series of Builds and creates an image in the browser.

          Obviously, like you said, you do not want the email user to have access to the server, and so the idea to use an inline image seemed better.

          As a note, the Image shows a placeholder in Outlook Desktop email, but strangely it works fine in mobile outlook.

          I moved the parameters around a little and it works on smartphone.

          Outlook email presents a banner at the top of message to preview in browser.

          So, if my users want to click on the link to see graphs in Outlook Desktop (in Network), they can comfortably see the full images on their mobiles, when not in network.

          3test_cHub_Coverage.jtl

           

          Show
          packcat John Pierce added a comment - yes, I think you understand partially. I want to take a .jtl file, which when viewed in a browser aggregates a series of Builds and creates an image in the browser. Obviously, like you said, you do not want the email user to have access to the server, and so the idea to use an inline image seemed better. As a note, the Image shows a placeholder in Outlook Desktop email, but strangely it works fine in mobile outlook. I moved the parameters around a little and it works on smartphone. Outlook email presents a banner at the top of message to preview in browser. So, if my users want to click on the link to see graphs in Outlook Desktop ( in Network ), they can comfortably see the full images on their mobiles, when not in network. 3test_cHub_Coverage.jtl  
          Hide
          packcat John Pierce added a comment - - edited

          My original idea was (1) for the Performance plugin to create a copy of the Performance graph in (png/jpg/gif) format

          and (2) for the email plugin to allow for a IMG token type as it does for FILE.

          maybe added parameters for size, type, base64, inline, etc...

          The advantage of a copy of the image, (.jtl --> .png) is it creates a snapshot instead of depending on history when reviewing the message at a later date.

          Currently if you have 2 years worth of builds, EVERY email is going to show only the current status.

          As a static image, you can compare historical data from any timestamp in the past to the present.

           

          Show
          packcat John Pierce added a comment - - edited My original idea was (1) for the Performance plugin to create a copy of the Performance graph in (png/jpg/gif) format and (2) for the email plugin to allow for a IMG token type as it does for FILE. maybe added parameters for size, type, base64, inline, etc... The advantage of a copy of the image, (.jtl --> .png) is it creates a snapshot instead of depending on history when reviewing the message at a later date. Currently if you have 2 years worth of builds, EVERY email is going to show only the current status. As a static image, you can compare historical data from any timestamp in the past to the present.  

            People

            • Assignee:
              undera Andrey Pokhilko
              Reporter:
              packcat John Pierce
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: