Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XML coverage format output by "mprof-report" #74

Closed
peteroupc opened this issue Nov 26, 2016 · 8 comments
Closed

Support XML coverage format output by "mprof-report" #74

peteroupc opened this issue Nov 26, 2016 · 8 comments

Comments

@peteroupc
Copy link

peteroupc commented Nov 26, 2016

Report Generator should support the XML format output by the relatively new Mono report reader mprof-report (read more on mprof-report and the Mono profiler). The following shows what the XML format looks like:

<?xml version="1.0"?>
<coverage version="0.3">
	<assembly name="Example" guid="..." filename="..." method-count="266" full="15" partial="0"/>
		<class name="Example.ExampleClass" method-count="8" full="2" partial="0"/>
	<assembly name="Example2" guid="..." filename="..." method-count="266" full="15" partial="0"/>
		<class name="Example2.ExampleClass2" method-count="8" full="2" partial="0"/>
	<method assembly="Example" class="Example.ExampleClass" name="ExampleMethod (string)" filename="..." token="100664465">
		<statement offset="0" counter="1" line="1" column="1"/>
		<statement offset="0" counter="1" line="7263" column="0"/>
	</method>
</coverage>

@danielpalme
Copy link
Owner

Hi @peteroupc

I have two test projects:
https://github.com/danielpalme/ReportGenerator/tree/master/ReportGenerator.Testprojects/CSharp/Project
https://github.com/danielpalme/ReportGenerator/tree/master/ReportGenerator.Testprojects/FSharp/Project

If you could compile them and execute them withmprof-report and send me the resulting XML files, I can do the implementation of the parser.

@peteroupc
Copy link
Author

peteroupc commented Nov 27, 2016 via email

@peteroupc
Copy link
Author

Apparently, GitHub might not have accepted the XML attachment. In case you didn't receive the XML, I try again by attaching the ZIP-compressed version of the XML file.

report.zip

@danielpalme
Copy link
Owner

Thanks for the report. I will have a look at it within the next 1-2 weeks.

@danielpalme
Copy link
Owner

One question regarding your sample report:
Some <method /> elements have an empty filename attribute.
Did you accidentally delete the full filename or was it empty before?

@peteroupc
Copy link
Author

peteroupc commented Nov 28, 2016 via email

@danielpalme
Copy link
Owner

Please have a look at this beta release:
https://www.nuget.org/packages/ReportGenerator/2.5.2-beta2

I added support for mprof-report. The XML file generated by mbprof is very basic. It only contains lines in methods that have been executed at least once. So your line coverage results are probably not very accurate.

@peteroupc
Copy link
Author

It works well for my purposes. Thanks for supporting this XML format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants