Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve error messages to include stderr in AppDomainTests
Co-authored-by: Youssef1313 <[email protected]>
  • Loading branch information
Copilot and Youssef1313 committed Nov 7, 2025
commit 9d894e17dc1881923a030068f0fad81835d2dbb1
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public async Task RunTests_With_VSTestConsole_Directly(bool? disableAppDomain)
workingDirectory: testAsset.TargetAssetPath,
cancellationToken: TestContext.CancellationToken);

Assert.AreEqual(0, exitCode, $"Tests failed: {commandLine.StandardOutput}");
Assert.AreEqual(0, exitCode, $"Tests failed.\nStdOut: {commandLine.StandardOutput}\nStdErr: {commandLine.ErrorOutput}");
Assert.IsTrue(commandLine.StandardOutput.Contains("Passed 2") || commandLine.StandardOutput.Contains("Passed: 2"),
$"Expected 2 passed tests but got: {commandLine.StandardOutput}");
}
Expand Down Expand Up @@ -226,7 +226,7 @@ public async Task DiscoverTests_With_VSTestConsole_Directly(bool? disableAppDoma
workingDirectory: testAsset.TargetAssetPath,
cancellationToken: TestContext.CancellationToken);

Assert.AreEqual(0, exitCode, $"Discovery failed: {commandLine.StandardOutput}");
Assert.AreEqual(0, exitCode, $"Discovery failed.\nStdOut: {commandLine.StandardOutput}\nStdErr: {commandLine.ErrorOutput}");
Assert.IsTrue(commandLine.StandardOutput.Contains("AppDomainTests.UnitTest1.TestMethod1"),
$"Expected to find TestMethod1 but got: {commandLine.StandardOutput}");
Assert.IsTrue(commandLine.StandardOutput.Contains("AppDomainTests.UnitTest1.TestMethod2"),
Expand Down
Loading