Coder Social home page Coder Social logo

Comments (18)

danielpalme avatar danielpalme commented on August 20, 2024

I don't fully understand your question.
ReportGenerator is not able to process .coverage files. You have to convert it to XML first. This can be done in Visual Studio or with a little custom tool (see https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools)

from reportgenerator.

sudhirsomu avatar sudhirsomu commented on August 20, 2024

I am trying to convert into XML by using "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe" analyze /output:DynamicCodeCoverage.coveragexml DynamicCodeCoverage.coverage command. But no output XML file is generated. When I check using event viewer application I am getting "corrupt coverage file" error. But coverage file is not corrupted because I am able to open and view it properly in VS.

from reportgenerator.

danielpalme avatar danielpalme commented on August 20, 2024

Please try to load the file in VS and then use the export in the coverage window. Does this file work?

from reportgenerator.

sudhirsomu avatar sudhirsomu commented on August 20, 2024

Yes. It works when I do in VS. But when I run analyze command to convert it isn't working

from reportgenerator.

danielpalme avatar danielpalme commented on August 20, 2024

Then CodeCoverage.exe is the wrong tool for your *.coverage file.

You can try this approach:
https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe

from reportgenerator.

sudhirsomu avatar sudhirsomu commented on August 20, 2024

It works thanks :). But what is the reason?? The issue I want to raise is codecoverage.exe does not throw any error message in this case. We can find only using event finder. Can that feature be added??

from reportgenerator.

danielpalme avatar danielpalme commented on August 20, 2024

I'm sorry, but codecoverage.exe is not my tool.
Microsoft has (unfortunately) two tools for code coverage (vstest.console.exe and CodeCoverage.exe).
Both tools create *.coverage files, but with different content. So you have to use the corresponding tool for conversion into XML.

ReportGenerator only processes XML files and you are responsible for providing the correct input.

from reportgenerator.

akhilmanoharan avatar akhilmanoharan commented on August 20, 2024

I am facing the same issue again while trying to get an xml output file. can someone tell me if i am missing something.

from reportgenerator.

danielpalme avatar danielpalme commented on August 20, 2024

Can you supply some details? What kind of file do you have right now? How was this file generated?

from reportgenerator.

akhilmanoharan avatar akhilmanoharan commented on August 20, 2024

hi Danielpalme , thanks for the reply. I have created .coverage file using vsperfcmd -start:coverage and trying to convert into the xml using the dynamic converter but its not throwing me the output file.
ia m doing
CodeCoverage.exe collect /output:DynamicCodeCoverage.coverage VisualCoverage.exe
CodeCoverage.exe analyze /output:DynamicCodeCoverage.coveragexml DynamicCodeCoverage.coverage

from reportgenerator.

danielpalme avatar danielpalme commented on August 20, 2024

I have worked with vstest.console.exe and CodeCoverage.exe. I not sure what output format is used by vsperfcmd.
Have you tried the first approach for vstest.console.exe, perhaps this format is compatible with vsperfcmd:
https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe

from reportgenerator.

akhilmanoharan avatar akhilmanoharan commented on August 20, 2024

is vstest.console.exe also tracks the processs and creates .coverage file?

from reportgenerator.

danielpalme avatar danielpalme commented on August 20, 2024

Yes vstest.console.exe is able to track coverage.

"c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "PATH_OF_YOUR_EXECUTABLE_OR_DLL" /InIsolation /EnableCodeCoverage

See
https://github.com/danielpalme/ReportGenerator/wiki/Visual-Studio-Coverage-Tools#vstestconsoleexe

from reportgenerator.

akhilmanoharan avatar akhilmanoharan commented on August 20, 2024

Thanks danielpalme . let me try this option

from reportgenerator.

fsureau avatar fsureau commented on August 20, 2024

Hi @akhilmanoharan , any update on your problem? I'm facing the same issue.

from reportgenerator.

akhilmanoharan avatar akhilmanoharan commented on August 20, 2024

from reportgenerator.

fsureau avatar fsureau commented on August 20, 2024

I had the same error message but not the same root cause I think, I was interested to hear all the problems to understand what the system is doing.

In fact, I was not able to "merge" coverage files, but generating the xml works. So I was able to do it in another way (CoverageInfo.Join, then generate XML).

from reportgenerator.

wilbe2013 avatar wilbe2013 commented on August 20, 2024

Hello

Hi Florian , I have got a solution for this and now i am able to find out the coverage for my processes. If you are interested for a diff way of solution to this i can help you.

On Mon, Nov 26, 2018 at 1:59 PM Florian Sureau @.***> wrote: Hi @akhilmanoharan https://github.com/akhilmanoharan , any update on your problem? I'm facing the same issue. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#29 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AcEfy4REvvoOflEn4ybi6HVyLoqaMy0oks5uy6Z9gaJpZM4GVclR .
-- akie

Hi @akhilmanoharan, i see that this discusion come from nov 2018, but today i have this problems. Do you have one solution to convert .coverage file generated by vsperfcmd to .xml file? can you explain or help us how resolve this?

from reportgenerator.

Related Issues (20)

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.