Closed mikibakaiki closed 4 months ago
I see you added the waiting for customer
tag. What else can i provide?
Please use the latest preview from coverlet nightly build and check whether this is still an issue.
Could you please execute the test again and use -bl
. The binary log file will show the value for property $(CoverletOutput)
.
The documentation uses forward slash which definitely works e.g.
dotnet test /p:CollectCoverage=true /p:CoverletOutput='./results/'
I use the command line and the tried some variations:
status | msbuild parameter |
---|---|
:heavy_check_mark: | /p:CoverletOutput="C:/GitHub/coverlet/artifacts/Reports/coverlet.core/" |
:heavy_check_mark: | /p:CoverletOutput="C:\\GitHub\\coverlet\\artifacts\\Reports\\coverlet.core\\" |
:heavy_check_mark: | /p:CoverletOutput="C:\GitHub\coverlet\artifacts\Reports\coverlet.core\\" |
:x: | /p:CoverletOutput="C:\GitHub\coverlet\artifacts\Reports\coverlet.core\" |
Issue cannot be reproduced with latest preview version.
I can't seem to use the version you mention.
I see that you're using the CLI commands, and they seem to work. Could you test including the
<PropertyGroup>
<CollectCoverage>true</CollectCoverage>
<CoverletOutput>$(MSBuildProjectDirectory)\coverage\</CoverletOutput>
<CoverletOutputFormat>cobertura</CoverletOutputFormat>
</PropertyGroup>
and check if it works too? :)
Issue cannot be reproduced with latest preview version.
@mikibakaiki I tested CoverletOutput property in C# project file already.
<CoverletOutput>C:/GitHub/coverlet/artifacts/Reports/coverlet.collector/</CoverletOutput
coverlet V6.0.1 is released.
Describe the bug I was trying to use the
coverlet.msbuild
to make the commanddotnet test
always run asdotnet test /p:CollectCoverage=true
to make life easier for my work colleagues - and myself!However, this was not working properly. After hours of trying different things, and also running the command
dotnet test /p:CollectCoverage=true
without any success, i tried creating an empty file calledcoverage.cobertura.xml
and there it was, the report was generated, and it had overwritten the empty file.The first report with
ReportGenerator
was empty, because it read the empty file, but in the subsequent runs, it was reading the correct data - I'm currently unsure if it is reading the "freshest" data or just the n-1 run attempt.To Reproduce Here's my
test.csproj
setup:I'm running the command
dotnet test
from inside the test folder and on the solution folder, and both weren't working until i created the empty file.Expected behavior I expected to have the
coverage.cobertura.xml
report being created if the file doesn't exist, and if it does, its content is replaced. Also expected that, after my setup in thetest.csproj
,running the commanddotnet test
would work as an equivalent todotnet test /p:CollectCoverage=true
.I also tried to run the command
dotnet test /p:CollectCoverage=true
and the report was not being generated.Actual behavior I was getting an error:
Both paths were correct and were equal. The problem was that the report file was not found.
Configuration (please complete the following information): Please provide more information on your .NET configuration:
Additional context Add any other context about the problem here.