Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.6k views
in Technique[技术] by (71.8m points)

how can i create a html report for the junit xml report manually?

I have run junit and it shows the results in Junit console, then i do a export of the result, it is saved as some test.xml. now i want to generate a html report out of it how do i do it ? MY project is complex and i cant do as a normal

<target name ="test" depends="run-tests">
    <junitreport todir="${reports}">
        <fileset dir="${reports}/raw/">
            <include name="TEST-*.xml"/>
        </fileset>
        <report format="frames" todir="${reports}html"/>
    </junitreport>
</target>

anybody any tool that can be used to convert the results in xml to a html format.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Given just the junit xml file (and python) you can convert the xml junit report file into a single self-contained HTML file using junit2html. https://github.com/inorton/junit2html

I had wanted a tool that does this for quite a long time so finally sat down the other day and had a go. It is pure python so should work on any platform as a stand-alone tool.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...