-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a MSTest sample with a program.cs #4201
Conversation
@Evangelink I have a few questions regarding this sample. First, we still have 3 MSBuild properties that I thought would be controlled by the setup code in
Is there no way to control those aspects without Second, it would be nice if this:
Was And lastly, can you elaborate if it is possible to control the |
To complement @nohwnd message:
As you can see there are different views and we need to consider the migration where people are not used to manually define the main themselves. I would still love to consider this request for v2 of the platform as it is for me a strong strength of the new platform and can result in many "hacks" to be avoided.
You can also simply not register the telemetry provider on line 22 https://github.com/microsoft/testfx/blob/main/samples/public/mstest-runner/MSTestProjectWithExplicitMain/MSTestProjectWithExplicitMain/Program.cs#L22. As a global rule, here is how the extensibiliy model works:
|
The more such Yes, I'm aware that the MSTest SDK exists, but to me, that is the wrong approach, because that SDK ties you to the MSTest engine as well: now if I want to use xUnit or nUnit or some other test framework, I cannot use the SDK anymore and have to downgrade my experience by having to control some weird specific Have you guys considered creating a more general-purpose
I would vote for the emphasized. Have it be part of the "dumbed down" test project template.
See, this is where we diverge. My take is that you guys should push for the If all samples and articles would point people to the
Understood. This is exactly what I was looking for, thanks. The only thing missing is of course adding standard
To be clear, I totally get where you are coming from. You want to avoid a massive breaking change for everybody since the old way test projects were handled was super automatic from the beginning. As mentioned above, I think this is where you could provide a "legacy" test template, and a "modern" one, using an explicit
Gotcha. So this is yet another option. Good to know. |
Yes that's WIP or to be more precise, that's being considered. We are trying to find the scope and how to design it not to block test frameworks.
Probably a good idea for the separate template design (see below)
Yep dotnet/test-templates#448! About the new template, this is definitely what I am exploring at the moment, still having some discussions about the possibility of having "MSTest" following the new recommended pattern (MSTest runner + explicit main) and to have "MSTest legacy" or "MSTest (using VSTest)" as the other but we always hit the "changing user habits" discussion!
I cannot make promises but please know that's exactly my view and position. Test is sadly not a field where we get enough support from management or users in general. It's still viewed as a cost and things should be working as they were working since forever. We get lot of pressure from management to not disrupt there. This being said, I will continue to push and maybe one day we will have a good news!
We have our own |
Relates to #4198