Outputting HTML in FailedTestOutputFormatter
Hi,
I'm trying to implement showing screenshot comparisons for certain failed tests, and I'm having some success, but I have a few questions:
#1. I have the images being stored as build artifacts, and I've created and registered a FailedTestOutputFormatter, which is being registered and is used to process the output for the tests that I want. This works somewhat; however, I've noticed that on the 'show grouped by package' test view, that links are being filtered out. For example, if I return "My Link:\n<a href=\"http://scaleform.com\">Link text!</a><img src=\"img/buildStates/error.gif\"/>" from formatTestForWeb, I will see the test "My Link", and the error.gif, but the "Link test!" link is not present. Conversely, if I go to the 'plain view' and show the stacktrace, I see the text, link and image (as expected). Is this expected behaviour?
#2. Is there a way to format the 'plain view' output (ie. not the stack trace)?
Thanks,
Bart
Please sign in to leave a comment.
Hello Bart,
In TeamCity's CSS, there is a rule to hide a first link which is present in the stacktrace, namely:
.testList .fullView a:first-child { display:none; }
A workaround in your case is to add a fake link in the beginning of your formatted test output.
Hope, this helps,
KIR
TeamCity 6.5.5 won't have this problem - fixed.