Closed maurosoft1973 closed 2 months ago
The absolute silence between the Command line : ...
and Getting results
in your case - not even an error message being echoed - is unexpected.
The AltCover build under Linux on GitHub runs unit tests under mono, admittedly with NUnit
rather than VStest
, but in a very similar manner
/usr/bin/mono --debug /home/runner/work/altcover/altcover/_Binaries/AltCover/Release+AnyCPU/net472/AltCover.exe -o ./__VisualizerTestWithAltCoverRunner -s "\.DataCollector" -s Sample -s Microsoft -s testhost -t "System\." -t "Sample3\.Class2" -t Microsoft -t ICSharpCode -t <Start -t UnitTestStub -t SolutionRoot -m WaitForExitCustom --sn /home/runner/work/altcover/altcover/Build/SelfTest.snk --reportFormat OpenCover -r /home/runner/work/altcover/altcover/_Reports/VisualizerTestWithAltCoverRunner.xml --single --localSource
then
/usr/bin/mono --debug /home/runner/work/altcover/altcover/_Binaries/AltCover/Release+AnyCPU/net472/AltCover.exe Runner -r /home/runner/work/altcover/altcover/_Binaries/AltCover.Visualizer.Tests/Debug+AnyCPU/net472/./__VisualizerTestWithAltCoverRunner -x /home/runner/work/altcover/altcover/packages/nunit.consolerunner/3.12.0/tools/nunit3-console.exe -- --noheader --work=. --result=./_Reports/VisualizerTestWithAltCoverRunnerReport.xml /home/runner/work/altcover/altcover/_Binaries/AltCover.Visualizer.Tests/Debug+AnyCPU/net472/__VisualizerTestWithAltCoverRunner/AltCover.Tests.Visualizer.dll
but after echoing the command line, that shows the console output from NUnit
like
Beginning run...
Command line : '/home/runner/work/altcover/altcover/packages/nunit.consolerunner/3.12.0/tools/nunit3-console.exe --noheader --work=. --result=./_Reports/VisualizerTestWithAltCoverRunnerReport.xml /home/runner/work/altcover/altcover/_Binaries/AltCover.Visualizer.Tests/Debug+AnyCPU/net472/__VisualizerTestWithAltCoverRunner/AltCover.Tests.Visualizer.dll'
Runtime Environment
OS Version: Linux 6.5.0.1017
Runtime: .NET Framework CLR v4.0.30319.42000
...
Without doing the test run under the control of the runner, but just at a command line, does plain
/usr/bin/vstest.console.exe /source/test/bin/Debug/AltCover/MyTest.dll
run the tests?
If it does, then a work-around would be to run the tests like that and use
altcover runner --collect --recorderDirectory=/source/test/bin/Debug/AltCover --outputFile=/source/test/bin/Debug/reportDir/finalReport.xml
If it silently does nothing, than that would be the problem
Any updates, or shall I close this?
Ok, close issue
Il Lun 29 Apr 2024, 09:10 Steve Gilham @.***> ha scritto:
Any updates, or shall I close this?
— Reply to this email directly, view it on GitHub https://github.com/SteveGilham/altcover/issues/218#issuecomment-2082026540, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABKKONVZNENLR23XP6JWC2DY7XW4TAVCNFSM6AAAAABGHQBZHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBSGAZDMNJUGA . You are receiving this because you authored the thread.Message ID: @.***>
AltCover version 8.8.21
The first command just did the instrumentation and wrote a couple of template files (for the raw output)
The second command actually run the tests and caught the raw output, and then wrote the final output report based on the raw files.
This is the result of command 2:
Why is the command /usr/bin/vstest.console.exe /source/test/bin/Debug/AltCover/MyTest.dll not called up?
Where do I go wrong?
Execution takes place in a mono container
I thank those who will give me an answer to the problem.