Hi! I’d like to request adding this pattern to the default coverage file discovery list:
Current discovery includes:
"cobertura.xml"
"*coverage*.*"
but it does not include *.cobertura.xml.
This matters for .NET projects using the newer Microsoft Testing Platform v2 flow with Microsoft.Testing.Extensions.CodeCoverage. When running tests like this:
dotnet test -c Release --coverage --coverage-output-format cobertura --results-directory TestResults
Microsoft.CodeCoverage writes Cobertura reports with GUID-style filenames, for example:
TestResults/b4dc2cd6-7034-4454-b427-396a638ab386.cobertura.xml
That file is a valid Cobertura XML report, but Codecov automatic discovery misses it because:
only matches a file named exactly cobertura.xml, and the GUID filename does not match:
because it does not contain the word coverage.
The common workaround is to add a CI step that copies/renames the files:
mkdir -p coverage
i=0
for f in TestResults/*.cobertura.xml; do
[ -e "$f" ] || continue
i=$((i + 1))
cp "$f" "coverage/coverage-$i.cobertura.xml"
done
This works, but it is unnecessary friction, especially as Microsoft Testing Platform v2 becomes the default path for modern .NET test projects. Multiple test projects/executables can each produce their own GUID-named .cobertura.xml report, so using one fixed output filename is not a good general solution either.
Adding *.cobertura.xml should be low risk because it matches a standard Cobertura naming convention and aligns with existing suffix-style patterns such as:
"*.lcov"
"*.gcov"
"*.clover"
Expected behavior:
Codecov automatic discovery should find files like:
TestResults/<guid>.cobertura.xml
without requiring users to rename or copy them.
Thanks!
Hi! I’d like to request adding this pattern to the default coverage file discovery list:
"*.cobertura.xml"Current discovery includes:
but it does not include
*.cobertura.xml.This matters for .NET projects using the newer Microsoft Testing Platform v2 flow with
Microsoft.Testing.Extensions.CodeCoverage. When running tests like this:dotnet test -c Release --coverage --coverage-output-format cobertura --results-directory TestResultsMicrosoft.CodeCoverage writes Cobertura reports with GUID-style filenames, for example:
That file is a valid Cobertura XML report, but Codecov automatic discovery misses it because:
"cobertura.xml"only matches a file named exactly
cobertura.xml, and the GUID filename does not match:"*coverage*.*"because it does not contain the word
coverage.The common workaround is to add a CI step that copies/renames the files:
This works, but it is unnecessary friction, especially as Microsoft Testing Platform v2 becomes the default path for modern .NET test projects. Multiple test projects/executables can each produce their own GUID-named
.cobertura.xmlreport, so using one fixed output filename is not a good general solution either.Adding
*.cobertura.xmlshould be low risk because it matches a standard Cobertura naming convention and aligns with existing suffix-style patterns such as:Expected behavior:
Codecov automatic discovery should find files like:
without requiring users to rename or copy them.
Thanks!