-
Notifications
You must be signed in to change notification settings - Fork 291
Open
Labels
Area: FixturesArea: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)
Milestone
Description
An exception in AssemblyCleanup hides test exception
Steps To Reproduce
Run this:
[TestClass]
public sealed class Test1
{
[TestMethod]
public void TestMethod1()
{
Assert.Fail("I want to see this");
}
[AssemblyCleanup]
public static void Shutdown()
{
throw new Exception("... but I only see this");
}
}Expected behavior
"I want to see this" should be seen in the output
Actual behavior
but this is the only output:
...\MSTestProject1.dll : error TESTERROR:
TestMethod1 (140ms): Fehlermeldung: Fehler bei der Methode "Test1.Shutdown" für die Assemblybereinigung. Fehlermeldung: System.Exception: ... but I only see this. "StackTrace": bei MSTestPro
ject1.Test1.Shutdown() in ...\MSTestProject1\Test1.cs:Zeile 15.
Stapelverfolgung:
bei Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.TestAssemblyInfo.ExecuteAssemblyCleanup() in /_/src/Adapter/MSTest.TestAdapter/Execution/TestAssemblyInfo.cs:Zeile 316.
bei Microsoft.VisualStudio.TestPlatform.MSTest.TestAdapter.Execution.UnitTestRunner.RunAssemblyCleanupIfNeeded(ITestContext testContext, ClassCleanupManager classCleanupManager, TypeCache typ
Copilot
Metadata
Metadata
Assignees
Labels
Area: FixturesArea: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)