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.

          [JENKINS-58489] Convert .jtl output to binary image

          John Pierce added a comment -

          Follow-up - using the utility JMeterPluginsCMD does not properly convert the image and puts a ton of labels at the top.

          Renders the image as garbage and I doubt that it is an aggregate of history information either.

          John Pierce added a comment - Follow-up - using the utility JMeterPluginsCMD does not properly convert the image and puts a ton of labels at the top. Renders the image as garbage and I doubt that it is an aggregate of history information either.

          Alex Earl added a comment -

          Have you tried turning on the inlining feature? In your img tag you can add an attribute data-inline='true' and the plugin will base64 encode the content and inline it.

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

          Alex Earl added a comment - Have you tried turning on the inlining feature? In your img tag you can add an attribute data-inline='true' and the plugin will base64 encode the content and inline it. <img border= "0" width= "225" height= "169" id= "Picture 1" src= '${FILE,path= "mypath/my-loadtest/target/jmeter/results/my-loadtest.jtl" }' data-inline= ' true ' />

          John Pierce added a comment -

          Hi Earl, thanks for the reply.

          It does not seem to work in Outlook 365/2013, although when I click on email message "View it in a web browser" it works perfectly.

          Outllook                                                               Browser

          The intent is to send static graph results to email that is outside of the secure domain.

          The secondary effect is you have a unique snapshot in every email (Build) and it is easier to compare historic information.

          John Pierce added a comment - Hi Earl, thanks for the reply. It does not seem to work in Outlook 365/2013, although when I click on email message " View it in a web browser " it works perfectly. Outllook                                                                Browser The intent is to send static graph results to email that is outside of the secure domain. The secondary effect is you have a unique snapshot in every email (Build) and it is easier to compare historic information.

          Alex Earl added a comment -

          If you view the source, is the image inlined? If so, there is really nothing more that the plugin can do.

          Alex Earl added a comment - If you view the source, is the image inlined? If so, there is really nothing more that the plugin can do.

          John Pierce added a comment -

          Oh yea, it is perfect.

          Don't understand the CID mess with the attachment. but that wouldn't help anyway since .jtl is not really an image, but xml.

           

          John Pierce added a comment - Oh yea, it is perfect. Don't understand the CID mess with the attachment. but that wouldn't help anyway since .jtl is not really an image, but xml.  

          Alex Earl added a comment -

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

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

          Alex Earl added a comment -

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

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

          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.

          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.

          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

           

          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  

          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.

           

          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.  

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

              Created:
              Updated: