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
So for general test failures I am at the moment doing the following
public void TestCleanup()
{
if (TestContext.CurrentTestOutcome != UnitTestOutcome.Passed)
{
However, there is no mechanism to perform an action when a specific test fails. If my Test1 fails, I perhaps want to do some action JUST for Test1, and not the other ones.
@alfonso-mireles, @sturlath,
You can check for TestContext.CurrentTestOutcome (as you have shown) and also check for the TestContext.TestName. Do you have any concern with using that pattern?
From @SturlaThorvalds here.
The text was updated successfully, but these errors were encountered: