diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 978375ba0a..1a05e5165c 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -10,4 +10,4 @@
"rollForward": false
}
}
-}
\ No newline at end of file
+}
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 93f6583007..1424139762 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -17,13 +17,13 @@
https://dev.azure.com/devdiv/DevDiv/_git/vs-code-coverage
17978349dbb9a89496b27bb0b0acd65d02d64e7c
-
+
https://github.com/microsoft/testfx
- 32d35d6c457e3466263e23e8d9551481c974f1dd
+ e5487e9800ebba07f2247e70cace9738fe4e917d
-
+
https://github.com/microsoft/testfx
- 32d35d6c457e3466263e23e8d9551481c974f1dd
+ e5487e9800ebba07f2247e70cace9738fe4e917d
diff --git a/eng/Versions.props b/eng/Versions.props
index 2b4a565d67..ee0fb45b37 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -10,7 +10,7 @@
11.0.0-beta.26302.1
18.8.0-preview.26302.7
- 4.3.0-preview.26302.5
- 2.3.0-preview.26302.5
+ 4.3.0-preview.26303.14
+ 2.3.0-preview.26303.14
diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsArtifactUploaderTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsArtifactUploaderTests.cs
index 48b6f7ca47..703e879aaa 100644
--- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsArtifactUploaderTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsArtifactUploaderTests.cs
@@ -81,14 +81,15 @@ public async Task TagsOnlyMode_EmitsOnlyBuildTags()
await uploader.ConsumeAsync(CreateProducer(), CreateFailedTestNodeUpdateMessage(), CancellationToken.None).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEquivalent(
+ Assert.AreSequenceEqual(
new[]
{
"##vso[build.addbuildtag]has-crashdump",
"##vso[build.addbuildtag]has-hangdump",
"##vso[build.addbuildtag]has-test-failures",
},
- GetFormattedLines());
+ GetFormattedLines(),
+ SequenceOrder.InAnyOrder);
Assert.DoesNotContain(line => line.Contains("artifact.upload", StringComparison.Ordinal), GetFormattedLines());
Assert.IsEmpty(GetWarnings());
}
@@ -134,7 +135,7 @@ public async Task FilesMode_SkipsArtifactsOutsideResultsDirectory()
await uploader.OnTestSessionStartingAsync(new TestSessionContext()).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEqual(
+ Assert.AreSequenceEqual(
new[] { $"##vso[artifact.upload containerfolder=Artifacts;artifactname=Artifacts]{InResults("inside.trx")}" },
GetFormattedLines());
}
@@ -158,7 +159,7 @@ public async Task AllMode_EmitsBuildTagsAndArtifactLines()
await uploader.ConsumeAsync(CreateProducer(), CreateFailedTestNodeUpdateMessage(), CancellationToken.None).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEqual(
+ Assert.AreSequenceEqual(
new[]
{
"##vso[build.addbuildtag]has-crashdump",
@@ -187,7 +188,7 @@ public async Task IncludeAndExcludeGlobs_AreAppliedToArtifactUploads()
await uploader.OnTestSessionStartingAsync(new TestSessionContext()).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEqual(
+ Assert.AreSequenceEqual(
new[] { $"##vso[artifact.upload containerfolder=Artifacts;artifactname=Artifacts]{InResults("keep.trx")}" },
GetFormattedLines());
}
@@ -207,13 +208,14 @@ public async Task ConsumedArtifacts_DetectCrashAndHangDumps()
await uploader.ConsumeAsync(CreateProducer("HangDumpProcessLifetimeHandler", "Hang dump"), CreateFileArtifact(InResults("hang", "dump.log")), CancellationToken.None).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEquivalent(
+ Assert.AreSequenceEqual(
new[]
{
"##vso[build.addbuildtag]has-crashdump",
"##vso[build.addbuildtag]has-hangdump",
},
- GetFormattedLines());
+ GetFormattedLines(),
+ SequenceOrder.InAnyOrder);
}
[TestMethod]
@@ -268,7 +270,7 @@ public async Task MissingTfBuild_EmitsWarningAndSkipsOutput()
await uploader.ConsumeAsync(CreateProducer(), CreateFailedTestNodeUpdateMessage(), CancellationToken.None).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEqual(
+ Assert.AreSequenceEqual(
new[] { "Azure DevOps artifact upload was requested, but TF_BUILD is not set to 'true'; skipping Azure DevOps artifact upload and build tags." },
GetWarnings());
Assert.IsEmpty(GetFormattedLines());
@@ -329,7 +331,7 @@ public async Task ArtifactUploadPaths_AreEscaped()
await uploader.OnTestSessionStartingAsync(new TestSessionContext()).ConfigureAwait(false);
await uploader.OnTestSessionFinishingAsync(new TestSessionContext()).ConfigureAwait(false);
- CollectionAssert.AreEqual(
+ Assert.AreSequenceEqual(
new[] { $"##vso[artifact.upload containerfolder=Artifacts;artifactname=Artifacts]{escapedSpecialPath}" },
GetFormattedLines());
}
diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLivePublishingTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLivePublishingTests.cs
index b5b67d3060..bb2c659060 100644
--- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLivePublishingTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/AzureDevOpsLivePublishingTests.cs
@@ -304,7 +304,7 @@ public async Task AzureDevOpsTestResultsClient_HonorsRetryAfterOn429()
Assert.AreEqual(7, runId);
Assert.HasCount(1, task.DelayCalls);
Assert.AreEqual(TimeSpan.FromSeconds(3), task.DelayCalls[0]);
- CollectionAssert.AreEqual(new[] { "send:1", "delay:3", "send:2" }, events);
+ Assert.AreSequenceEqual(new[] { "send:1", "delay:3", "send:2" }, events);
}
[TestMethod]
diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/CrashDumpTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/CrashDumpTests.cs
index e212eecb35..3b06be9cf5 100644
--- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/CrashDumpTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/CrashDumpTests.cs
@@ -449,7 +449,7 @@ public async Task OnTestHostProcessExitedAsync_OnlyPublishesDumpsThatAppearedDur
.OrderBy(static p => p, StringComparer.Ordinal)
.ToArray();
string[] expected = new[] { fresh1, fresh2 }.OrderBy(static p => p, StringComparer.Ordinal).ToArray();
- CollectionAssert.AreEqual(expected, publishedDumps);
+ Assert.AreSequenceEqual(expected, publishedDumps);
}
finally
{
@@ -499,7 +499,7 @@ public async Task OnTestHostProcessExitedAsync_PatternWithMultiplePlaceholders_D
.OfType()
.Select(static a => a.FileInfo.FullName)
.ToArray();
- CollectionAssert.AreEqual(new[] { testhostDump }, publishedDumps);
+ Assert.AreSequenceEqual(new[] { testhostDump }, publishedDumps);
// The "expected dump not found" warning must NOT be emitted: the testhost dump was
// recognized via the regex even though `expectedDumpFile` (literal `%p` substitution)
@@ -550,7 +550,7 @@ public async Task OnTestHostProcessExitedAsync_PatternWithRepeatedPidPlaceholder
.OfType()
.Select(static a => a.FileInfo.FullName)
.ToArray();
- CollectionAssert.AreEqual(new[] { testhostDump }, publishedDumps);
+ Assert.AreSequenceEqual(new[] { testhostDump }, publishedDumps);
string captured = string.Join(" | ", outputDevice.Displayed);
Assert.DoesNotContain("dump_555_backup_555.dmp", captured, "CannotFindExpectedCrashDumpFile must not be displayed when the testhost dump was recognized via the regex.");
}
@@ -602,7 +602,7 @@ public async Task OnTestHostProcessExitedAsync_TesthostAndChildBothCrashWithMult
.OrderBy(static p => p, StringComparer.Ordinal)
.ToArray();
string[] expected = new[] { testhostDump, childDump }.OrderBy(static p => p, StringComparer.Ordinal).ToArray();
- CollectionAssert.AreEqual(expected, publishedDumps);
+ Assert.AreSequenceEqual(expected, publishedDumps);
string captured = string.Join(" | ", outputDevice.Displayed);
Assert.DoesNotContain("Dump_%e_123.dmp", captured, "CannotFindExpectedCrashDumpFile must not be displayed when the testhost dump was recognized via the regex.");
}
diff --git a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/TrxStreamingSerializerTests.cs b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/TrxStreamingSerializerTests.cs
index d3dd907a8a..26d06e6fd6 100644
--- a/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/TrxStreamingSerializerTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Extensions.UnitTests/TrxStreamingSerializerTests.cs
@@ -58,7 +58,7 @@ public void RoundTrip_AllFieldsPopulated_ReadsBackEqual()
Assert.AreEqual(TrxStreamMessageKind.DebugOrTrace, round.Messages[2].Kind);
Assert.IsNull(round.Messages[2].Message);
Assert.IsNotNull(round.Categories);
- CollectionAssert.AreEqual(new[] { "cat-a", "cat-b" }, round.Categories.ToArray());
+ Assert.AreSequenceEqual(new[] { "cat-a", "cat-b" }, round.Categories.ToArray());
Assert.IsNotNull(round.Metadata);
Assert.AreEqual("k", round.Metadata[0].Key);
Assert.AreEqual("v", round.Metadata[0].Value);
diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/CommandLineConfigurationExtensionsTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/CommandLineConfigurationExtensionsTests.cs
index f33cce7026..b627ef0cc3 100644
--- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/CommandLineConfigurationExtensionsTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/CommandLineConfigurationExtensionsTests.cs
@@ -110,7 +110,7 @@ public void TryGetCommandLineOptionArguments_SingleScalarValue_ReturnsSingleElem
Assert.IsTrue(configuration.TryGetCommandLineOptionArguments("hangdump-timeout", out string[]? arguments));
Assert.IsNotNull(arguments);
- CollectionAssert.AreEqual(new[] { "5m" }, arguments);
+ Assert.AreSequenceEqual(new[] { "5m" }, arguments);
}
[TestMethod]
@@ -124,7 +124,7 @@ public void TryGetCommandLineOptionArguments_IndexedEntries_ReturnsContiguousArr
Assert.IsTrue(configuration.TryGetCommandLineOptionArguments("filter-uid", out string[]? arguments));
Assert.IsNotNull(arguments);
- CollectionAssert.AreEqual(new[] { "a", "b", "c" }, arguments);
+ Assert.AreSequenceEqual(new[] { "a", "b", "c" }, arguments);
}
[TestMethod]
@@ -140,7 +140,7 @@ public void TryGetCommandLineOptionArguments_IndexedEntriesWinOverBareKey()
Assert.IsTrue(configuration.TryGetCommandLineOptionArguments("foo", out string[]? arguments));
Assert.IsNotNull(arguments);
- CollectionAssert.AreEqual(new[] { "indexed" }, arguments);
+ Assert.AreSequenceEqual(new[] { "indexed" }, arguments);
}
[TestMethod]
@@ -175,14 +175,14 @@ public async Task CommandLineHandler_DelegatesToConfiguration_WhenSupplied()
Assert.IsTrue(options.IsOptionSet("filter-uid"));
Assert.IsTrue(options.TryGetOptionArgumentList("hangdump-timeout", out string[]? timeoutArgs));
- CollectionAssert.AreEqual(new[] { "10m" }, timeoutArgs);
+ Assert.AreSequenceEqual(new[] { "10m" }, timeoutArgs);
Assert.IsTrue(options.TryGetOptionArgumentList("hangdump", out string[]? hangdumpArgs));
Assert.IsNotNull(hangdumpArgs);
Assert.IsEmpty(hangdumpArgs);
Assert.IsTrue(options.TryGetOptionArgumentList("filter-uid", out string[]? filterArgs));
- CollectionAssert.AreEqual(new[] { "a", "b" }, filterArgs);
+ Assert.AreSequenceEqual(new[] { "a", "b" }, filterArgs);
}
private static IConfiguration BuildConfiguration(IReadOnlyList> entries)
diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/JsonCommandLineOptionsTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/JsonCommandLineOptionsTests.cs
index 397441a92d..05267645f8 100644
--- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/JsonCommandLineOptionsTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Configuration/JsonCommandLineOptionsTests.cs
@@ -52,7 +52,7 @@ public async Task EnumerateCommandLineOptions_ScalarString_YieldsSingleArgumentE
JsonCommandLineOptionEntry entry = Assert.ContainsSingle(entries);
Assert.AreEqual("timeout", entry.OptionName);
Assert.IsFalse(entry.IsDisabled);
- CollectionAssert.AreEqual(new[] { "30s" }, entry.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "30s" }, entry.Arguments.ToArray());
}
[TestMethod]
@@ -88,7 +88,7 @@ public async Task EnumerateCommandLineOptions_Array_YieldsAllArguments()
JsonCommandLineOptionEntry entry = Assert.ContainsSingle(entries);
Assert.AreEqual("filter-uid", entry.OptionName);
Assert.IsFalse(entry.IsDisabled);
- CollectionAssert.AreEqual(new[] { "a", "b", "c" }, entry.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "a", "b", "c" }, entry.Arguments.ToArray());
}
[TestMethod]
@@ -164,7 +164,7 @@ public async Task EnumerateCommandLineOptions_MixedEntries_AllReturned()
Assert.HasCount(4, entries);
JsonCommandLineOptionEntry timeout = entries.Single(e => e.OptionName == "timeout");
- CollectionAssert.AreEqual(new[] { "30s" }, timeout.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "30s" }, timeout.Arguments.ToArray());
Assert.IsFalse(timeout.IsDisabled);
JsonCommandLineOptionEntry noBanner = entries.Single(e => e.OptionName == "no-banner");
@@ -175,7 +175,7 @@ public async Task EnumerateCommandLineOptions_MixedEntries_AllReturned()
Assert.IsTrue(hangdump.IsDisabled);
JsonCommandLineOptionEntry filterUid = entries.Single(e => e.OptionName == "filter-uid");
- CollectionAssert.AreEqual(new[] { "a", "b" }, filterUid.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "a", "b" }, filterUid.Arguments.ToArray());
}
// ---------------------------------------------------------------------
diff --git a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Services/CurrentTestApplicationModuleInfoTests.cs b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Services/CurrentTestApplicationModuleInfoTests.cs
index a7e15e3ebf..5feb0fdf50 100644
--- a/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Services/CurrentTestApplicationModuleInfoTests.cs
+++ b/test/UnitTests/Microsoft.Testing.Platform.UnitTests/Services/CurrentTestApplicationModuleInfoTests.cs
@@ -21,7 +21,7 @@ public void GetCurrentExecutableInfo_AppHost_NoPassedArgs_UsesEnvironmentArgsSki
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "--filter", "MyTest" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "--filter", "MyTest" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -35,7 +35,7 @@ public void GetCurrentExecutableInfo_AppHost_WithPassedArgs_UsesPassedArgsInstea
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -60,7 +60,7 @@ public void GetCurrentExecutableInfo_DotnetMuxer_NoPassedArgs_PrependsExecToEnvi
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "exec", "myapp.dll", "--filter", "MyTest" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "exec", "myapp.dll", "--filter", "MyTest" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -74,7 +74,7 @@ public void GetCurrentExecutableInfo_DotnetMuxer_WithPassedArgs_KeepsDllPathAndU
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "exec", "myapp.dll", "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "exec", "myapp.dll", "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -86,7 +86,7 @@ public void GetCurrentExecutableInfo_DotnetMuxer_WithPassedArgsAndEmptyEnvironme
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "exec", "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "exec", "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -98,7 +98,7 @@ public void GetCurrentExecutableInfo_MonoMuxer_NoPassedArgs_UsesEnvironmentArgsA
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "myapp.dll", "--filter", "MyTest" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "myapp.dll", "--filter", "MyTest" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -112,7 +112,7 @@ public void GetCurrentExecutableInfo_MonoMuxer_WithPassedArgs_KeepsDllPathAndUse
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "myapp.dll", "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "myapp.dll", "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -124,7 +124,7 @@ public void GetCurrentExecutableInfo_MonoMuxer_WithPassedArgsAndEmptyEnvironment
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
}
[TestMethod]
@@ -142,7 +142,7 @@ public void GetCurrentExecutableInfo_PassedArgsAreSnapshotted_CallerMutationDoes
ExecutableInfo executable = info.GetCurrentExecutableInfo();
- CollectionAssert.AreEqual(new[] { "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
+ Assert.AreSequenceEqual(new[] { "--retry-failed-tests", "1" }, executable.Arguments.ToArray());
}
private static Mock CreateDotnetMuxerEnvironment(string[] commandLineArgs)