
You can submit that file to your codecov account by e.g. You will end up having a coverage.json file in your workspace root - or wherever you run your tests. MCoverage.getLogger().addClient(new CodecovJsonPrintClient()) Just add CodecovJsonPrintClient to your main test class, just before calling run on your TestRunner instance, e.g.:

Luckily there are two additional reporters (or print clients) that you can use to get coverage results into a more manageable form: While a list in a console window gives you at least some hints on how to improve your coverage, it’s not really that nice and easy to work with. Usually mcover just prints out coverage results to your console, either in a summary or a more detailed report including a list of each branch that wasn’t covered. I have no knowledge on how well mcover plays with test frameworks other than munit, so everything in here might apply only to people using munit for their tests. It was almost three years ago that checkstyle started recording coverage on codecov.io using a similar setup to what I’m going to showcase here. We run tests from those test.hxml files rather than using munit’s command line tool.

Each project has a test.hxml that references both libraries and enables coverage macros. Let me get you covered - at least some of you.įormatter, tokentree and checkstyle all use munit and mcover to run tests and collect coverage results.

Now that there is a test explorer for VSCode you probably wonder is there a way to somehow show coverage results in VSCode? Edit: I’ve updated the title to indicate post contains a solution despite the question mark
