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

Exception error message \n are esacped in test report page

    Details

    • Similar Issues:

      Description

      We've just updated Jenkins release to the 1.5.28 and testNG plugin to 1.5

      Since this update, the error message is badly displayed in the test report page. Every carriage return is not considered adn the full test is displayed on a sigle line.

      Exception message is in UTF-8 in testng-result.xml and is properly formatted.

      Any workaround ?

        Attachments

          Activity

          Hide
          nullin Nalin Makar added a comment -

          Will be fixed in next release. Thanks for reporting the issue.

          Show
          nullin Nalin Makar added a comment - Will be fixed in next release. Thanks for reporting the issue.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nalin Makar
          Path:
          README
          src/main/resources/hudson/plugins/testng/results/MethodResult/reportDetail.groovy
          src/test/java/hudson/plugins/testng/Constants.java
          src/test/java/hudson/plugins/testng/results/MethodResultTest.java
          src/test/resources/testng-xml-multiline-exp-msg-and-descp.xml
          http://jenkins-ci.org/commit/testng-plugin-plugin/8777f912835184269e66214f00567da44209e79a
          Log:
          JENKINS-19353 - Exception error message newlines are escaped

          Added a new test as well for testing both the test description and exception messages

          Compare: https://github.com/jenkinsci/testng-plugin-plugin/compare/89834fca49f1...8777f9128351

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nalin Makar Path: README src/main/resources/hudson/plugins/testng/results/MethodResult/reportDetail.groovy src/test/java/hudson/plugins/testng/Constants.java src/test/java/hudson/plugins/testng/results/MethodResultTest.java src/test/resources/testng-xml-multiline-exp-msg-and-descp.xml http://jenkins-ci.org/commit/testng-plugin-plugin/8777f912835184269e66214f00567da44209e79a Log: JENKINS-19353 - Exception error message newlines are escaped Added a new test as well for testing both the test description and exception messages Compare: https://github.com/jenkinsci/testng-plugin-plugin/compare/89834fca49f1...8777f9128351
          Hide
          sbuisson stephane Buisson added a comment -

          something like this is reportDetail.groovy template would help

                      if (my.exception.message) {
                          raw("${testngProjAction.escapeExceptionMsg ? my.annotate(my.exception.message) : my.exception.message.replace("\n", "<br/>")}")
                      } else {
                          text("(none)")
                      }
          
          Show
          sbuisson stephane Buisson added a comment - something like this is reportDetail.groovy template would help if (my.exception.message) { raw( "${testngProjAction.escapeExceptionMsg ? my.annotate(my.exception.message) : my.exception.message.replace(" \n ", " <br/> ")}" ) } else { text( "(none)" ) }

            People

            • Assignee:
              nullin Nalin Makar
              Reporter:
              sbuisson stephane Buisson
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: