简体   繁体   中英

Visualizing old JUnit XML files with Jenkins

I know how to run tests via a Jenkins job and how to output custom XML results in JUnit specification which are then loaded/visualized by a post-build step to get this nice fancy trend graph.

Now I have a lot of these simple testresults xmls, that are old. They are also produced by a different process, not a Jenkins job. I only want to use Jenkins to visualize them and get the graphical representation. From here I know that Jenkins is hardcoded to reject xml files that are older than 1000ms: http://comments.gmane.org/gmane.comp.java.hudson.user/30138

It will then tell me this: "Test reports were found but none of them are new. Did tests run?"

However, is there no way to do it? Never thought this would be a problem.

Cheers

EDIT: Cool idea, thank you. I am on windows but did a 'touch' equivalent like so:

import os

for f in files:
    # 'touch' equivalent like in unix
    temp = open(f, "w")
    temp.write("")
    temp.close()

Jenkins shows me the graph now, however instead of interpreting the XMLs content, it just tells me that I have 350 failures (since I have 350 test result log files) and this error message for each failure:

"Stacktrace

Test report file C:\\Documents and Settings\\myUsername.jenkins\\jobs\\testjob\\test-reports\\TEST-TestScript-20130528125706.xml was length 0"

What does that have to mean ...

如何执行对文件执行“触摸”的构建步骤呢?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM