To explain what I mean: Suppose you have a package A and you have tests for this package that exist in the same folder. Let's say these tests cover 50% of the code which is pretty low.
On the other hand, say you have package B that includes some packages (including A). The tests for package B most likely will cover some pieces of package A that are not yet covered by the package's own tests.
So far we only managed to get coverage information for package A and B but not the combination of the two. Do you know what I mean?
I'd be happy to hear you thoughts on this. Maybe you even think it's not a good idea to have cross-package coverage.
In case I understand your question correctly, I think we are already doing this. It requires that during the build time of the test binary, you have to list all go packages for which you want to create the report first. See here in our Makefile: https://github.com/elastic/beats/blob/master/libbeat/scripts/Makefile#L77
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.