-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins: 2.516.2
Since version 2.8.0 this plugin is no longer able to parse the coverage.xml file created by our tests. We are using Pester for PowerShell scripts which creates a coverage.xml file in JaCoCo format. With version 2.7.1 it still worked but something in 2.8.0 changed and i could not find a solution in the release notes so far.
The output contains this error message (The file listed here is the very-first one in the repository):
14:25:57 Also: org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: 52f74170-c445-4ad0-8b54-c1c393b3c02f 14:25:57 java.lang.IllegalArgumentException: There is already the same child [FILE] foo.ps1 <0> with the name foo.ps1 in [PACKAGE] myRepo.someDirectory.anotherDirectory <1, LINE: 100.00% (22/22)> 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.addChild(Node.java:179) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.addChildNode(Node.java:967) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.createFileNode(Node.java:949) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.lambda$findOrCreateFileNode$18(Node.java:998) 14:25:57 at java.base/java.util.Optional.orElseGet(Unknown Source) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.findOrCreateFileNode(Node.java:998) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.JacocoParser.readSourceFile(JacocoParser.java:227) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.JacocoParser.readPackage(JacocoParser.java:166) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.JacocoParser.readModule(JacocoParser.java:127) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.JacocoParser.parseReport(JacocoParser.java:104) 14:25:57 at PluginClassLoader for coverage//edu.hm.hafner.coverage.CoverageParser.parse(CoverageParser.java:82) 14:25:57 at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageReportScanner.processFile(CoverageReportScanner.java:64) 14:25:57 at PluginClassLoader for plugin-util-api//io.jenkins.plugins.util.AgentFileVisitor.scanFiles(AgentFileVisitor.java:116) 14:25:57 at PluginClassLoader for plugin-util-api//io.jenkins.plugins.util.AgentFileVisitor.invoke(AgentFileVisitor.java:95) 14:25:57 at PluginClassLoader for plugin-util-api//io.jenkins.plugins.util.AgentFileVisitor.invoke(AgentFileVisitor.java:40) 14:25:57 at Jenkins v2.516.1//hudson.FilePath$FileCallableWrapper.call(FilePath.java:3590) 14:25:57 at hudson.remoting.UserRequest.perform(UserRequest.java:225) 14:25:57 at hudson.remoting.UserRequest.perform(UserRequest.java:50) 14:25:57 at hudson.remoting.Request$2.run(Request.java:391) 14:25:57 at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81) 14:25:57 at java.base/java.util.concurrent.FutureTask.run(Unknown Source) 14:25:57 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 14:25:57 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 14:25:57 at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:310) 14:25:57 at java.base/java.lang.Thread.run(Unknown Source)
The used coverage.xml looks like that (hint: the file foo.ps1 is only listed in this particular section):
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.1//EN" "report.dtd"[]> <report name="Pester (08/28/2025 05:08:10)"> <sessioninfo id="this" start="1756357668799" dump="1756357690892" /> <package name="myRepo/someDirectory/anotherDirectory"> <class name="myRepo/someDirectory/anotherDirectory/foo" sourcefilename="someDirectory/anotherDirectory/foo.ps1"> <method name="<script>" desc="()" line="16"> <counter type="INSTRUCTION" missed="0" covered="31" /> <counter type="LINE" missed="0" covered="22" /> <counter type="METHOD" missed="0" covered="1" /> </method> <counter type="INSTRUCTION" missed="0" covered="31" /> <counter type="LINE" missed="0" covered="22" /> <counter type="METHOD" missed="0" covered="1" /> <counter type="CLASS" missed="0" covered="1" /> </class> <sourcefile name="someDirectory/anotherDirectory/foo.ps1"> <line nr="16" mi="0" ci="1" mb="0" cb="0" /> <line nr="18" mi="0" ci="1" mb="0" cb="0" /> <line nr="20" mi="0" ci="2" mb="0" cb="0" /> // more lines <counter type="INSTRUCTION" missed="0" covered="31" /> <counter type="LINE" missed="0" covered="22" /> <counter type="METHOD" missed="0" covered="1" /> <counter type="CLASS" missed="0" covered="1" /> </sourcefile> <counter type="INSTRUCTION" missed="0" covered="31" /> <counter type="LINE" missed="0" covered="22" /> <counter type="METHOD" missed="0" covered="1" /> <counter type="CLASS" missed="0" covered="1" /> </package> // more packages