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

PerfReport doesn't parse overwritten file but keeps old one

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When calling perfReport more then once per step with the same filename but different content, the performance plugin is not correctly parsing the newer jtl file. It can be viewed in the workspace that the file was correctly overwritten.
      This is probably a caching issue, it is only checked if the file was already parsed and not if the content has changed.
      Additionally, in the UI 2 Performance Report Buttons are created, both pointing to the same, wrong report.
      In order to recreate the following code can be used, it first creates a 404 answer and then it overwrites it with a 200 answer.
      In the rendered performance report only the 404 answer is displayed.

      pipeline {
          agent any
          stages {
              stage('Test') {
                  steps {
                      script{
                          sh "echo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<testResults version=\"1.2\">\n<httpSample t=\"398\" it=\"0\" lt=\"395\" ct=\"219\" ts=\"1617980166975\" s=\"false\" lb=\"HTTP Fetch OAuthToken\" rc=\"404\" rm=\"Not Found\" tn=\"Single User 1-1\" dt=\"text\" by=\"2063\" sby=\"420\" ng=\"1\" na=\"1\">\n<java.net.URL>https://example.com</java.net.URL>\n</httpSample>\n\n</testResults>' > test.jtl"
                          perfReport 'test.jtl'
                          sh "echo '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<testResults version=\"1.2\">\n<httpSample t=\"112\" it=\"0\" lt=\"112\" ct=\"0\" ts=\"1618824141950\" s=\"true\" lb=\"HTTP Fetch OAuthToken\" rc=\"200\" rm=\"OK\" tn=\"Single User 1-1\" dt=\"\" by=\"443\" sby=\"407618\" ng=\"1\" na=\"1\">\n  <java.net.URL>https://example.com</java.net.URL>\n</httpSample>\n\n</testResults>' > test.jtl"
                          perfReport 'test.jtl'
                      }
                  }
              }
          }
      }

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            undera Andrey Pokhilko
            Reporter:
            failx Felix
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: