Giter VIP home page Giter VIP logo

coberturaconverter's Introduction

CoberturaConverter

Build Status
Built with Nuke
NuGet MyGet

Changelog
Documentation

This package aims to provide conversion of code coverage reports to the Cobertura format. Currently, it supports OpenCover and dotCover source formats. It can be either directly used via the CoberturaConverter NuGet package, as Dangl.Nuke.CoberturaConverter for the NUKE Build system or as command line tool via CoberturaConverter.CommandLine.

This project is based on Daniel Palmes OpenCoverToCobertura Converter, which is licensed under the Apache License.

dotCover Report Types

Because the filename attribute is mandatory in the Cobertura format, dotCover reports should always be generated with the DetailedXml setting instead of the regular Xml to output filenames. Otherwise, all classes in the dotCover report that do not have a source file specified are ignored.

Referencing

If this is used in full .Net framework 4.6.1 and earlier, please add a reference to

<PackageReference Include="System.ValueTuple" Version="4.4.0" />

CI Builds

All builds are available on MyGet:

https://www.myget.org/F/dangl/api/v2
https://www.myget.org/F/dangl/api/v3/index.json

CLI Usage

You can use the converter from the command line, it is available in the CoberturaConverter.CommandLine NuGet package under /tools both for net461 and netcoreapp2.0.

CoberturaConverter.CommandLine.exe -i <InputFile> -o <OutputFile> -s <DotCover | OpenCover>
Parameter Description
-i Path to the input file
-o Path where to save the converted report to
-s Source report format, can be either DotCover or OpenCover
--help Display options

NUKE Example

The package is available as Dangl.Nuke.CoberturaConverter.

using static Nuke.CoberturaConverter.CoberturaConverterTasks;

await DotCoverToCobertura(s => s
    .SetInputFile(OutputDirectory / "coverage.xml")
    .SetOutputFile(OutputDirectory / "cobertura_coverage.xml"));

License

coberturaconverter's People

Contributors

georgdangl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jurajoss sjmelia

coberturaconverter's Issues

Crash during run of dotcover files

Hi !
I've tried to use the converter with a dotcover file, and is rewarded by the following crash:
image

I've compared the dotcover file I am using with your testfile, and they seem to have the same structure. I have also tried both the xml and detailedxml options in DotCover, and both fail the same way.

I then tried to clone your repo, and build it, but are then stopped by

image

Does it support union operation ,removing duplicate entries

Hi,

My goal is to merge two different coverage coberuta xml report , one was created with OpenCPPCoverage and the other with gcovr ( Code coverage by GNU GCC).
The issue is that on one report some files are been covered and on the other report they are not covered , but for developers it is ok that at least on one Testing program cover a file.

We have two different cobertura xml files ,
One of the xml is done by cppopencoverage and one is done by gcovr.
The me

How can I merge two xml as union ?
I have slimier files that are on different packages, If on OpenCPPCoverage xml a file was covered 100% and on the other report generated by gcovr is 0% , The merge will not point on the 100% cover. It just add the files on different package with coverage percentage.
Of course the reports are different in term of breakdown of packages.

How can I tackle such issue from your experience ?
Hope you understand my question.

Thanks

System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ...

Hello,
I am running into this error when attempting to use the conversion from a Jenkins agent with .NET 4.7.1

System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at CoberturaConverter.CommandLine.Program.<DotCoverToCobertura>d__4.MoveNext()
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine)
   at CoberturaConverter.CommandLine.Program.DotCoverToCobertura(CoberturaConverterOptions options)
   at CoberturaConverter.CommandLine.Program.<Main>d__0.MoveNext()

This is the pipeline step:
powershell '& C:\\CoberturaConverter.CommandLine.1.1.3\\tools\\net471\\CoberturaConverter.CommandLine.exe -i dotCover.xml -o cobertura.xml -s DotCover'

Any ideas what could be missing?

thanks
Sebastian

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.