我将 jQA 扫描和分析插件添加到了 Maven 构建中。现在我在构建时遇到以下异常:
[INFO] Entering C:/.../target/surefire-reports [WARNING] Cannot parse document '/TEST-com...Test.xml': ParseError at [row,col]:[1,1] Message: Premature end of file. [ERROR] Cannot scan item /TEST-com...Test.xml java.util.NoSuchElementException: ParseError at [row,col]:[76,18] Message: The processing instruction target matching "[xX][mM][lL]" is not allowed. at com.sun.xml.internal.stream.XMLEventReaderImpl.next(XMLEventReaderImpl.java:252) at com.buschmais.jqassistant.plugin.junit.impl.scanner.TestReportScannerPlugin.scan(TestReportScannerPlugin.java:52) at com.buschmais.jqassistant.plugin.junit.impl.scanner.TestReportScannerPlugin.scan(TestReportScannerPlugin.java:28) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
我在 Windows 7 计算机上使用 jQA v 1.0.0。 如果我打开测试报告 XML 文件,它们看起来很正常。所以可能是竞争条件等等。
有什么提示吗?
最佳答案
这个issue 1.1.0 已修复 - 原因是流缓存不正确。尽管记录了异常,但扫描后代表测试报告的数据应该在数据库中可用。
关于java - 解析测试报告异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32142549/