[
https://jira.codehaus.org/browse/SUREFIRE-1099?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Gudian updated SUREFIRE-1099:
-------------------------------------
Fix Version/s: 2.18
> Invalid link ids in surefire-report
> -----------------------------------
>
> Key: SUREFIRE-1099
> URL: https://jira.codehaus.org/browse/SUREFIRE-1099
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Report Plugin
> Reporter: Andreas Gudian
> Assignee: Andreas Gudian
> Fix For: 2.18
>
>
> Described in this GitHub Pull-Request by kermit-the-frog:
> https://github.com/apache/maven-surefire/pull/36
> {quote}
> If you are using the Maven Surefire Report Plugin to view your jasmine test
> results (generated with Jasmine Maven Plugin) as HTML. The generated
> HTML-Pages look quite good in different browsers but the links on failed
> tests don't work at all.
> The XML containing the jasmine results has whitespace and special chars in
> the names of the testcases. Theses names are not allowed for HTML-Ids, so the
> names have to be modified before using them as ids/targets for anchors/links
> in the generated HTML.
> This is only done halfway in the current version of Maven Surefire Report
> Plugin. The anchors have a modified id. Because the
> SurefireReportGenerator.java uses sink.anchor() to generate the anchor tags.
> That function uses DoxiaUtils.encodeId() to encode any illegal character. But
> the link targets are wrong. SurefireReportGenerator.java uses it's own
> function toHtmlId() which does not implement the same logic as
> DoxiaUtils.encodeId().
> Fixes included in this commit:
> Call toHtmlId() everytime before using testCase.getFullName() as anchor
> id or link target.
> Use DoxiaUtils.encodeId() in toHtmlId(), to avoid problems with any
> illegal char.
> Regards,
> kermit-the-frog
> {quote}
--
This message was sent by Atlassian JIRA
(v6.1.6#6162)