Hi Ilya, thanks for the report! mix test.coverage is dependent on how the default coverage tool exports data. We cannot aggregate coverage reports from random tools because we don't know how these tools export their results. Therefore, it is up to these tools to do two changes:
1. Respect the :export option in their coverage tool 2. Provide their own mix task that aggregate the results So please reach out to them and consider sending pull requests so they make this feature available, Thank you! On Wed, Nov 11, 2020 at 10:59 PM Ilya Borovitinov <[email protected]> wrote: > Hello! > > Today I encountered a problem when trying to set up testing + coverage for > the new Elixir project with Elixir 1.11. > > We are using Gitlab as our source control and CI, and Gitlab can display > covered lines if you were to provide coverage in the Cobertura XML format. > That's all good, and Elixir/Erlang ecosystem even has `covertool` > <https://github.com/covertool/covertool> package for this purpose. > > I have an umbrella project with 3 apps currently, and so I read in the > release notes that I could use `mix test` with `--export-coverage` flag to > collect coverage from each app and then compile them with `mix > test.coverage`. That's awesome. > > Here's the problem though: `mix test` calls upon the specified tool to > process coverage data, but `mix test.coverage` just generates HTML, so we > cannot use any tools to properly compile and process coverage data across > all apps (or partitions). Basically, I feel that there shouldn't be such a > discrepancy in usage between these two commands. > > With great admiration for the language, > Ilya Borovitinov > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/848b4145-ef5e-48fa-863f-d0fb65f2a8cfn%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/848b4145-ef5e-48fa-863f-d0fb65f2a8cfn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KA06mev%3DXu%2B%3Dt%3DSoK8UOe571xnkU5PDQ4U37MadQ4PXQ%40mail.gmail.com.
