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

Unescaped HTML on "Test Result" page

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • Ubuntu 11.10 server. Jenkins 1.455

      To reproduce:

      • Configure a testsuite containing three tests
      • Make the testsuite print the name of a file to stdout
      • Configure the same testsuite to use the same file as an attachment (using the [[ATTACHMENT|filename|meta]] syntax)
      • Run the test suite in Jenkins (one test fails)
      • Click 'Test Reports', then the name of the failed test.

      Expected:

      • One attachment listed in table
      • The printed attachment name either renders as plain text, or as a link to the attachment

      Actual:

      • the same attachment is listed three times (I am given to believe this is JENKINS-13115)
      • The printed attachment name renders as a complete mess, with unescaped HTML and broken links

      Here's an example of some XML that will generate this:

      <?xml version="1.0" encoding="utf-8"?>
      <testsuite errors="0" failures="1" name="crm.tests.webtests.ContactsTests" skipped="0" tests="1" time="3.888">
              <testcase classname="crm.tests.webtests.ContactsTests" name="test_contact_tags" time="3.888">
                      <failure message="Failing here to test screenshots in Jenkins" type="AssertionError">
      <![CDATA[Traceback (most recent call last):
        File "apps/common/webtestcase.py", line 38, in wrapper
          return func(test, *args, **kwargs)
        File "apps/crm/tests/webtests.py", line 69, in test_contact_tags
          self.fail("Failing here to test screenshots in Jenkins")
      AssertionError: Failing here to test screenshots in Jenkins
      ]]>             </failure>
              </testcase>
              <system-out>
      <![CDATA[Saved screenshot as ContactsTests-test_contact_tags-2012-0320155135.png
      [[ATTACHMENT|/Users/joel/projects/this/selenium_output/ContactsTests-test_contact_tags-2012-0320155135.png|{"description": "screenshot"}]]
      ]]>     </system-out>
              <system-err>
      <![CDATA[ERROR: TemplateDoesNotExist('cms/public/page_404.html',)
      ERROR: TemplateDoesNotExist('cms/public/page_404.html',)
      ]]>     </system-err>
      </testsuite>
      

      I've also attached a screenshot of the results of viewing that XML.

            huybrechts huybrechts
            ukch Joel Cross
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: