Open nithinbandaru1 opened 2 months ago
Hello, could please you highlight the text in the quote above that makes you think test.sdk should have Testing.Platform as dependency?
You are not finding it most likely because you are not using MSTest. Or you are not using MSTest project generated by net9.0 template. Testing.Platform (Testing.Platform not TestPlatform) is shipped under MSTest nuget package, and also together with the most recent NUnit, but is not shipped with XUnit, and it is not shipped with Microsoft.NET.Test.SDK
Yes that name is similar to the name of the modern SDK used in modern csproj files, but it does something quite different. We inherited the product when it had this name already, and the intent probably was that it will become msbuild SDK but it never did, not would it make sense to make it one.
The new testing platform is focusing on having less dependencies, for example vstest requires that you have a working networking stack, or it has hard dependency on newtonsoft.json, the new platform does not have that. It is also more portable, because everything is installed via a nuget package, and there are no extra components you would need to run tests, e.g. extra tools package for getting vstest.console, or .NET SDK.
We also focus on performance to add the least amount of overhead to your test running (e.g. having less processes starting, have client directly in process rather than having to start another exe just to forward messages), having the whole stack async-first instead of allocating many threads etc.
There is no alternative for it in Microsoft.NET.Test.SDK, they are two completely different things. But you can install them all together e.g. how MSTest package does it now, to ensure the maximum amount of backwards compatibility, so you can switch between running via the new testing platform, and the old vstest (TestPlatform).
Description
When I create a test project that can be MSTest or NUnit or xUnit, Microsoft.TestPlatform.TestHost package dependency is added as part of Microsoft.NET.Test.Sdk package.
But according to this documentation (https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-platform-vs-vstest) it sounds like Microsoft.Testing.Platform would be added as dependency as quoted form page below.
I was also not able to find any DLL being compiled called Microsoft.Testing.Platform or having as sub package under Microsoft.TestPlatform.TestHost or Microsoft.NET.Test.Sdk, When I search nuget I see Microsoft.Testing.Platform package active so not really sure what's happening here. It would be great if some details are provided?
Microsoft.NET.Test.Sdk - Isn't this fit more at csproj root xml element. Looks bit out of place to me.
It looks like Microsoft.Testing.Platform is lightweight portable build compared to Microsoft.TestPlatform, So, what does this exactly means, what is missing compared to Microsoft.TestPlatform? Some windows only components?
Is it Microsoft.Testing.Platform that will do the finding of available adaptors and have methods to call the adaptors to get test list/discover tests, run tests by calling adaptor runner part of code? If that is the case what is its replacement in Microsoft.NET.Test.Sdk?
Is it Microsoft.Testing.Platform that can be used as a nuget dependency for building custom explorers/run initiators like for example instead of console UI like vstest.console.exe or dotnet test, I want to build a Windows UI application. I that case can I use this dependency to interact with adaptors and discover, run tests?
Steps to reproduce
Creating empty project should be sufficient.
Expected behavior
Probably only Microsoft.Testing.Platform should be added as dependency? Not really sure.
Actual behavior
Microsoft.NET.Test.Sdk is added as dependency with Microsoft.Coverage and Microsoft.TestPlatform.TestHost as sub packages.
Diagnostic logs
Not relevant
Environment
Not relevant