alfert / coverex

Coverage Reports for Elixir
Other
101 stars 26 forks source link

Summary report after test run #19

Closed cjimison closed 8 years ago

cjimison commented 8 years ago

This is a small feature request which would be great:

In excoveralls (link https://github.com/parroty/excoveralls) they have a nice feature that when a test is completed it will print out a summary report like so:

$ MIX_ENV=test mix coveralls
...
----------------
COV    FILE                                        LINES RELEVANT   MISSED
100.0% lib/excoveralls/general.ex                     28        4        0
 75.0% lib/excoveralls.ex                             54        8        2
 94.7% lib/excoveralls/stats.ex                       70       19        1
100.0% lib/excoveralls/poster.ex                      16        3        0
 95.5% lib/excoveralls/local.ex                       79       22        1
100.0% lib/excoveralls/travis.ex                      23        3        0
100.0% lib/mix/tasks.ex                               44        8        0
100.0% lib/excoveralls/cover.ex                       32        5        0
[TOTAL]  94.4%
----------------

This is nice for day to day testing because you can see your coverage increasing as you add tests without having to goto a web browsers. We like the visual reports coverex currently provides better, but it was the one feature some on our team thought was nice about excoveralls.

As a super nice to have would be to print this report out as a json or csv file so our build systems can parse this and report a build as a failure if test coverage drops bellow a pre-defined threshold.

Thanks,

-Chris

alfert commented 8 years ago

This has a strong relationship with #2

alfert commented 8 years ago

Could you give the current HEAD a try? Console output is available.

cjimison commented 8 years ago

Pulled it and it looks great!

-Chris

On Nov 12, 2015, at 2:04 PM, Klaus Alfert notifications@github.com wrote:

Could you give the current HEAD a try? Console output is available.

— Reply to this email directly or view it on GitHub https://github.com/alfert/coverex/issues/19#issuecomment-156250332.

alfert commented 8 years ago

Console output is available now in release 1.4.7 on hex.pm.

Json or other file formats are handled in #2, as a workaround the coveralls option write a json file but only if running under travis-ci. I should change this :-)