Hudson在创建测试报告时出错

时间:2012-09-13 15:19:46

标签: hudson mxunit

我从哈德森那里得到了以下错误。请问有谁请告诉我这里有什么问题。我的测试用例运行正常。

Total time: 0 seconds
Recording test results
  

错误:无法存档测试报告   hudson.util.IOException2:远程文件操作失败:hudson.remoting.Channel@5ad977d6:C:\ Users \ xxx \ Downloads \ hudson \ workspace \ xxx:NodeA       在hudson.FilePath.act(FilePath.java:754)       在hudson.FilePath.act(FilePath.java:740)       在hudson.tasks.junit.JUnitParser.parse(JUnitParser.java:83)       在hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:132)       在hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:144)       在hudson.tasks.BuildStepMonitor $ 1.perform(BuildStepMonitor.java:19)       在hudson.model.AbstractBuild $ AbstractRunner.perform(AbstractBuild.java:630)       在hudson.model.AbstractBuild $ AbstractRunner.performAllBuildSteps(AbstractBuild.java:608)       在hudson.model.AbstractBuild $ AbstractRunner.performAllBuildSteps(AbstractBuild.java:584)       在hudson.model.Build $ RunnerImpl.post2(Build.java:159)       在hudson.model.AbstractBuild $ AbstractRunner.post(AbstractBuild.java:553)       在hudson.model.Run.run(Run.java:1390)       在hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)       在hudson.model.ResourceController.execute(ResourceController.java:88)       在hudson.model.Executor.run(Executor.java:145)   引起:hudson.util.IOException2:无法读取C:\ Users \ xxx \ Downloads \ hudson \ workspace \ xxx \ xxx \ testresults \ testresults.properties   这真的是一个JUnit报告文件吗?您的配置必须匹配太多文件       在hudson.tasks.junit.TestResult.parse(TestResult.java:205)       在hudson.tasks.junit.TestResult.parse(TestResult.java:155)       在hudson.tasks.junit.TestResult。(TestResult.java:118)       在hudson.tasks.junit.JUnitParser $ ParseResultCallable.invoke(JUnitParser.java:114)       在hudson.tasks.junit.JUnitParser $ ParseResultCallable.invoke(JUnitParser.java:87)       在hudson.FilePath $ FileCallableWrapper.call(FilePath.java:1960)       在hudson.remoting.UserRequest.perform(UserRequest.java:114)       在hudson.remoting.UserRequest.perform(UserRequest.java:48)       在hudson.remoting.Request $ 2.run(Request.java:283)       at java.util.concurrent.Executors $ RunnableAdapter.call(Unknown Source)       at java.util.concurrent.FutureTask $ Sync.innerRun(Unknown Source)       at java.util.concurrent.FutureTask.run(Unknown Source)       at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)       at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)       在hudson.remoting.Engine $ 1 $ 1.run(Engine.java:60)       在java.lang.Thread.run(未知来源)   引起:org.dom4j.DocumentException:文档文件的第1行出错:/// C:/Users/xxx/Downloads/hudson/workspace/xxx/xxx/testresults/testresults.properties:prolog中不允许使用内容。嵌套异常:prolog中不允许使用内容。       在org.dom4j.io.SAXReader.read(SAXReader.java:482)       在org.dom4j.io.SAXReader.read(SAXReader.java:264)       在hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:98)       在hudson.tasks.junit.TestResult.parse(TestResult.java:199)       ......还有15个   引起:org.xml.sax.SAXParseException; systemId:file:/// C:/Users/xxx/Downloads/hudson/workspace/xxx/xxx/testresults/testresults.properties; lineNumber:1; columnNumber:1;序言中不能有内容。       at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)       at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl $ PrologDriver.next(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)       at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)       at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)       at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)       在com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(未知来源)       at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)       at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl $ JAXPSAXParser.parse(Unknown Source)       在org.dom4j.io.SAXReader.read(SAXReader.java:465)       ......还有18个

2 个答案:

答案 0 :(得分:2)

这是因为HUDSON试图在testresults.properties文件中解析您的测试结果。它正在获取SAXParseException,因为testresults.properties不包含有效的XML。这可能是因为您的项目中没有测试。

答案 1 :(得分:0)

OR因为你有HTML和XML(就像我一样)。确保只包含* .xml。