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

'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: junit-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      Somebody described the problem a year ago here:
      http://jenkins.361315.n4.nabble.com/Problem-with-Age-column-on-Test-Results-tab-td3172208.html

      I have a problem with 'Age' column on 'Test Results' tab. For couple of my tests, all the time this column has value equals '1', despite the fact that those tests start failing earlier than one build ago. When I switch to 'History' tab, in 'Test Result' column there is a 'Regression' value for all builds, and it should be 'Regression' value only for the first build and 'Failed' for next builds.

      For me this happens because I have many junit xmls that containing the same test suite name.
      In this case hudson.tasks.junit.CaseResult.getPreviousResult() gets the only last junit xml result and if it's not failed then the Age column won't be calculated properly.

        Attachments

          Issue Links

            Activity

            soid Greg Temchenko created issue -
            Show
            soid Greg Temchenko added a comment - My solution: Commit: https://github.com/soid/jenkins/commit/ee6ca018464d369683315038384b46991c658a1c Pull request: https://github.com/jenkinsci/jenkins/pull/355
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            core/src/main/java/hudson/tasks/junit/CaseResult.java
            core/src/main/java/hudson/tasks/junit/SuiteResult.java
            core/src/main/java/hudson/tasks/junit/TestResult.java
            core/src/test/java/hudson/tasks/junit/TestResultTest.java
            core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
            http://jenkins-ci.org/commit/jenkins/05937f5343f844593ebd23ced2f62c4ca7308793
            Log:
            [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/junit/TestResult.java core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml http://jenkins-ci.org/commit/jenkins/05937f5343f844593ebd23ced2f62c4ca7308793 Log: [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            core/src/main/java/hudson/tasks/junit/CaseResult.java
            core/src/main/java/hudson/tasks/junit/SuiteResult.java
            core/src/main/java/hudson/tasks/junit/TestResult.java
            core/src/test/java/hudson/tasks/junit/TestResultTest.java
            core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
            http://jenkins-ci.org/commit/jenkins/a885a2391378bab20ee431f6296f6768a4b3a083
            Log:
            Merge pull request #367 from kutzi/duplicate-test-results

            [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorre...

            Compare: https://github.com/jenkinsci/jenkins/compare/bbcf286...a885a23

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/junit/TestResult.java core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml http://jenkins-ci.org/commit/jenkins/a885a2391378bab20ee431f6296f6768a4b3a083 Log: Merge pull request #367 from kutzi/duplicate-test-results [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorre... Compare: https://github.com/jenkinsci/jenkins/compare/bbcf286...a885a23
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            changelog.html
            http://jenkins-ci.org/commit/jenkins/fd0d1cbe085daac0c734d446c3009d6b58845ab3
            Log:
            Changelog for JENKINS-12457 / pull request #367

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html http://jenkins-ci.org/commit/jenkins/fd0d1cbe085daac0c734d446c3009d6b58845ab3 Log: Changelog for JENKINS-12457 / pull request #367
            kutzi kutzi made changes -
            Assignee Greg Temchenko [ soid ] kutzi [ kutzi ]
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #1534
            [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files (Revision 05937f5343f844593ebd23ced2f62c4ca7308793)
            Changelog for JENKINS-12457 / pull request #367 (Revision fd0d1cbe085daac0c734d446c3009d6b58845ab3)

            Result = SUCCESS
            Christoph Kutzinski : 05937f5343f844593ebd23ced2f62c4ca7308793
            Files :

            • core/src/test/java/hudson/tasks/junit/TestResultTest.java
            • core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
            • core/src/main/java/hudson/tasks/junit/SuiteResult.java
            • core/src/main/java/hudson/tasks/junit/TestResult.java
            • core/src/main/java/hudson/tasks/junit/CaseResult.java

            Christoph Kutzinski : fd0d1cbe085daac0c734d446c3009d6b58845ab3
            Files :

            • changelog.html
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1534 [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files (Revision 05937f5343f844593ebd23ced2f62c4ca7308793) Changelog for JENKINS-12457 / pull request #367 (Revision fd0d1cbe085daac0c734d446c3009d6b58845ab3) Result = SUCCESS Christoph Kutzinski : 05937f5343f844593ebd23ced2f62c4ca7308793 Files : core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/junit/TestResult.java core/src/main/java/hudson/tasks/junit/CaseResult.java Christoph Kutzinski : fd0d1cbe085daac0c734d446c3009d6b58845ab3 Files : changelog.html
            desperado Ruslan Strazhnyk made changes -
            Link This issue is related to JENKINS-13214 [ JENKINS-13214 ]
            desperado Ruslan Strazhnyk made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            desperado Ruslan Strazhnyk added a comment -

            Seems like fix is defective - See JENKINS-13214

            Show
            desperado Ruslan Strazhnyk added a comment - Seems like fix is defective - See JENKINS-13214
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            core/src/main/java/hudson/tasks/junit/CaseResult.java
            core/src/main/java/hudson/tasks/junit/SuiteResult.java
            core/src/main/java/hudson/tasks/junit/TestResult.java
            core/src/test/java/hudson/tasks/junit/TestResultTest.java
            core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
            http://jenkins-ci.org/commit/jenkins/7fba652710e64f6dce00e2e186e77ee2a39bd445
            Log:
            Revert "[FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files"

            This reverts commit 05937f5343f844593ebd23ced2f62c4ca7308793.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/junit/TestResult.java core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml http://jenkins-ci.org/commit/jenkins/7fba652710e64f6dce00e2e186e77ee2a39bd445 Log: Revert " [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files" This reverts commit 05937f5343f844593ebd23ced2f62c4ca7308793.
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            kutzi kutzi added a comment -

            Unfortunately I had to revert my 'fix' as it caused JENKINS-13214.
            Seems like your original pull request might indeed be better suited to fix this issue. However, I've got still worries that the reliance on different timestamps alone is not safe enough.

            Show
            kutzi kutzi added a comment - Unfortunately I had to revert my 'fix' as it caused JENKINS-13214 . Seems like your original pull request might indeed be better suited to fix this issue. However, I've got still worries that the reliance on different timestamps alone is not safe enough.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #1642
            Revert "[FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files" (Revision 7fba652710e64f6dce00e2e186e77ee2a39bd445)

            Result = UNSTABLE
            Christoph Kutzinski : 7fba652710e64f6dce00e2e186e77ee2a39bd445
            Files :

            • core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
            • core/src/test/java/hudson/tasks/junit/TestResultTest.java
            • core/src/main/java/hudson/tasks/junit/CaseResult.java
            • core/src/main/java/hudson/tasks/junit/SuiteResult.java
            • core/src/main/java/hudson/tasks/junit/TestResult.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1642 Revert " [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files" (Revision 7fba652710e64f6dce00e2e186e77ee2a39bd445) Result = UNSTABLE Christoph Kutzinski : 7fba652710e64f6dce00e2e186e77ee2a39bd445 Files : core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/main/java/hudson/tasks/junit/TestResult.java
            kutzi kutzi made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Christoph Kutzinski
            Path:
            changelog.html
            core/src/main/java/hudson/tasks/junit/CaseResult.java
            core/src/main/java/hudson/tasks/junit/TestResult.java
            core/src/test/java/hudson/tasks/junit/TestResultTest.java
            core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_a1.xml
            core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_a2.xml
            core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_b.xml
            core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_b_duplicate.xml
            http://jenkins-ci.org/commit/jenkins/d9e87705e8d693bc9d028e1da8c614c0fb736cd3
            Log:
            [Re-FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Christoph Kutzinski Path: changelog.html core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/main/java/hudson/tasks/junit/TestResult.java core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_a1.xml core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_a2.xml core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_b.xml core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_b_duplicate.xml http://jenkins-ci.org/commit/jenkins/d9e87705e8d693bc9d028e1da8c614c0fb736cd3 Log: [Re-FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files
            scm_issue_link SCM/JIRA link daemon made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #1645

            Result = UNSTABLE

            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #1645 Result = UNSTABLE
            soid Greg Temchenko made changes -
            Link This issue is related to JENKINS-13377 [ JENKINS-13377 ]
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_ui-changes_branch #21
            Revert "[FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files" (Revision 7fba652710e64f6dce00e2e186e77ee2a39bd445)
            [Re-FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files (Revision d9e87705e8d693bc9d028e1da8c614c0fb736cd3)

            Result = SUCCESS
            Christoph Kutzinski : 7fba652710e64f6dce00e2e186e77ee2a39bd445
            Files :

            • core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml
            • core/src/main/java/hudson/tasks/junit/TestResult.java
            • core/src/main/java/hudson/tasks/junit/SuiteResult.java
            • core/src/test/java/hudson/tasks/junit/TestResultTest.java
            • core/src/main/java/hudson/tasks/junit/CaseResult.java

            Christoph Kutzinski : d9e87705e8d693bc9d028e1da8c614c0fb736cd3
            Files :

            • core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_b_duplicate.xml
            • core/src/test/java/hudson/tasks/junit/TestResultTest.java
            • changelog.html
            • core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_b.xml
            • core/src/main/java/hudson/tasks/junit/CaseResult.java
            • core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_a2.xml
            • core/src/test/resources/hudson/tasks/junit/JENKINS-12457/TestSuite_a1.xml
            • core/src/main/java/hudson/tasks/junit/TestResult.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_ui-changes_branch #21 Revert " [FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files" (Revision 7fba652710e64f6dce00e2e186e77ee2a39bd445) [Re-FIXED JENKINS-12457] 'Age' column on 'Test Result' tab may show incorrect value when a test suite divided into multiple junit files (Revision d9e87705e8d693bc9d028e1da8c614c0fb736cd3) Result = SUCCESS Christoph Kutzinski : 7fba652710e64f6dce00e2e186e77ee2a39bd445 Files : core/src/test/resources/hudson/tasks/junit/eclipse-plugin-test-report.xml core/src/main/java/hudson/tasks/junit/TestResult.java core/src/main/java/hudson/tasks/junit/SuiteResult.java core/src/test/java/hudson/tasks/junit/TestResultTest.java core/src/main/java/hudson/tasks/junit/CaseResult.java Christoph Kutzinski : d9e87705e8d693bc9d028e1da8c614c0fb736cd3 Files : core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_b_duplicate.xml core/src/test/java/hudson/tasks/junit/TestResultTest.java changelog.html core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_b.xml core/src/main/java/hudson/tasks/junit/CaseResult.java core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_a2.xml core/src/test/resources/hudson/tasks/junit/ JENKINS-12457 /TestSuite_a1.xml core/src/main/java/hudson/tasks/junit/TestResult.java
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142823 ] JNJira + In-Review [ 190292 ]

              People

              • Assignee:
                kutzi kutzi
                Reporter:
                soid Greg Temchenko
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: