Displaying Custom HTML from within JUnit report

Answered

Hi -

We're using the XML report processing plugin to have TeamCity show us the results of our JUnit tests.  We'd like to show more than just plaintext within the stacktrace information for the failing test. For instance, <img> tags with screenshots, links to URLs, iframes, etc.  I understand that this is not possible because Teamcity only shows the contents of the <failure> tag below the build, and the JUnit DTD requires that it be CDATA.  Of course this results in any HTML that we put in the CDATA block being escaped and not rendered as HTML.

I'm wondering if anyone has any clever workarounds to showing HTML rich information in the "stacktrace" section, or if it would be possible to in some way modify the XML report processing to accept another tag (i.e, <htmlFailureInfo>), that is not CDATA and could be processed as XHTML.

Any ideas? 

Thanks,

-Lester

1 comment

Hello,

At the moment it's not supported. I've created a feature request: https://youtrack.jetbrains.com/issue/TW-45597, please vote for it.

As current workaround you can create a HTML report inside you build script, publish it as artifact and show it on a separate build Report tab. Another option is to create a custom plugin.

0

Please sign in to leave a comment.