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

Generating html based coverage report for haxe source code for as3 #25

Open
saana1 opened this issue Nov 22, 2013 · 1 comment
Open

Comments

@saana1
Copy link

saana1 commented Nov 22, 2013

Hi,
I ran code coverage with munit and got a report in html format. This would do well for unit test code.
But for actual haxe source code ( output is as3 swf), when I do coverage using MCover ,it simply gives the output to some swf as plain text.
I noticed that when doing coverage for cpp, it gives a output in console and I can redirect it to a text file. In this case I can have a script to generate html report from that text file. But how to do that for a swf file?
Is there a way to generate html based report similar to what munit does while running mcover on the source code? Are you planning to have any MCover release supporting this in the future?

@misprintt
Copy link
Contributor

Hi

MCover includes several different print clients but not one that exactly matches your request

  • the most common being the one tailored for munit's bespoke html format
  • the most basic ones are the print (and trace) clients that are used by CPP and flash
  • there is also an xml format adhering to the EMMA standard in mcover.coverage.client package
  • finally, it is relatively easy to write a custom one (see the custom report client example in the source)

In regards to the default behaviour in flash - this is because of Flash's limitations around writing to file or std out (as per the CPP target).

To save out a standalone file from flash, you will need some other process that can write to disk. Munit uses a temporary neko server to send results from the swf back to the munit cli. MUnit then writes these results to disk (for example the plain text summary reports per target).

One of the reasons munit only saves out summary reports is due to an old neko 1.x garbage collection bug across multiple POST requests that would usually crash munit when sending large volume of coverage data. This should no longer be an issue with neko 2.

In regards to adding this in the future - sort answer is yes. For a long time, I have wanted to update mcover to send raw coverage data to munit (to write to files) and then provide a standalone mcover CLI that generates html/xml reports from that raw data. I started a branch for this a long time ago, but never had a chance to go back to it - maybe it is about time I had another look... :)

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

No branches or pull requests

2 participants