- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 966
Update to MSTest 4 #1721
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
base: develop
Are you sure you want to change the base?
Update to MSTest 4 #1721
Conversation
replace Execute with ExecuteAsync and fix MSTEST0057 https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0057 (link currently dead)
Fixing this properly would require the tests to respect testContext.CancellationToken. I'm not sure this is worth fixing or how to even do it for the sync methods. https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0045
I assume that parallelization would break a lot of stuff. https://learn.microsoft.com/en-us/dotnet/core/testing/mstest-analyzers/mstest0001
| I think it is a good time to merge this change | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still suffers from missing console output in the integration tests #1693 (comment):
This branch:
 
develop:
 
I found microsoft/testfx#6457 but apparently it is working as intended...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file should be reverted - most of them are explicitly testing ICollection.Contains implementations which is now lost
(I don't think MSTEST0037 really provides much benefit)
MSTest 4 has quite a few new asserts, analyzers and breaking changes, see https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-mstest-migration-v3-v4 .
Most of these were automatically fixed by the code fixer, see separate commits.
The update also triggered new sonar analyzer warnings, which seems to a bug in sonar, see SonarSource/sonar-dotnet#9767 . I suppressed these for now.