Test coverage missing after upload of Perl module to CPAN

109 Views Asked by At

After upload of a module to CPAN, all testing reports are positive. Nevertheless, the test coverage (usually located between Bus factor and License on the left hand side) is missing. In my sandbox, I do not have any issues with the test coverage and have achieved 100% for this module.

I suppose that this is somehow caused by improper configuration provided by Makefile.PL, where the hash element { test }->{ TESTS } currently contains the value 't/*/*/*.t t/*/*/*/*.t', but I cannot recognize any error therein.

What could be the reason for missing test coverage visibility? Any hint is greatly appreciated.

In one of the previous releases, I used more precise description of test files pattern namely 't/Test/Expander/*.t t/Test/Expander/NoCLASS/*.t', but this did not help.

What is also inexplicable for me: the test coverage is computed and visible on CPAN Coverage Report.

1

There are 1 best solutions below

0
On

This bug was reported on metacpan in April, 2023. The bug has not been resolved yet.

One person suspects the module version string which is assigned inside the Perl module in one way (2.3.2) and in the meta files (such as META.json) in a different way (v2.3.2). Notice the leading v. You could try to remove the v and upload a new version of your module.

Here is an example module where the version strings match between the Perl code and the META.yml file. The test coverage link is there.


Note: It was not obvious how to find this bug report. I clicked on the FAQ link on metacpan, and on the left panel, I clicked on the Missing modules link. Under the "I still think this is a bug" heading, I clicked on the "Please check existing issues" link. The "Missing test coverage numbers" issue happened to be on the first page of results.