Hello,
I have issue with running tests - I cannot find tests result.
Tests are built in VS2022, .NET Framework 4.8.1.
Test adapter MSTest.TestAdapter 3.1.1, MS.TestFramework 3.1.1.
To run tests I use vstest.console.exe v. 17.4.1.
I am running the tests on virtual machine via command
"C:\Program Files (x86)\Microsoft Visual Studio\2022\TestAgent\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" C:\tests\Tests.dll /ResultsDirectory:TestResults /logger:trx /Tests:TestClass
All tests passed. However, there is no result file (.trx) in TestResults. Only new folder with subfolders In and Out is created and these are empty.
I have also tried another vstest.console.exe (v. 17.0.33006.217) which is located at:
"C:\Program Files (x86)\Microsoft Visual Studio\2022\TestAgent\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
but with the same issue.
When I run test in a separate process (/InIsolation), the tests passed, .trx is generated but I get this error (result path is modified):
"The active test run was aborted. Reason: Test host process crashed
Results File: ...result.trx
Test Run Aborted with error System.AggregateException: One or more errors occurred. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.IO.Stream.ReadByte() at System.IO.BinaryReader.ReadByte() at System.IO.BinaryReader.Read7BitEncodedInt() at System.IO.BinaryReader.ReadString() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.LengthPrefixCommunicationChannel.NotifyDataAvailable() at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TcpClientExtensions.MessageLoopAsync(TcpClient client, ICommunicationChannel channel, Action`1 errorHandler, CancellationToken cancellationToken) --- End of inner exception stack trace ---."