massive-oss / mcover

A cross platform code coverage framework for Haxe with testing and profiling applications. Supports AVM1, AVM2, JavaScript, C++, PHP and Neko.
Other
59 stars 9 forks source link

[Feature request] Add a LCOV coverage reporter #52

Closed cedx closed 4 years ago

cedx commented 4 years ago

Currently MCoverage.getLogger().report() prints a coverage report on the standard output.

What I want is to be able to collect coverage data and send it to the Coveralls service. So I need a way to get the coverage data instead of printing on the command line, and ideally have that coverage data formatted to LCOV (as this format is very easy to parse : see the FILES section of the provided link).

Thanks in advance.

elsassph commented 4 years ago

Hello, mcover includes a LCOV reporter client: https://github.com/massiveinteractive/mcover/blob/master/test/TestMain.hx#L33

cedx commented 4 years ago

Thanks a lot @elsassph! I have just one problem: I'm testing a Node.js program. In the repository, the LcovPrintClient class uses the condition if (sys || nodejs)... but on Haxelib, the same file uses if sys only: https://lib.haxe.org/p/mcover/2.2.1/files/mcover/coverage/client/LcovPrintClient.hx

Could you release a new version of the mcover package?

elsassph commented 4 years ago

Oh wow, this was changed 2 days after the 2.2.1 release indeed and wasn't released since.

elsassph commented 4 years ago

2.2.2 released now

cedx commented 4 years ago

It works! Merci beaucoup @elsassph. I think I've found another problem, but I need to confirm it (i.e. coverage is incomplete). Will open a new issue.

elsassph commented 4 years ago

De rien :)