如何在< system-out>中添加href链接或< failure> Jenkins/JUNIT xml中的标签 [英] How to add a href links in <system-out> or <failure> tags in Jenkins/JUNIT xml
问题描述
我已经将Jenkins集成到C单元测试库中,我正在解析输出并以jenkins理解的模式生成XML.
I have integrated Jenkins to C unit test library and I am parsing the output and generating XML in the schema that the jenkins understands.
在生成xml输出时,我只是显示所报告错误的要点,我想创建一个指向实际日志所在位置的链接,以便用户可以单击jenkins中的teh链接来查看实际文件
while generating the xml output, I just show the gist of the errors reported, and I would like to create a link to where the actual logs are located so that the user can click on teh link in jenkins to view the actual file.
我无法在此XML下添加HTML标记. Jenkins将它们转换为已编码的< ..,并使我的链接无用. 我什至尝试使用.但是我仍然无法得到它.
I am unable to add the HTML tags under this XML. The Jenkins turns them into encoded <.. and makes my link useless. I even try to use . But I am still not able to get it.
有人尝试在jenkins报告下创建链接.非常感谢您的帮助.
Has anyone tried creating a link under jenkins report. Any help is much appreciated.
以下内容无效.
1.<failure> blah.. blah.. (my brief log summary)
<a href="www.stackoverflow.com">ERROR</a>
</failure>
2. <failure> blah.. blah.. (my brief log summary)
<a href=\quot;www.stackoverflow.com\quot;> ERROR </a>
</failure>
3. <failure>
<![CDATA[ <a href="www.stackoverflow.com">ERROR</a>]]>
</failure>
4. <failure>
//CDATA with encoded > <
预先感谢
推荐答案
Out测试框架具有可插入的报告模块-来自测试的调用会为所有已注册"模块生成输出.其中包括JUnit,HTML和SQL.
Out testing framework has pluggable reporting modules - a call from a test generates output for all 'registered' modules. Among those are JUnit, HTML, and SQL.
第一个生成JUnit报告,Jenkins可以立即对其进行处理,以确定构建是否稳定,绘制漂亮的趋势图等.
The first one generates JUnit reports that can be immediately processed by Jenkins to decide if the build is stable or not, draw the nice trend graph, etc.
第二个以人类可读的形式生成错误日志.随着时间的流逝,它已经装饰了各种各样的钟声和口哨声-用于不同状态的不同颜色,可伸缩部分等.在构建的工件中会显示此日志的链接.
The second one generates the error log in a human-readable form. Over time it has been embellished with all kinds of bells and whistles - different colors for different kinds of status, shrinkable/expandable sections, and so on. A link to this log is displayed among the artifacts for a build.
SQL记录器将测试结果上传到数据库中,以进行永久存储和高负荷分析.
SQL logger uploads test results into a database for eternal storage and heavy-duty analysis.
这篇关于如何在< system-out>中添加href链接或< failure> Jenkins/JUNIT xml中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!