We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the TestCleanup method, the TestContext.CurrentTestOutcome property is always InProgress rather than the actual current test outcome.
TestCleanup
TestContext.CurrentTestOutcome
InProgress
Using the old test framework (bundled with VS, New > Project > Unit Test) the outcome is set correctly.
using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] public class MyTestClass { public TestContext TestContext { get; set; } [TestMethod] public void PassTest() { Assert.IsTrue(true); } [TestMethod] public void InconclusiveTest() { Assert.Inconclusive(); } [TestMethod] public void FailTest() { Assert.Fail(); } [TestCleanup] public void TestCleanup() { System.Console.WriteLine($"{TestContext.TestName}: {TestContext.CurrentTestOutcome}"); } }
TestContext.CurrentTestOutcome is set to the actual outcome type of the current test.
Image taken when executing the code above using the old VS-bundled framework.
TestContext.CurrentTestOutcome is always InProgress
Image taken when executing the code above using the new NuGet package framework.
MSTest.TestAdapter
MSTest.TestFramework
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @mjcheetham. Created microsoft/testfx#89.
Sorry, something went wrong.
Closing since this is already tracked in testfx repo.
No branches or pull requests
Description
In the
TestCleanup
method, theTestContext.CurrentTestOutcome
property is alwaysInProgress
rather than the actual current test outcome.Using the old test framework (bundled with VS, New > Project > Unit Test) the outcome is set correctly.
Steps to reproduce
Expected behavior
TestContext.CurrentTestOutcome
is set to the actual outcome type of the current test.Image taken when executing the code above using the old VS-bundled framework.
Actual behavior
TestContext.CurrentTestOutcome
is alwaysInProgress
Image taken when executing the code above using the new NuGet package framework.
Environment
MSTest.TestAdapter
MSTest.TestFramework
The text was updated successfully, but these errors were encountered: