testfx icon indicating copy to clipboard operation
testfx copied to clipboard

MSTest runner as first class citizen in `dotnet test`

Open Evangelink opened this issue 11 months ago • 4 comments

MSTest runner has an option to integrate with dotnet test (see https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-runner-integrations#dotnet-test---mstest-runner-mode) but this support is not perfect.

For examples, to pass the arguments of MSTest runner, users have to rely on -p:TestingPlatformCommandLineArguments.

Another big limitation is the fact that the new runner doesn't provide any easy solution to provide a merged experience (e.g. produce a single merged TRX report after the executions of multiple tests).

To improve this experience, we need to update the logic inside https://github.com/dotnet/sdk.

Evangelink avatar Mar 15 '24 14:03 Evangelink

Hello @Evangelink , do you know where the doc went? The link seems to be dead. This one : https://learn.microsoft.com/en-us/docs/core/testing/unit-testing-platform-integration-dotnet-test#dotnet-test---mstest-runner-mode

TheFireCookie avatar Mar 20 '24 08:03 TheFireCookie

Oh wow ok looks like the redirect isn't working... Sorry for the inconvenience... I refactored all docs that are generic to the new platform under a new section (link for the page you want https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test) as we are working with xUnit and NUnit so they can benefit from the improvements and features of our new platform.

Evangelink avatar Mar 20 '24 08:03 Evangelink

Thanks, while I have you, I'm trying to run a test project by running directly the EXE generated but I'm facing this error: Assembly Initialization method Evs.Phoenix.Starasset.Api.Remote.ComponentTest.TestSettings.AssemblyInitializeAsync threw exception. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. [10:02:32 ](https://teamcity.evs.tv/buildConfiguration/Phoenix_EvsPhoenixStarasset_EvsPhoenixStarassetBuildOnCommitSharedResources/13896258?buildTab=log&focusLine=1604&linesState=1604&logView=flowAware) Could not load file or assembly 'Microsoft.Build.Utilities.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. @Evangelink

TheFireCookie avatar Mar 20 '24 09:03 TheFireCookie

Moving to v3.5 as the task is bigger than a single sprint.

Evangelink avatar May 02 '24 08:05 Evangelink