将Junit XML报告转换为HTML格式 [英] Coversion of Junit XML Report into HTML form

查看:543
本文介绍了将Junit XML报告转换为HTML格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用soapui免费版生成测试用例的报告,但是它仅以XML格式生成了junit报告,现在我想将其转换为HTML格式.

I am using soapui free version to generate the report of test cases,but it is only generating a junit report in XML form, now I want to convert that into an HTML form.

推荐答案

有几种方法可以做到这一点,但是您可以简单地使用XSL转换(如何生成HTML报告获得Junit结果?

There are several ways to do that, but you can simply use XSL transformation (junitreport option) as suggested by this answer How can I generate an HTML report for Junit results?

<junitreport todir="${outputdir}">
    <fileset dir="${jrdir}">
        <include name="TEST-*.xml"/>
    </fileset>
    <report todir="${outputdir}/html"
        styledir="junitreport"
        format="frames">
        <param name="key1" expression="value1"/>
        <param name="key2" expression="value2"/>
    </report>
</junitreport>

我还建议考虑使用TestNG的可能性,请在此处查找所有详细信息

I would also suggest to consider the possibility to use TestNG, please find out all details here https://stackoverflow.com/questions/12768214/testng-or-junit-in-java/12768737#12768737

这篇关于将Junit XML报告转换为HTML格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆