Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Best way to publish Coverage results with Jenkins CI
Otometrics
#1 Posted : Monday, May 28, 2018 2:26:47 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/1/2015(UTC)
Posts: 3
Location: Denmark

I use the console tool as part of our Jenkins driven CI process, and want to publish the coverage results from NCrunch.
It appears as I either can publish the HTML report only, but I would to show everything including drill-down to uncovered lines of code.

Is your report format or data compatible with other coverage tools (like for instance Emma or Cobertura) then I could use their plugin's as publishers, or are you aware of any tools that can convert NCrunch report to one which is recognized by a Jenkins coverage reporting plugin.

Br
Jens Brejner
Remco
#2 Posted : Monday, May 28, 2018 11:35:50 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Jens,

Thanks for posting!

Right now, all we have is the contents of the console tool's results directory. The coverage export file in this directory likely won't be compatible with any of the other tools that you use. The reason for this is because NCrunch's coverage data is flatly stored by source file documents and line numbers, rather than by methods and instructions. This makes it problematic for us to export the data in a way that is compatible with other tools.

We're looking at ways of doing this as we progress with work on the console tool. For the time being, unfortunately you'll be limited to the HTML report for viewing your coverage unless you write a custom parser for the XML export.
Otometrics
#3 Posted : Tuesday, May 29, 2018 6:32:00 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/1/2015(UTC)
Posts: 3
Location: Denmark

Hi Remco.
Thank you for your reply.
It could be an option for me to write my own parser / converter, so the results can be presented in Jenkins. I will take a look at what it would require.
Br
Jens
Otometrics
#4 Posted : Tuesday, May 29, 2018 12:42:46 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/1/2015(UTC)
Posts: 3
Location: Denmark

Hi Remco.
Now I how been messing around a bit, and I will suggest that you try to contact Daniel who is authoring this tool https://github.com/danielpalme/ReportGenerator, then NCrunch could come on the list AND NCrunch would become even more attractive for Jenkins CI users, because we would get at reasonable way of publishing NCrunch results.

Br
Jens
Remco
#5 Posted : Tuesday, May 29, 2018 11:39:46 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Jens,

Unfortunately, for this to work, we'd first need to find a way to extract the results from the engine by method/class rather than by source file. This is where the hard part is :) Once we have that in place, I don't expect it will be difficult to support a range of different coverage formats.
jonas
#6 Posted : Monday, September 3, 2018 2:18:14 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2018(UTC)
Posts: 7
Location: Denmark

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
@Remco is this something you are actively looking into adding? It would be very useful to have code coverage in another format.
Remco
#7 Posted : Tuesday, September 4, 2018 1:17:48 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
jonas;12609 wrote:
@Remco is this something you are actively looking into adding? It would be very useful to have code coverage in another format.


Hi. Perhaps we might be able to implement this in the long term, but being totally honest with you, I don't see this appearing in the next 6-12 months.
1 user thanked Remco for this useful post.
jonas on 9/5/2018(UTC)
jonas
#9 Posted : Wednesday, September 5, 2018 5:44:56 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 8/6/2018(UTC)
Posts: 7
Location: Denmark

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Remco;12612 wrote:
jonas;12609 wrote:
@Remco is this something you are actively looking into adding? It would be very useful to have code coverage in another format.


Hi. Perhaps we might be able to implement this in the long term, but being totally honest with you, I don't see this appearing in the next 6-12 months.


@Remco Thanks for the honest reply! I totally understand.
1 user thanked jonas for this useful post.
Remco on 9/5/2018(UTC)
Regenhardt
#8 Posted : Monday, December 7, 2020 6:42:56 AM(UTC)
Rank: Member

Groups: Registered
Joined: 4/5/2019(UTC)
Posts: 20
Location: Germany

Thanks: 6 times
Was thanked: 1 time(s) in 1 post(s)
Remco;12612 wrote:
jonas;12609 wrote:
@Remco is this something you are actively looking into adding? It would be very useful to have code coverage in another format.


Hi. Perhaps we might be able to implement this in the long term, but being totally honest with you, I don't see this appearing in the next 6-12 months.


Good morning,

this was a bit over two years ago, can we make a custom export yet?
Or maybe a text output in the log going "Coverage: 93%"?

Greetings,
Marlon Regenhardt
Remco
#10 Posted : Monday, December 7, 2020 11:38:02 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 930 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Marion,

We haven't implemented specifically this feature, but we have done something similar that perhaps you could adapt for your needs.

As of v4.5, NCrunch is now able to export code coverage data in partcover format. You can export this using the export button on the Tests Window toolbar, and it is also automatically exported by the NCrunch console tool.

The partcover file contains the coverage data in IL sequence point form, so it's aligned with the basic method/class structure. I would hope it should be relatively simple to write a tool that can read from this file and translate it to whatever format you need.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.065 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download