Ensure green test runs in VS
See original GitHub issueIssue Description
Running unit tests in VS leads to some test failures - this should not be a case. VS-centric developer workflow should not be neglected
Classes of problems to tackle:
- Tests using
ExecMSBuild
fail on core: https://github.com/dotnet/msbuild/issues/8313 - (Reported by @vlada-shubina) Some
BuildEnvironmentHelper_Tests
fail on core (extra RID in path) - https://github.com/dotnet/msbuild/pull/8348Shouldly.ShouldAssertException : BuildEnvironmentHelper.Instance.MSBuildToolsDirectory32 should be "C:\Users\jankrivanek\AppData\Local\Temp\lhywa2vr.vir\2dfce9d58278472ea474ec9359cd7edd\MSBuild\Current\Bin" but was "C:\Users\jankrivanek\AppData\Local\Temp\lhywa2vr.vir\2dfce9d58278472ea474ec9359cd7edd\MSBuild\Current\Bin\amd64"
- Tests marked with
TestPlatforms.AnyUnix
run on Windows (and can fail). Can we use https://github.com/xunit/xunit/issues/2073 here? - https://github.com/dotnet/msbuild/pull/8348 - Test marked with
SkipOnTargetFramework
run on excluded FW (and can fail) Can we use https://github.com/xunit/xunit/issues/2073 here? - https://github.com/dotnet/msbuild/pull/8348 - StringTool
RetainsLastStringWithGivenHashCode
: #8340Shouldly.ShouldAssertException : _cache.GetDebugInfo() should be Microsoft.NET.StringTools.WeakStringCache+DebugInfo (-1703002807) but was Microsoft.NET.StringTools.WeakStringCache+DebugInfo (-1703002806)
-
ProjectItemSpecTooLong
(might be env setup on my machine) - related? https://github.com/dotnet/msbuild/issues/4247 -
ProjectGetterResultsInWindowsDriveEnumerationWarning
on Win (might be path specific?) - fixed by https://github.com/dotnet/msbuild/issues/7330 -
LogWarningUponProjectInstanceCreationFromDriveEnumeratingContent
&LogWindowsWarningUponProjectInstanceCreationFromDriveEnumeratingContent
(env specific?) - https://github.com/dotnet/msbuild/issues/7330 -
EvaluationProfiler_Tests
(all) - no repro. (might have been caused by the bug in not unsetting the reverted change waves in tests) -
LogWindowsWarningUponBuildingProjectWithDriveEnumeration
- likely just needs application of the following fix: https://github.com/dotnet/msbuild/pull/8366
Issue Analytics
- State:
- Created 8 months ago
- Reactions:2
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Get started with unit testing - Visual Studio (Windows)
Run your unit tests by clicking Run All (or press Ctrl + R, V). Run unit tests in Test Explorer. After the tests...
Read more >Java Testing in Visual Studio Code
To run the target test cases, select the green play button. You can also right-click on it to see more options. Testing Explorer....
Read more >How to avoid the very dangerous ALWAYS-GREEN test
I suggest another way to ensure that the test is red when the feature is broken: write the test before writing the feature...
Read more >SLS Core Stage Green Run Testing Overview
Green Run tests minimize risk to the core stage and ensure the stage satisfies design objectives and validates design models:.
Read more >Blue-Green Deployment + Testing: 5 Best Practices
This blog will give an overview of blue-green deployment and testing, and share five best practices for ensuring that the process goes ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/dotnet/msbuild/pull/8348 solves # 2, 3 and 4 in the list, and likely other cases as well. The Unix only cases will be skipped in VS now, as the tests running on unsupported framework. This should reduce number of red tests in VS.
Related issue: https://github.com/dotnet/msbuild/issues/8457