[Coverage Plugin] recordCoverage() coudln't generate COBERTURA coverage report

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major
    • Component/s: coverage-plugin
    • Environment:

      HI, There are IllegalArgumentException below when using recordCoverage() as a COBERTURA format

      If the reference project of the test project has overloaded duplicate methods, coverage.cobertura.xml is generated, but the coverage plugin cannot interpret the duplicated methods with the same name.

       

      Operating System 

      master : Ubuntu
      agent: Windows 10

       

      Reproduction steps

      3 overload methods(same project) test code(C#)

      {{ex) public int Get(int a), public int Get(int a, int b, int c), public int Get(int a, int b, intc) }}

      Jenkins PIpeline

      {{ recordCoverage(tools: [[
      parser: 'COBERTURA',
      pattern: 'TestResults/**/coverage.cobertura.xml'
      ]])}}

       

      Expected Results

       

      {{[Coverage] Obtaining result action of reference build }}

      [Coverage] Reference build recorder is not configured

      [Coverage] -> Found no reference build

      {{[Coverage] No quality gates have been set - skipping
      [}}

      Coverage] Executing source code painting...

      [Coverage] Painting 1 source files on agent

      [Coverage] -> finished painting (0 files have been painted, 1 files failed)

      [Coverage] -> zipping sources from folder 'C:\Jenkins\workspace\Coverage_main\coverage' as 'C:\Jenkins\workspace\Coverage_main\coverage-sources.zip'

      {{[Coverage] Copying painted sources from agent to build folder
      [Coverage] -> extracting...}}

      [Coverage] -> done

      [Coverage] Deleting source code files of build #24

      [Coverage] Finished coverage processing - adding the action to the build...

       

      Actual Results

      [Pipeline] recordCoverage
      Error when executing success post condition:
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to BuildMachine
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1916)
      at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:384)
      at hudson.remoting.Channel.call(Channel.java:1108)
      at hudson.FilePath.act(FilePath.java:1204)
      at hudson.FilePath.act(FilePath.java:1193)
      at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageRecorder.recordCoverageResults(CoverageRecorder.java:498)
      at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageRecorder.perform(CoverageRecorder.java:418)
      at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageRecorder.perform(CoverageRecorder.java:408)
      at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageStep$Execution.run(CoverageStep.java:369)
      at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageStep$Execution.run(CoverageStep.java:337)
      at PluginClassLoader for workflow-step-api//org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:49)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.base/java.lang.Thread.run(Unknown Source)
      Also:   org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: f916fd79-264e-44f7-a244-e000200d0e73
      java.lang.IllegalArgumentException: There is already the same child [METHOD] Enqueue(System.Byte[]) <0> with the name Enqueue(System.Byte[]) in [CLASS] xx.xx.xx <7, LINE: 0.00% (0/41)>
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.addChild(Node.java:181)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.addChildNode(Node.java:970)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.Node.createMethodNode(Node.java:924)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.createMethodNode(CoberturaParser.java:239)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.createNode(CoberturaParser.java:227)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.readClassOrMethod(CoberturaParser.java:169)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.readClassOrMethod(CoberturaParser.java:200)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.readPackage(CoberturaParser.java:137)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.readModule(CoberturaParser.java:116)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.parser.CoberturaParser.parseReport(CoberturaParser.java:94)
      at PluginClassLoader for coverage//edu.hm.hafner.coverage.CoverageParser.parse(CoverageParser.java:82)
      at PluginClassLoader for coverage//io.jenkins.plugins.coverage.metrics.steps.CoverageReportScanner.processFile(CoverageReportScanner.java:64)
      at PluginClassLoader for plugin-util-api//io.jenkins.plugins.util.AgentFileVisitor.scanFiles(AgentFileVisitor.java:116)
      at PluginClassLoader for plugin-util-api//io.jenkins.plugins.util.AgentFileVisitor.invoke(AgentFileVisitor.java:95)
      at PluginClassLoader for plugin-util-api//io.jenkins.plugins.util.AgentFileVisitor.invoke(AgentFileVisitor.java:40)
      at Jenkins v2.528.3//hudson.FilePath$FileCallableWrapper.call(FilePath.java:3590)
      at hudson.remoting.UserRequest.perform(UserRequest.java:225)
      at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      at hudson.remoting.Request$2.run(Request.java:391)
      at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:81)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      at java.base/java.lang.Thread.run(Thread.java:833)
       

      coverage version

      coverage:2.3060.v035a_5557cdb_c

            Assignee:
            Ulli Hafner
            Reporter:
            Lukas
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: