Skip to content

Commit 8b5ca69

Browse files
Youssef1313nohwnd
andauthored
Update MSTest (#15108)
* Update MSTest * Suppress * buildTransitive * Fix some tests * Empty as inconclusive --------- Co-authored-by: Jakub Jareš <[email protected]>
1 parent 2c8d95e commit 8b5ca69

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

eng/Versions.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
<MicrosoftCodeCoverageVersion>17.9.0</MicrosoftCodeCoverageVersion>
8484
<!-- These versions are used for running unit tests, and running acceptance tests. They are also used as the default version for projects
8585
in TestAssets.sln to allow running and debugging tests in that solution directly in VS without having to run them via AcceptanceTests. -->
86-
<MSTestTestFrameworkVersion>3.4.3</MSTestTestFrameworkVersion>
87-
<MSTestTestAdapterVersion>3.4.3</MSTestTestAdapterVersion>
86+
<MSTestTestFrameworkVersion>3.9.3</MSTestTestFrameworkVersion>
87+
<MSTestTestAdapterVersion>3.9.3</MSTestTestAdapterVersion>
8888
<MSTestAssertExtensionVersion>1.0.3-preview</MSTestAssertExtensionVersion>
8989
<XUnitFrameworkVersion>2.4.2</XUnitFrameworkVersion>
9090
<XUnitAdapterVersion>2.4.5</XUnitAdapterVersion>
@@ -98,8 +98,8 @@
9898
These versions need to be "statically" readable because we read this file as xml in our build and tests.
9999
-->
100100
<!-- <MSTestFrameworkLatestVersion></MSTestFrameworkLatestVersion> is not here, because we don't build MSTest locally, so we don't have access to the latest version. -->
101-
<MSTestFrameworkLatestPreviewVersion>[3.4.3]</MSTestFrameworkLatestPreviewVersion>
102-
<MSTestFrameworkLatestStableVersion>[3.4.3]</MSTestFrameworkLatestStableVersion>
101+
<MSTestFrameworkLatestPreviewVersion>[3.9.3]</MSTestFrameworkLatestPreviewVersion>
102+
<MSTestFrameworkLatestStableVersion>[3.9.3]</MSTestFrameworkLatestStableVersion>
103103
<MSTestFrameworkRecentStableVersion>[3.3.1]</MSTestFrameworkRecentStableVersion>
104104
<MSTestFrameworkMostDownloadedVersion>[2.2.10]</MSTestFrameworkMostDownloadedVersion>
105105
<MSTestFrameworkPreviousStableVersion>[2.2.10]</MSTestFrameworkPreviousStableVersion>

src/vstest.console/TestPlatformHelpers/TestRequestManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,6 +1600,7 @@ internal static class KnownPlatformSourceFilter
16001600
"Microsoft.Testing.Extensions.HangDump.resources.dll",
16011601
"Microsoft.Testing.Extensions.HotReload.dll",
16021602
"Microsoft.Testing.Extensions.HotReload.resources.dll",
1603+
"Microsoft.Testing.Extensions.MSBuild.dll",
16031604
"Microsoft.Testing.Extensions.Retry.dll",
16041605
"Microsoft.Testing.Extensions.Retry.resources.dll",
16051606
"Microsoft.Testing.Extensions.Telemetry.dll",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<RunSettings>
2+
<MSTestV2>
3+
<ConsiderEmptyDataSourceAsInconclusive>true</ConsiderEmptyDataSourceAsInconclusive>
4+
</MSTestV2>
5+
</RunSettings>

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/Microsoft.TestPlatform.Acceptance.IntegrationTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TestProject>true</TestProject>
55
<IsTestProject>true</IsTestProject>
66
<UseBannedApiAnalyzers>true</UseBannedApiAnalyzers>
7+
<TestRunnerAdditionalArguments>$(TestRunnerAdditionalArguments) --settings "$(MSBuildThisFileDirectory)\.runsettings"</TestRunnerAdditionalArguments>
78
</PropertyGroup>
89

910
<PropertyGroup>

test/Microsoft.TestPlatform.CoreUtilities.UnitTests/Helpers/DotnetHostHelperTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ public void GetDotnetPathByArchitecture_DefaultInstallation_Win(
298298
Assert.AreEqual(found ? dotnetMuxer : null, muxerPath);
299299
}
300300

301+
#pragma warning disable MSTEST0042 // duplicate data row - TODO: Look more into it
301302
[DataTestMethod]
302303
[DataRow(PlatformArchitecture.X64, PlatformArchitecture.X64, "/usr/local/share/dotnet", "", true, PlatformOperatingSystem.OSX)]
303304
[DataRow(PlatformArchitecture.X64, PlatformArchitecture.ARM64, "/usr/local/share/dotnet/x64", "", true, PlatformOperatingSystem.OSX)]
@@ -316,6 +317,7 @@ public void GetDotnetPathByArchitecture_DefaultInstallation_Win(
316317
[DataRow(PlatformArchitecture.X64, PlatformArchitecture.ARM64, "/usr/share/dotnet/x64", "", false, PlatformOperatingSystem.Unix, DotnetMuxerResolutionStrategy.DefaultInstallationLocation)]
317318
[DataRow(PlatformArchitecture.ARM64, PlatformArchitecture.X64, "/usr/share/dotnet", "", false, PlatformOperatingSystem.Unix, DotnetMuxerResolutionStrategy.DefaultInstallationLocation)]
318319
[DataRow(PlatformArchitecture.X64, PlatformArchitecture.X64, "/usr/share/dotnet", "", false, PlatformOperatingSystem.Unix, DotnetMuxerResolutionStrategy.DefaultInstallationLocation)]
320+
#pragma warning restore MSTEST0042
319321
public void GetDotnetPathByArchitecture_DefaultInstallation_Unix(
320322
PlatformArchitecture targetArchitecture,
321323
PlatformArchitecture platformArchitecture,

test/Microsoft.TestPlatform.TestUtilities/IntegrationTestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class IntegrationTestBase
4646
protected readonly IntegrationTestEnvironment _testEnvironment;
4747

4848
private readonly string _msTestPre3_0AdapterRelativePath = @"mstest.testadapter\{0}\build\_common".Replace('\\', Path.DirectorySeparatorChar);
49-
private readonly string _msTestAdapterRelativePath = @"mstest.testadapter\{0}\build\{1}".Replace('\\', Path.DirectorySeparatorChar);
49+
private readonly string _msTestAdapterRelativePath = @"mstest.testadapter\{0}\buildTransitive\{1}".Replace('\\', Path.DirectorySeparatorChar);
5050
private readonly string _nUnitTestAdapterRelativePath = @"nunit3testadapter\{0}\build".Replace('\\', Path.DirectorySeparatorChar);
5151
private readonly string _xUnitTestAdapterRelativePath = @"xunit.runner.visualstudio\{0}\build\{1}".Replace('\\', Path.DirectorySeparatorChar);
5252

0 commit comments

Comments
 (0)