Skip to content

Commit 2835b06

Browse files
authored
Update framework version used for testing, and test matrix (#4970)
1 parent 90ee608 commit 2835b06

File tree

27 files changed

+93
-145
lines changed

27 files changed

+93
-145
lines changed

eng/Versions.props

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,38 +63,38 @@
6363
<FluentAssertionsVersion>6.11.0</FluentAssertionsVersion>
6464
<MoqVersion>4.16.1</MoqVersion>
6565
<!-- For coverage use our own package on latest stable -->
66-
<MicrosoftCodeCoverageVersion>17.4.1</MicrosoftCodeCoverageVersion>
66+
<MicrosoftCodeCoverageVersion>17.9.0</MicrosoftCodeCoverageVersion>
6767
<!-- These versions are used for running unit tests, and running acceptance tests. They are also used as the default version for projects
6868
in TestAssets.sln to allow running and debugging tests in that solution directly in VS without having to run them via AcceptanceTests. -->
69-
<MSTestTestFrameworkVersion>2.3.0-preview-20220711-02</MSTestTestFrameworkVersion>
70-
<MSTestTestAdapterVersion>2.3.0-preview-20220711-02</MSTestTestAdapterVersion>
69+
<MSTestTestFrameworkVersion>3.3.1</MSTestTestFrameworkVersion>
70+
<MSTestTestAdapterVersion>3.3.1</MSTestTestAdapterVersion>
7171
<MSTestAssertExtensionVersion>1.0.3-preview</MSTestAssertExtensionVersion>
72-
<XUnitFrameworkVersion>2.3.1</XUnitFrameworkVersion>
73-
<XUnitAdapterVersion>2.3.1</XUnitAdapterVersion>
74-
<XUnitConsoleRunnerVersion>2.3.1</XUnitConsoleRunnerVersion>
75-
<NUnit3FrameworkVersion>3.10.1</NUnit3FrameworkVersion>
76-
<NUnit3AdapterVersion>3.11.0</NUnit3AdapterVersion>
77-
<NUnitConsoleRunnerVersion>3.8.0</NUnitConsoleRunnerVersion>
72+
<XUnitFrameworkVersion>2.4.2</XUnitFrameworkVersion>
73+
<XUnitAdapterVersion>2.4.5</XUnitAdapterVersion>
74+
<XUnitConsoleRunnerVersion>2.4.2</XUnitConsoleRunnerVersion>
75+
<NUnit3FrameworkVersion>3.14.0</NUnit3FrameworkVersion>
76+
<NUnit3AdapterVersion>3.17.0</NUnit3AdapterVersion>
77+
<NUnitConsoleRunnerVersion>3.16.3</NUnitConsoleRunnerVersion>
7878
<!--
7979
Versions that are used when building projects from TestAssets.sln for compatibility tests. See Invoke-TestAssetsBuild in scripts/build.ps1.
8080
Exact versions are used to avoid Nuget substituting them by closest match, if we make a typo.
8181
These versions need to be "statically" readable because we read this file as xml in our build and tests.
8282
-->
8383
<!-- <MSTestFrameworkLatestVersion></MSTestFrameworkLatestVersion> is not here, because we don't build MSTest locally, so we don't have access to the latest version. -->
84-
<MSTestFrameworkLatestPreviewVersion>[2.3.0-preview-20220613-02]</MSTestFrameworkLatestPreviewVersion>
85-
<MSTestFrameworkLatestStableVersion>[2.2.10]</MSTestFrameworkLatestStableVersion>
86-
<MSTestFrameworkRecentStableVersion>[2.2.9]</MSTestFrameworkRecentStableVersion>
87-
<MSTestFrameworkMostDownloadedVersion>[2.1.0]</MSTestFrameworkMostDownloadedVersion>
88-
<MSTestFrameworkPreviousStableVersion>[2.1.0]</MSTestFrameworkPreviousStableVersion>
84+
<MSTestFrameworkLatestPreviewVersion>[3.3.1]</MSTestFrameworkLatestPreviewVersion>
85+
<MSTestFrameworkLatestStableVersion>[3.3.1]</MSTestFrameworkLatestStableVersion>
86+
<MSTestFrameworkRecentStableVersion>[3.2.2]</MSTestFrameworkRecentStableVersion>
87+
<MSTestFrameworkMostDownloadedVersion>[2.2.10]</MSTestFrameworkMostDownloadedVersion>
88+
<MSTestFrameworkPreviousStableVersion>[2.2.10]</MSTestFrameworkPreviousStableVersion>
8989
<MSTestFrameworkLegacyStableVersion>[1.4.0]</MSTestFrameworkLegacyStableVersion>
9090
<!-- Versions that are used to restore previous versions of console, translation layer, and test.sdk for compatibility tests.
9191
See Invoke-TestAssetsBuild in scripts/build.ps1. Exact versions are used to avoid Nuget substituting them by closest match, if we make a typo.
9292
These versions need to be "statically" readable because we read this file as xml in our build and tests. -->
9393
<!-- <VSTestConsoleLatestVersion></VSTestConsoleLatestVersion> is not here, NETTestSdkVersion is used instead, because that is the version of the locally built latest package. -->
94-
<VSTestConsoleLatestPreviewVersion>[17.2.0-preview-20220401-08]</VSTestConsoleLatestPreviewVersion>
95-
<VSTestConsoleLatestStableVersion>[17.2.0]</VSTestConsoleLatestStableVersion>
96-
<VSTestConsoleRecentStableVersion>[17.1.0]</VSTestConsoleRecentStableVersion>
97-
<VSTestConsoleMostDownloadedVersion>[16.6.1]</VSTestConsoleMostDownloadedVersion>
94+
<VSTestConsoleLatestPreviewVersion>[17.10.0-release-24177-07]</VSTestConsoleLatestPreviewVersion>
95+
<VSTestConsoleLatestStableVersion>[17.9.0]</VSTestConsoleLatestStableVersion>
96+
<VSTestConsoleRecentStableVersion>[17.8.0]</VSTestConsoleRecentStableVersion>
97+
<VSTestConsoleMostDownloadedVersion>[17.6.2]</VSTestConsoleMostDownloadedVersion>
9898
<VSTestConsolePreviousStableVersion>[16.11.0]</VSTestConsolePreviousStableVersion>
9999
<VSTestConsoleLegacyStableVersion>[15.9.2]</VSTestConsoleLegacyStableVersion>
100100
<ILAsmPackageVersion>5.0.0</ILAsmPackageVersion>

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "9.0.100-preview.1.24101.2",
3+
"version": "9.0.100-preview.2.24157.14",
44
"rollForward": "minor",
55
"allowPrerelease": false,
66
"architecture": "x64"
@@ -29,7 +29,7 @@
2929
},
3030
"xcopy-msbuild": "17.8.5",
3131
"vswhere": "2.2.7",
32-
"dotnet": "9.0.100-preview.1.24101.2"
32+
"dotnet": "9.0.100-preview.2.24157.14"
3333
},
3434
"msbuild-sdks": {
3535
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24212.4"

playground/MSTest1/MSTest1.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
11-
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
10+
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
11+
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
1212
<PackageReference Include="coverlet.collector" Version="1.2.0" />
1313
</ItemGroup>
1414
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) AND '$(OS)' != 'Windows_NT' ">

playground/MSTest2/MSTest2.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="MSTest.TestAdapter" Version="2.1.0" />
11-
<PackageReference Include="MSTest.TestFramework" Version="2.1.0" />
10+
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
11+
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
1212
<PackageReference Include="coverlet.collector" Version="1.2.0" />
1313
</ItemGroup>
1414
<ItemGroup Condition=" $(TargetFramework.StartsWith('net4')) AND '$(OS)' != 'Windows_NT' ">

playground/TestPlatform.Playground/TestPlatform.Playground.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="MSTest.TestAdapter" Version="2.2.8" />
16-
<PackageReference Include="MSTest.TestFramework" Version="2.2.8" />
15+
<PackageReference Include="MSTest.TestAdapter" Version="3.3.1" />
16+
<PackageReference Include="MSTest.TestFramework" Version="3.3.1" />
1717
</ItemGroup>
1818

1919
<ItemGroup>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file is used by Code Analysis to maintain SuppressMessage
2+
// attributes that are applied to this project.
3+
// Project-level suppressions either have no target or are given
4+
// a specific target and scoped to a namespace, type, member, etc.
5+
6+
using System.Diagnostics.CodeAnalysis;
7+
8+
[assembly: SuppressMessage("Reliability", "CA2022:Avoid inexact read with 'Stream.Read'", Justification = "<Pending>", Scope = "member", Target = "~M:Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.DotnetHostHelper.GetMuxerArchitectureByMachoOnMac(System.String)~System.Nullable{Microsoft.VisualStudio.TestPlatform.PlatformAbstractions.PlatformArchitecture}")]

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/BlameDataCollectorTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Microsoft.TestPlatform.AcceptanceTests;
2525
public class BlameDataCollectorTests : AcceptanceTestBase
2626
{
2727
public const string NETCOREANDFX = "net462;net472;netcoreapp3.1";
28-
public const string NET50 = "net5.0";
28+
public const string NET60 = "net6.0";
2929
private readonly string _procDumpPath;
3030

3131
public BlameDataCollectorTests()
@@ -130,9 +130,9 @@ public void BlameDataCollectorShouldOutputDumpFileWhenNoCrashOccursButCollectAlw
130130
}
131131

132132
[TestMethod]
133-
[NetCoreRunner("net462;net472;netcoreapp3.1;net5.0")]
133+
[NetCoreRunner("net462;net472;netcoreapp3.1;net6.0")]
134134
// should make no difference, keeping for easy debug
135-
// [NetFrameworkRunner("net462;net472;netcoreapp3.1;net5.0")]
135+
// [NetFrameworkRunner("net462;net472;netcoreapp3.1;net6.0")]
136136
public void HangDumpOnTimeout(RunnerInfo runnerInfo)
137137
{
138138
SetTestEnvironment(_testEnvironment, runnerInfo);
@@ -152,7 +152,7 @@ public void HangDumpOnTimeout(RunnerInfo runnerInfo)
152152
}
153153

154154
[TestMethod]
155-
// net5.0 does not support dump on exit
155+
// net6.0 does not support dump on exit
156156
[NetCoreRunner("net462;net472;netcoreapp3.1")]
157157
// should make no difference, keeping for easy debug
158158
// [NetFrameworkRunner("net462;net472;netcoreapp3.1")]
@@ -176,7 +176,7 @@ public void CrashDumpWhenThereIsNoTimeout(RunnerInfo runnerInfo)
176176
}
177177

178178
[TestMethod]
179-
// net5.0 does not support dump on exit
179+
// net6.0 does not support dump on exit
180180
[NetCoreRunner("net462;net472;netcoreapp3.1")]
181181
// should make no difference, keeping for easy debug
182182
// [NetFrameworkRunner("net462;net472;netcoreapp3.1")]
@@ -200,9 +200,9 @@ public void CrashDumpOnExit(RunnerInfo runnerInfo)
200200
}
201201

202202
[TestMethod]
203-
[NetCoreRunner("net462;net472;netcoreapp3.1;net5.0")]
203+
[NetCoreRunner("net462;net472;netcoreapp3.1;net6.0")]
204204
// should make no difference, keeping for easy debug
205-
// [NetFrameworkRunner("net462;net472;netcoreapp3.1;net5.0")]
205+
// [NetFrameworkRunner("net462;net472;netcoreapp3.1;net6.0")]
206206
public void CrashDumpOnStackOverflow(RunnerInfo runnerInfo)
207207
{
208208
SetTestEnvironment(_testEnvironment, runnerInfo);
@@ -222,7 +222,7 @@ public void CrashDumpOnStackOverflow(RunnerInfo runnerInfo)
222222
}
223223

224224
[TestMethod]
225-
[NetCoreRunner(NET50)]
225+
[NetCoreRunner(NET60)]
226226
// should make no difference, keeping for easy debug
227227
// [NetFrameworkRunner(NET50)]
228228
public void CrashDumpChildProcesses(RunnerInfo runnerInfo)
@@ -238,9 +238,9 @@ public void CrashDumpChildProcesses(RunnerInfo runnerInfo)
238238
}
239239

240240
[TestMethod]
241-
[NetCoreRunner("net462;net472;netcoreapp3.1;net5.0")]
241+
[NetCoreRunner("net462;net472;netcoreapp3.1;net6.0")]
242242
// should make no difference, keeping for easy debug
243-
// [NetFrameworkRunner("net462;net472;netcoreapp3.1;net5.0")]
243+
// [NetFrameworkRunner("net462;net472;netcoreapp3.1;net6.0")]
244244
public void HangDumpChildProcesses(RunnerInfo runnerInfo)
245245
{
246246
SetTestEnvironment(_testEnvironment, runnerInfo);

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/DeprecateExtensionsPathWarningTests.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ public DeprecateExtensionsPathWarningTests()
5353
}
5454
}
5555

56-
[TestMethod]
57-
public void VerifyDeprecatedWarningIsThrownWhenAdaptersPickedFromExtensionDirectory()
58-
{
59-
var arguments = PrepareArguments(GetSampleTestAssembly(), null, null, FrameworkArgValue, resultsDirectory: TempDirectory.Path);
60-
61-
InvokeVsTest(arguments);
62-
StdOutputContains("Adapter lookup is being changed, please follow");
63-
}
64-
6556
public override string GetConsoleRunnerPath()
6657
{
6758
return Path.Combine(IntegrationTestEnvironment.PublishDirectory, $"Microsoft.TestPlatform.{IntegrationTestEnvironment.LatestLocallyBuiltNugetVersion}.nupkg", "tools",

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/DotnetTestMSBuildOutputTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public void MSBuildLoggerCanBeEnabledByBuildPropertyAndDoesNotEatSpecialChars(Ru
3434
// C:\Users\nohwnd\AppData\Local\Temp\vstest\xvoVt\UnitTest1.cs(41): error VSTEST1: (FailingTest) SampleUnitTestProject.UnitTest1.FailingTest() Assert.AreEqual failed. Expected:<2>. Actual:<3>. [C:\Users\nohwnd\AppData\Local\Temp\vstest\xvoVt\SimpleTestProject.csproj::TargetFramework=netcoreapp3.1]
3535

3636
StdOutputContains("error VSTEST1: FailingTest (");
37-
StdOutputContains("): Error Message: Assert.AreEqual failed. Expected:<ğğğ𦮙我們剛才從𓋴𓅓𓏏𓇏𓇌𓀀 (System.String)>. Actual:<3 (System.Int32)>.");
37+
StdOutputContains("): Error Message: Assert.AreEqual failed. Expected:<ğğğ𦮙我們剛才從𓋴𓅓𓏏𓇏𓇌𓀀>. Actual:<not the same>.");
3838
StdOutputContains("at TerminalLoggerUnitTests.UnitTest1.FailingTest() in");
3939
// We are sending those as low prio messages, they won't show up on screen but will be in binlog.
4040
//StdOutputContains("passed PassingTest");

test/Microsoft.TestPlatform.Acceptance.IntegrationTests/ExecutionTests.cs

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,6 @@ public void TestSessionTimeOutTests(RunnerInfo runnerInfo)
160160
StdOutputDoesNotContains("Total tests: 6");
161161
}
162162

163-
[TestMethod]
164-
[NetCoreTargetFrameworkDataSource]
165-
public void TestPlatformShouldBeCompatibleWithOldTestHost(RunnerInfo runnerInfo)
166-
{
167-
SetTestEnvironment(_testEnvironment, runnerInfo);
168-
169-
var assemblyPaths = GetAssetFullPath("SampleProjectWithOldTestHost.dll");
170-
var arguments = PrepareArguments(assemblyPaths, GetTestAdapterPath(), string.Empty, FrameworkArgValue, runnerInfo.InIsolationValue, resultsDirectory: TempDirectory.Path);
171-
172-
InvokeVsTest(arguments);
173-
174-
ValidateSummaryStatus(1, 0, 0);
175-
ExitCodeEquals(0);
176-
}
177-
178163
[TestMethod]
179164
[NetFullTargetFrameworkDataSource(inIsolation: true, inProcess: true)]
180165
[NetCoreTargetFrameworkDataSource]
@@ -509,8 +494,8 @@ public void RunTestsWhenProvidingJustPlatformDllsFailsTheRun(RunnerInfo runnerIn
509494
// or deps.json, and fails the run.
510495
SetTestEnvironment(_testEnvironment, runnerInfo);
511496

512-
var xunitAssemblyPath = _testEnvironment.GetTestAsset("SimpleTestProject.dll");
513-
var allDllsMatchingTestPattern = Directory.GetFiles(Path.GetDirectoryName(xunitAssemblyPath)!, "*test*.dll").Where(f => !f.EndsWith("SimpleTestProject.dll"));
497+
var testAssemblyPath = _testEnvironment.GetTestAsset("SimpleTestProject.dll");
498+
var allDllsMatchingTestPattern = Directory.GetFiles(Path.GetDirectoryName(testAssemblyPath)!, "*test*.dll").Where(f => !f.EndsWith("SimpleTestProject.dll"));
514499

515500
string assemblyPaths = string.Join(" ", allDllsMatchingTestPattern.Select(s => s.AddDoubleQuote()));
516501
InvokeVsTestForExecution(assemblyPaths, testAdapterPath: string.Empty, FrameworkArgValue, string.Empty);

0 commit comments

Comments
 (0)