Closed marlonbraga closed 1 year ago
It's saying that the list of summary values to be checked against thresholds is empty, which is a case that should not arise. What does the summary output look like without the threshold value?
I can see a possible mechanism : an OpenCover format report that is effectively empty, thus generating no top-level <Summary>
element would result in an empty list being processed, but without any other errors about missing file or malformed data stopping the process sooner.
./packages/altcover.8.6.45/tools/net472/AltCover.exe Runner -x='packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe' -r='ConsoleApp.Test/__Instrumented' -w . --summary=O -- ConsoleApp.Test/bin/ConsoleApp.Test.dll
Beginning run...
Command line : '"packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe" ConsoleApp.Test/bin/ConsoleApp.Test.dll'
xUnit.net Console Runner v2.4.2+f110e5bee5 (64-bit Desktop .NET 4.7.2, runtime: 4.0.30319.42000)
Discovering: ConsoleApp.Test
Discovered: ConsoleApp.Test
Starting: ConsoleApp.Test
Finished: ConsoleApp.Test
=== TEST EXECUTION SUMMARY ===
ConsoleApp.Test Total: 2, Errors: 0, Failed: 0, Skipped: 0, Time: 0,300s
Getting results...
A total of 0 visits recorded
Coverage statistics flushing took 0,03 seconds
That looks plausible as you've managed to record 0 visits - here's a pre-release build with a tentative fix
altcover.8.6.48-pre-g3372b36fc7.nupkg.zip
and let's see how that does.
Than see what happens when you correct the runner command line to look like
AltCover.exe Runner -x='packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe' -r='ConsoleApp.Test/__Instrumented' -t=9 -w . --summary=O --dropReturnCode -- "ConsoleApp.Test/bin/__Instrumented/ConsoleApp.Test.dll"
where you actually test the instrumented code.
This time there was no exception. The coverage file was not generated The threshold has been ignored
> ./packages/altcover.8.6.48-pre-g3372b36fc7/tools/net472/AltCover.exe Runner -x='packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe' -r='ConsoleApp.Test/__Instrumented' -t=9 -w . --summary=O -- ConsoleApp.Test/bin/__Instrumented/ConsoleApp.Test.dll
Beginning run...
Command line : '"packages/xunit.runner.console.2.4.2/tools/net472/xunit.console.exe" ConsoleApp.Test/bin/__Instrumented/ConsoleApp.Test.dll'
Unhandled Exception: System.ArgumentException: file not found: ConsoleApp.Test/bin/__Instrumented/ConsoleApp.Test.dll
at Xunit.ConsoleClient.CommandLine.Parse(Predicate`1 fileExists) in /_/src/xunit.console/CommandLine.cs:line 135
at Xunit.ConsoleClient.CommandLine..ctor(String[] args, Predicate`1 fileExists) in /_/src/xunit.console/CommandLine.cs:line 21
at Xunit.ConsoleClient.ConsoleRunner.EntryPoint(String[] args) in /_/src/xunit.console/ConsoleRunner.cs:line 31
at Xunit.ConsoleClient.Program.Main(String[] args) in /_/src/xunit.console/Program.cs:line 17
Getting results...
A total of 0 visits recorded
Coverage statistics flushing took 0,03 seconds
With the appearance and withdrawal of issue #182, I'm not sure now whether you've now got things working or have given up.
I'll leave this issue open until next release, marked Fix Prepared, even though it only gets provoked in situations like where the code hasn't been instrumented and there is no report file, as it is a fault in the code as released.
I managed to make things work using other altcover mode. Thanks Steve! 🙂
Fix for original issue now released in v8.6.61
Hello,
In PowerShell, when I add a
-t=9
parameter, it throws an errorWhat this means?
It is a dotnet framework 4.8 project Do I something wrong?
Here is the entire command used, return and log.
Log file