Joel Cross created JENKINS-13158:
------------------------------------

             Summary: Unescaped HTML on "Test Result" page
                 Key: JENKINS-13158
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13158
             Project: Jenkins
          Issue Type: Bug
          Components: junit-attachments
         Environment: Ubuntu 11.10 server. Jenkins 1.455
            Reporter: Joel Cross
            Assignee: huybrechts
            Priority: Minor
         Attachments: Selenium tests #49 test - test_contact_tags [Jenkins] 
2012-03-20 16-35-46.png

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:
{noformat}
<?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>
{noformat}

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

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to