[JIRA] (JENKINS-59308) Cobertura Code coverage all reports are showing in similar

91 views
Skip to first unread message

amila.kdam@gmail.com (JIRA)

unread,
Sep 15, 2019, 9:07:02 PM9/15/19
to jenkinsc...@googlegroups.com
Amila Gunathilake updated an issue
 
Jenkins / Bug JENKINS-59308
Cobertura Code coverage all reports are showing in similar
Change By: Amila Gunathilake
Summary: Cobertura Code coverage test results all reports are showing in similar
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

mez.pahlan@gmail.com (JIRA)

unread,
Sep 16, 2019, 2:12:02 AM9/16/19
to jenkinsc...@googlegroups.com
Mez Pahlan assigned an issue to Unassigned
Change By: Mez Pahlan
Assignee: Mez Pahlan

amila.kdam@gmail.com (JIRA)

unread,
Sep 16, 2019, 11:06:03 PM9/16/19
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Sep 17, 2019, 10:38:03 PM9/17/19
to jenkinsc...@googlegroups.com

ullrich.hafner@gmail.com (JIRA)

unread,
Sep 19, 2019, 4:49:03 AM9/19/19
to jenkinsc...@googlegroups.com
Ulli Hafner assigned an issue to Unassigned
 

Amila Gunathilake Please do not assign issues on your own.

Change By: Ulli Hafner
Component/s: code-coverage-api-plugin
Component/s: codebeamer-coverage-publisher-plugin
Component/s: codecover-plugin
Component/s: parallel-test-executor-plugin
Priority: Blocker Minor
Assignee: Ulli Hafner

amila.kdam@gmail.com (JIRA)

unread,
Sep 19, 2019, 9:08:03 PM9/19/19
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Nov 25, 2019, 7:16:02 PM11/25/19
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Nov 25, 2019, 7:31:03 PM11/25/19
to jenkinsc...@googlegroups.com

fede.evol@gmail.com (JIRA)

unread,
Nov 25, 2019, 10:00:02 PM11/25/19
to jenkinsc...@googlegroups.com
Federico Pellegrin commented on Bug JENKINS-59308
 
Re: Cobertura Code coverage all reports are showing in similar

Amila Gunathilake: sure you should add the pipeline and the coverage file that the job generates (the XMLs) to be able to get help.

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:09:03 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake updated an issue
Change By: Amila Gunathilake
Attachment: image-2019-11-27-05-39-01-561.png

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:10:03 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake updated an issue
Change By: Amila Gunathilake
Attachment: image-2019-11-27-05-39-57-752.png

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:12:02 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake commented on Bug JENKINS-59308
 
Re: Cobertura Code coverage all reports are showing in similar

Federico Pellegrin Hi, Thanks for your kind help regarding this issue. (Since I heard from nobody for past 3 months I was so worried)    Below information maybe useful for you to solve this issue.

    *  Actually currently I'm generating this Code-Coverage reports for my Unit tests (4 unit tests I have such as Performance test, Component test etc etc).  
      I'm using *Nunit (nunit3-console.exe) tool for running 04 unit tests in my .NET based web app.
      I'm running Nunit tool via *OpenCover (OpenCover.Console.exe) first by targeting my test dll/exe to run;   and  also get the ran Nunit results and OpenCover results into .xml files.   

            Below I highlighted only the open-cover generated unit test results because that result only using for generates code-coverage reports as well. 


  

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:14:03 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell] Hi, Thanks for your kind help regarding this issue. (Since I heard from nobody for past 3 months I was so worried)    Below information maybe useful for you to solve this issue.



    *  Actually currently I'm generating this Code-Coverage reports for my Unit tests (4 unit tests I have such as Performance test, Component test etc etc).  
    *  I'm using *_Nunit_* (nunit3-console.exe) tool for running 04 unit tests in my .NET based web app.
    *  I'm running Nunit tool via *_OpenCover_* (OpenCover.Console.exe) first by targeting my test dll/exe to run;   and  also get the ran Nunit results and OpenCover results into *.xml* files.   

            _Below I highlighted only the open-cover generated unit test results because that result only using for generates code-coverage reports as well._ 

!image-2019-11-27-05-39-57-752.png!
  

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:23:03 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell] Hi, Thanks for your kind help regarding this issue. (Since I heard from nobody for past 3 months I was so worried)    Below information maybe useful for you to solve this issue.


    *  Actually currently I'm generating this Code-Coverage reports for my Unit tests (4 unit tests I have such as Performance test, Component test etc etc).  

    *    **  I'm using * * _Nunit_* (nunit3-console.exe) tool for running 04 unit tests in my .NET based web app.

    *   **  I'm running Nunit tool via *_OpenCover_* (OpenCover.Console.exe) first by targeting my test dll/exe to run;   and  also get the ran Nunit results and OpenCover results into *.xml* files.   


            _Below I highlighted only the open-cover generated unit test results because that result only using for generates code-coverage reports as well._ 

!image-2019-11-27-05-39-57-752.png!
  

    *   Then I'm using _*OpenCoverToCoberturaConverter*_ tool** _**_ for converting OpenCover generated .xml results for the Cobertura styled .xml results.
!image-2019-11-27-05-53-30-796.png!

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:32:01 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell] Hi, Thanks for your kind help regarding this issue. (Since I heard from nobody for past 3 months I was so worried)    Below information maybe useful for you to solve this issue.

    *   1.  Actually currently I'm generating this Code-Coverage reports for my Unit tests (4 unit tests I have such as Performance test, Component test etc etc).  

   
*   2.     **    I'm using * * _Nunit_* (nunit3-console.exe) tool for running 04 unit tests in my .NET based web app.

   
 3.   * *       ** I'm running Nunit tool via *_OpenCover_* (OpenCover.Console.exe) first by targeting my test dll/exe to run;   and  also get the ran Nunit results and OpenCover results into *.xml* files.   


            _Below I highlighted only the open-cover generated unit test results because that result only using for generates code-coverage reports as well._ 

!image-2019-11-27-05-39-57-752.png!
  
       * *     4.   **    Then I'm using  _ * OpenCoverToCoberturaConverter _OpenCoverToCoberturaConverter_ * _ tool **   _**_  for converting OpenCover generated .xml results for the Cobertura styled .xml results.
!image-2019-11-27-05-53-30-796.png!


 

      5.    Finally, in my Jenkinsfile (declarative) I'm generating Cobertura  reports by using CoberturaPublisher Plugin as below.  (Note:  for each 04  unit test Steps in Jenkinsfile I'm using Jenkins code as below)


!image-2019-11-27-06-01-46-169.png!

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:32:03 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell] Hi, Thanks for your kind help regarding this issue. (Since I heard from nobody for past 3 months I was so worried)    Below information maybe useful for you to solve this issue.

     1.  Actually currently I'm generating this Code-Coverage reports for my Unit tests (4 unit tests I have such as Performance test, Component test etc etc).  

     2.    **    I'm using *_Nunit_ * (nunit3-console.exe) tool for running 04 unit tests in my .NET based web app.

     3.  
**      ** I'm running Nunit tool via * _OpenCover_ * (OpenCover.Console.exe) first by targeting my test dll/exe to run;   and  also get the ran Nunit results and OpenCover results into *.xml* files.   


            _Below I highlighted only the open-cover generated unit test results because that result only using for generates code-coverage reports as well._ 

!image-2019-11-27-05-39-57-752.png!
  
       **    * 4.     * *    Then I'm using  * _OpenCoverToCoberturaConverter_* tool for converting OpenCover generated .xml results for the Cobertura styled .xml results.

!image-2019-11-27-05-53-30-796.png!

 

      5.    Finally, in my Jenkinsfile (declarative) I'm generating Cobertura  reports by using CoberturaPublisher Plugin as below.  (Note:  for each 04  unit test Steps in Jenkinsfile I'm using Jenkins code as below)


!image-2019-11-27-06-01-46-169.png!

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:33:02 PM11/26/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell] Hi, Thanks for your kind help regarding this issue. (Since I heard from nobody for past 3 months I was so worried)    Below information maybe useful for you to solve this issue.

     1.  Actually currently I'm generating this Code-Coverage reports for my Unit tests (4 unit tests I have such as Performance test, Component test etc etc).  

     2.   I'm using *_Nunit_ (nunit3-console.exe) tool for running 04 unit tests in my .NET based web app.

     3.   
**  I'm running Nunit tool via _OpenCover_ (OpenCover.Console.exe) first by targeting my test dll/exe to run;   and  also get the ran Nunit results and OpenCover results into *.xml * files.   


            _Below I highlighted only the open-cover generated unit test results because that result only using for generates code-coverage reports as well._ 

!image-2019-11-27-05-39-57-752.png!
  
          *4.*   Then I'm using _OpenCoverToCoberturaConverter_* tool for converting OpenCover generated .xml results for the Cobertura styled .xml results.

!image-2019-11-27-05-53-30-796.png!

 

      5.    Finally, in my Jenkinsfile (declarative) I'm generating Cobertura  reports by using CoberturaPublisher Plugin as below.  (Note:  for each 04  unit test Steps in Jenkinsfile I'm using Jenkins code as below)

!image-2019-11-27-06-01-46-169.png!

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:34:02 PM11/26/19
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:34:04 PM11/26/19
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Nov 26, 2019, 7:35:03 PM11/26/19
to jenkinsc...@googlegroups.com

I attached my Jenkins file also.  Federico Pellegrin was this information helpful?  If you need more info please ping me anytime.

fede.evol@gmail.com (JIRA)

unread,
Nov 27, 2019, 2:27:03 AM11/27/19
to jenkinsc...@googlegroups.com

I reproduced your situation locally on a small example.

The problem is that each time you call the CoberturaPublisher it will overwrite the previous data, as it always works on the same file (coverage.xml), so it wasn't really thought of having multiple calls in the same job.

I see two solutions:

1) You have to publish them all together just once at the end. In that case if you specify multiple files they will be correctly merged (assuming it is fine for you that they get merged). So you will have just one final step like:

 

                            step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml']) 

Which gets them and publishes them all in a single coverage step.

 

2) Change to the newer and more advanced coverage plugin code-coverage-api-plugin that supports multiple reports. Each line will then be something like (once the plugin is installed):

                    publishCoverage adapters: [coberturaAdapter(path: '**/build/Tests/NunitFast/Cobertura.xml')]

I would suggest the second one, as that new plugin has also other goodies (ie. pipeline integration) and is more actively developed, but of course up to you to decide. Of course one could also file a bug to the cobertura plugin but given the new plugin I'm not sure someone will take the task to generalize the publishing of more reports in the same job.

 

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:50:03 PM11/27/19
to jenkinsc...@googlegroups.com

Federico Pellegrin  Thanks for the reply. 

Before try the second option I have a question about your first option - (Merging all 4 different Cobertura.xml files into a one file)

So here I'm using 4 Cobertura.xml files but in different 4 locations as well;  such as for NunitFast test the location is '*/build/Tests/NunitFast/Cobertura.xml'. For NunitSlow test the location is '*/build/Tests/NunitSlow/Cobertura.xml'  like that. 

If you could open the below attached my entire Jenkinsfile  you will see it. 

So in that case how could I merge those 4 files in 4 different folder locations as per your given code?

step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml'])

So am I correct here or you may aware about that situation before ?  Sorry, I couldn't tell you that before that I'm having 4 different folder locations for Cobertura.xml.

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:50:03 PM11/27/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Thanks for the reply. 


Before try the second option I have a question about your first option - (Merging all 4 different Cobertura.xml files into a one file)

So here I'm using 4 Cobertura.xml files but in different 4 locations as well;  such as for NunitFast test the location is '* * /build/Tests/NunitFast/Cobertura.xml'. For NunitSlow test the location is  * '**/build/Tests/NunitSlow/Cobertura.xml'  like that. 


If you could open the below attached my entire Jenkinsfile  you will see it. 


So in that case how could I merge those 4 files in 4 different folder locations as per your given code?
{code:java}
step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/
{color:#FF0000} ** {color} / {color:#FF0000} Cobertura.xml {color} ']) {code}


So am I correct here or you may aware about that situation before ?  Sorry, I couldn't tell you that before that I'm having 4 different folder locations for Cobertura.xml.

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:51:03 PM11/27/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Thanks for the reply. 

Before try the second option I have a question about your first option - (Merging all 4 different Cobertura.xml files into a one file)

So here I'm using 4 Cobertura.xml files but in different 4 locations as well;  such as for NunitFast test the location is ' * /build/Tests/NunitFast/Cobertura.xml'. For NunitSlow test the location is * '**/build/Tests/NunitSlow/Cobertura.xml'  like that. 


If you could open the below attached my entire Jenkinsfile  you will see it. 

So in that case how could I merge those 4 files in 4 different folder locations as per your given code?
{code:java}
step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml']){code}

So am I correct here or you may aware about that situation before ?  Sorry, I couldn't tell you that before that I'm having 4 different folder locations for Cobertura.xml.

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:51:03 PM11/27/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Thanks for the reply. 

Before try the second option I have a question about your first option - (Merging all 4 different Cobertura.xml files into a one file)

So here I'm using 4 Cobertura.xml files but in different 4 locations as well;  such as for * NunitFast * test the location is '/build/Tests/ * NunitFast * /Cobertura.xml'.         For  * NunitSlow * test the location is * *   * '**/build/Tests/ * NunitSlow * /Cobertura.xml'  like that. 


If you could open the below attached my entire Jenkinsfile  you will see it. 

So in that case how could I merge those 4 files in 4 different folder locations as per your given code?
{code:java}
step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml']){code}
So am I correct here or you may aware about that situation before ?  Sorry, I couldn't tell you that before that I'm having 4 different folder locations for Cobertura.xml.

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:52:03 PM11/27/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Thanks for the reply. 

Before try the second option I have a question about your first option - (Merging all 4 different Cobertura.xml files into a one file)

So here I'm using 4 Cobertura.xml files but in different 4 locations as well;  such as for *NunitFast* test the location is '/build/Tests/*NunitFast*/Cobertura.xml'.                            For *NunitSlow* test the location is  *  * '**/build/Tests/*NunitSlow*/Cobertura.xml'  like that. 


If you could open the below attached my entire Jenkinsfile  you will see it. 

So in that case how could I merge those 4 files in 4 different folder locations as per your given code?
{code:java}
step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml']){code}
So am I correct here or you may aware about that situation before ?  Sorry, I couldn't tell you that before that I'm having 4 different folder locations for Cobertura.xml.

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:52:04 PM11/27/19
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:53:02 PM11/27/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Thanks for the reply. 

Before try the second option I have a question about your first option - (Merging all 4 different Cobertura.xml files into a one file)

So here I'm using 4 Cobertura.xml files but in different 4 locations as well;  such as for *NunitFast* test the location is '/build/Tests/*NunitFast*/Cobertura.xml'.   For *NunitSlow* test the location is  
*  *
'**/build/Tests/*NunitSlow*/Cobertura.xml'  like that. 


If you could open the below attached my entire Jenkinsfile  you will see it. 

So in that case how could I merge those 4 files in 4 different folder locations as per your given code above ?

{code:java}
step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml']){code}
So am I correct here or you may aware about that situation before ?  Sorry, I couldn't tell you that before that I'm having 4 different folder locations for Cobertura.xml.

amila.kdam@gmail.com (JIRA)

unread,
Nov 27, 2019, 8:53:03 PM11/27/19
to jenkinsc...@googlegroups.com

fede.evol@gmail.com (JIRA)

unread,
Nov 28, 2019, 12:28:02 AM11/28/19
to jenkinsc...@googlegroups.com

Sure I saw you were doing 4 of them, that's what triggers the problem in the first place

 

So the:

step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/**/Cobertura.xml'])

Is correct as it will search for all of them, since the second asterisk-asterisk pattern will iterate through all of them.

 

Of course if you prefer you can also be more explicit with:

step([$class: 'CoberturaPublisher', coberturaReportFile: '**/build/Tests/NunitFast/Cobertura.xml,**/build/Tests/NUnitTestsUpdateCws/Cobertura.xml,**/build/Tests/NUnitTestsSlow/Cobertura.xml,**/build/Tests/PerformanceTests/Cobertura.xml'])

 

amila.kdam@gmail.com (JIRA)

unread,
Dec 3, 2019, 7:37:02 PM12/3/19
to jenkinsc...@googlegroups.com

Federico Pellegrin  Hi mate how are you?

I have tested this your second solution, by using code-coverage-api-plugin I able to generate 04 different reports. 

So I renamed my Cobertura.xml file by 04 different names in each stage's Post build section in my Jenkins file. 

publishCoverage adapters: [coberturaAdapter(path: '**/build/Tests/NunitFast/NUnitTestsSlow_Test_Report.xml')]

 

*  Below is the my output:

 

amila.kdam@gmail.com (JIRA)

unread,
Dec 3, 2019, 7:42:02 PM12/3/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Hi mate how are you?

I have tested this your second solution, by using [code-coverage-api-plugin|https://github.com/jenkinsci/code-coverage-api-plugin] I able to generate 04 different reports. 

So I renamed my Cobertura.xml file by 04 different names in each stage's Post build section in my Jenkins file. 
Like below 


{code:java}
publishCoverage adapters: [coberturaAdapter(path: '**/build/Tests/NunitFast/NUnitTestsSlow_Test_Report.xml')]{code}

 

*  Below is the my output:



  !image-2019-12-04-06-12-09-697.png!!image-2019-12-04-06-11-58-349.png!

amila.kdam@gmail.com (JIRA)

unread,
Dec 3, 2019, 7:44:01 PM12/3/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Hi mate how are you?

I have tested this your second solution, by using [code-coverage-api-plugin|https://github.com/jenkinsci/code-coverage-api-plugin] I able to generate 04 different reports. 

So I renamed my Cobertura.xml file by 04 different names in each stage's Post build section in my Jenkins file.  Like below ,  

{code:java}
publishCoverage adapters: [coberturaAdapter(path: '**/build/Tests/NunitFast/NUnitTestsSlow_Test_Report.xml')]{code}
 

*  Below is the my output:

  !image-2019-12-04-06-12-09-697.png!


!image-2019-12-04-06- 11 13 - 58 35 - 349 714 .png!

 

Its

 

 

amila.kdam@gmail.com (JIRA)

unread,
Dec 3, 2019, 7:46:03 PM12/3/19
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
[~fedepell]  Hi mate how are you?

I have tested this your second solution, by using [code-coverage-api-plugin|https://github.com/jenkinsci/code-coverage-api-plugin] I able to generate 04 different reports. 

So I renamed my Cobertura.xml file by 04 different names in each stage's Post build section in my Jenkins file.  Like below, 
{code:java}
publishCoverage adapters: [coberturaAdapter(path: '**/build/Tests/NunitFast/NUnitTestsSlow_Test_Report.xml')]{code}
 

*  Below is the my output:

  !image-2019-12-04-06-12-09-697.png!

!image-2019-12-04-06-13-35-714.png!

 

Its It's really better output than my previous reports.  Thank you for that.  So do you know how to rename the Title of the reports ?  Because it showing my .xml file name as the report heading.

eg:
!image-2019-12-04-06-15-47-865.png!

 

 


 

fede.evol@gmail.com (JIRA)

unread,
Dec 3, 2019, 11:54:02 PM12/3/19
to jenkinsc...@googlegroups.com

As of now there is no possibility to customize that name label, it will just pick the filename (with some minor filtering of characters), sorry!

ullrich.hafner@gmail.com (JIRA)

unread,
Dec 4, 2019, 1:23:02 AM12/4/19
to jenkinsc...@googlegroups.com

Amila Gunathilake You can create a feature request in Jira for the code-coverage-api-plugin. Maybe they can reuse the same concepts as the warnings plugin: using a id and name property.

ullrich.hafner@gmail.com (JIRA)

unread,
Dec 4, 2019, 1:24:02 AM12/4/19
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-59308
[~amila_devops] You can create a feature request in Jira for the code-coverage-api-plugin. Maybe they can reuse the same concepts as the warnings plugin: using a an *id* and *name* property.

ullrich.hafner@gmail.com (JIRA)

unread,
Dec 4, 2019, 1:46:02 AM12/4/19
to jenkinsc...@googlegroups.com
Ulli Hafner edited a comment on Bug JENKINS-59308
[~amila_devops] - You can create a feature request in Jira for the code - coverage -api- plugin. Maybe they can reuse the same concepts as the warnings plugin: using an *id* and *name* property. -

See JENKINS-51367.

amila.kdam@gmail.com (JIRA)

unread,
Dec 4, 2019, 9:00:04 PM12/4/19
to jenkinsc...@googlegroups.com

hi Federico Pellegrin it's okay no worries.  And one thing do you guys have any Tutorial or any Doc with information to operate these reports and how to read these reports ? 

Thanks again.

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:42:02 PM1/10/20
to jenkinsc...@googlegroups.com

hi Federico Pellegrin, Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls from including to this code-coverage reports, such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here.  Such I changed my code for as below. But it doesn't work for me to exclude the packages.

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:53:02 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls
(eg: dapper.dll) from including to this code-coverage reports , such ; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports . So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here
. ?   Such as when I changed running my code for as below RunTests . But it doesn't work ps1 script for me unit testing can I add some code to exclude the packages dapper . dll file in below code ? {color:#FF0000} This example is not worked. :({color}


{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:53:03 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#
FF0000 ff0000 } This example is not worked. :({color}


{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:54:04 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :({color}

{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:56:02 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :(


{color :#172b4d } Normal Code:{color}
{
color}
{
code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --
result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
{color:#ff0000} {color}

{color:#172b4d}Code I want for Exclude dapper.dll:{color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --
exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:56:03 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :(

{color:#172b4d}
 
Normal Code:{color}{color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}


 


 

{color:#172b4d}

Code I want for Exclude dapper.dll: {color}

 
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:56:03 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :(


{color:#172b4d}Normal Code:{color}
{color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
{color:#ff0000}
  {color}

 

{color:#172b4d}Code I want for Exclude dapper.dll:{color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:57:04 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :(

    {color:#172b4d}   Normal Existing Code:{color}{color}

{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
Code I want for Exclude dapper.dll:

 
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:57:04 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :( .

   {color:#172b4d}Existing Code:{color}{color}

{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
 

 

Code I want for Exclude dapper.dll:

 
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:58:02 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} {color:#172b4d} This example is not worked. :(. {color}

    {color:#172b4d}     Existing Code:{color}{color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
 

 

Code I want for Exclude dapper.dll:
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 7:59:02 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi [~fedepell], Hi mate hope you doing good?

I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000}
{color:#172b4d} This example is not worked. :(.{color}


{color:#172b4d}   Existing Code:{color} {color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
 

 

example: Code I want for Exclude dapper.dll:

{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

amila.kdam@gmail.com (JIRA)

unread,
Jan 10, 2020, 9:19:04 PM1/10/20
to jenkinsc...@googlegroups.com
Amila Gunathilake edited a comment on Bug JENKINS-59308
hi FYI  [~fedepell], [~stephenconnolly] 

Hi mate [~fedepell] hope you doing good?


I just want one thing to make sure. I wanted to exclude some dlls (eg: dapper.dll) from including to this code-coverage reports; Such as in my source code their are dlls I don't want to use for use as packages for Code-Coverage reports. So when generating my unit tests Code-Coverage reports how can I exclude those dll files?

Is their any code to exclude dll files in here?  Such as when I running my RunTests.ps1 script for unit testing can I add some code to exclude dapper.dll file in below code ? {color:#ff0000} This example is not worked. :(.{color}


{color:#172b4d}   Existing Code:{color}
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}
 

 

example: Code I want for Exclude dapper.dll:
{code:java}
.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll --exclude dapper.dll --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"  
{code}

fede.evol@gmail.com (JIRA)

unread,
Jan 10, 2020, 11:47:02 PM1/10/20
to jenkinsc...@googlegroups.com

What you are trying to do is to tell your tool (OpenCover ?) to filter them and that totally depends on your tool. I sincerely don't know much about OpenCover and never used it, but looking at the usage page I don't see an --exclude option as by your example but see some {{-excludebyfile.}}Maybe that is what you are looking for!

 

On the other side, on Jenkins coverage plugin side, such a filtering feature right now is not present. You may in case try to request it at the plugin page, but given that usually the tools generating the reports can do this it is maybe not something very interesting for the plugin itself.

fede.evol@gmail.com (JIRA)

unread,
Jan 10, 2020, 11:48:02 PM1/10/20
to jenkinsc...@googlegroups.com
Federico Pellegrin edited a comment on Bug JENKINS-59308
What you are trying to do is to tell your tool (OpenCover ?) to filter them and that totally depends on your tool. I sincerely don't know much about OpenCover and never used it, but looking at the [usage page|https://github.com/opencover/opencover/wiki/Usage] I don't see an
{code:java}
--exclude {code}
option as by your example but see some
{ { code:java}
- - excludebyfile . {code } }
.
Maybe that is what you are looking for!


 

On the other side, on Jenkins coverage plugin side, such a filtering feature right now is not present. You may in case try to request it at the plugin page, but given that usually the tools generating the reports can do this it is maybe not something very interesting for the plugin itself.

amila.kdam@gmail.com (JIRA)

unread,
Jan 13, 2020, 7:43:02 PM1/13/20
to jenkinsc...@googlegroups.com
Amila Gunathilake updated an issue
 
Jenkins / Bug JENKINS-59308
Change By: Amila Gunathilake
Attachment: image-2020-01-14-06-13-43-821.png

amila.kdam@gmail.com (JIRA)

unread,
Jan 13, 2020, 8:02:03 PM1/13/20
to jenkinsc...@googlegroups.com
Amila Gunathilake updated an issue
Change By: Amila Gunathilake
Attachment: image-2020-01-14-06-32-26-863.png

amila.kdam@gmail.com (JIRA)

unread,
Jan 13, 2020, 8:03:03 PM1/13/20
to jenkinsc...@googlegroups.com
Amila Gunathilake commented on Bug JENKINS-59308
 
Re: Cobertura Code coverage all reports are showing in similar

hi Federico Pellegrin  actually here what I want is exclude this Dapper Packages (which is Dapper.dll)  from generating my  NunitFast Code coverage reports.  eg:

So I changed my code as you suggested.  But after I include  -excludebyfile or -filter like below to exclude Dapper packages I'm getting zero Code coverage output in NunitFast unit test reports.

my new code is below:

.$Opencover\OpenCover.Console.exe -target:"$NUNIT\nunit3-console.exe" -targetargs:".\Tests\NunitFast\NUnitTestsFast\$CONFIGURATION\net47\ServiceTestFast.dll -excludebyfile:-[Dapper*] --result=.\Tests\NunitFast\upstream-corewebservice-nunit-result.xml" -output:".\Tests\NunitFast\opencover-upstream-corewebservice-nunit-result.xml" -register:"user"

even I tried with -filter option as well but I'm still get the below results which is zero output, I think these filtering options are only for exclude class or methods, but here we going to exclude an entire package (Dapper.dll),  so is that why I'm getting below crazy out-put ? 

Could you suggest something new Federico Pellegrin ?

Thanks  ! 

amila.kdam@gmail.com (JIRA)

unread,
Jan 17, 2020, 7:07:02 PM1/17/20
to jenkinsc...@googlegroups.com

amila.kdam@gmail.com (JIRA)

unread,
Jan 29, 2020, 7:05:03 PM1/29/20
to jenkinsc...@googlegroups.com
 
Re: Cobertura Code coverage all reports are showing in similar

hi guys any idea about my above last comment ?  I just want to exclude Dapper dll/package  from the report.  So far its not working and when I exclude as you suggested it shows no any data in the report. 

Federico Pellegrin, Stephen Connolly  redsoloAndrew Bayer   Please help me on this. I got no reply since months.

Thanks
Amila
Jenkins Customer

ullrich.hafner@gmail.com (JIRA)

unread,
Jan 30, 2020, 2:53:03 AM1/30/20
to jenkinsc...@googlegroups.com

You are asking the wrong persons, please try to get help from the NUnit team. Jenkins just reports the results: you need to configure your coverage tool accordingly. (And an issue tracker probably is the wrong place for a discussion about tool configurations as well)

Reply all
Reply to author
Forward
0 new messages