You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TestMethod failures are masked by TestCleanup exceptions in the outcome. #58
Code that affects this change is at src\testadapter\execution\testmethodinfo.RunTestCleanupMethod().
Need to decide if this is something we want to combine or do we just want to show the testmethod exception details.
I'd also like to add that when Debugging a single test in Visual Studio 2017, there is no exposure to the user that the [TestInitialize()] and [TestMethod()] attributed methods are even executed (you can put breakpoints at the top of each method and they are skipped).
Next thing you know an exception is thrown in [TestCleanup()], which makes it really hard to debug your underlying issue. I had to engage the MSTest team to figure out what was going on.
Activity
AbhitejJohn commentedon Feb 7, 2017
Code that affects this change is at src\testadapter\execution\testmethodinfo.RunTestCleanupMethod().
Need to decide if this is something we want to combine or do we just want to show the testmethod exception details.
pvlakshm commentedon Feb 24, 2017
This happens only when the TestMethod fails AND the TestCleanup method fails.
AbhitejJohn commentedon Mar 29, 2017
Reopening this - This is both misleading and is a compat break from MSTest V1 which displays both the details. For instance with the below code
this is the error info in Test Explorer.

smadala commentedon May 3, 2017
Customer are hitting this issue: Assembly load failures in
TestInitialize()are not getting reported When there is failure inTestCleanup().kevintbrown commentedon May 4, 2017
I'd also like to add that when Debugging a single test in Visual Studio 2017, there is no exposure to the user that the
[TestInitialize()]and[TestMethod()]attributed methods are even executed (you can put breakpoints at the top of each method and they are skipped).Next thing you know an exception is thrown in
[TestCleanup()], which makes it really hard to debug your underlying issue. I had to engage the MSTest team to figure out what was going on.(Thanks again for the help!)
smadala commentedon May 4, 2017
Enable logging also helps to find root cause,following blog post helps how to enable logging enable unit test execution logs