In Visual Studio 2010 the Test Results view was able to display the unit test currently in progress. While using Visual Studio 2012 I have not been able to identify the unit test that is being executed in the Test Explorer. How would I identify the unit test in progress in Visual Studio 2012 Test Explorer?
The interface for ITestExecutor
, which is a required interface for a unit test plugin shows that RunTests has a context of IFrameworkHandle
public interface ITestExecutor
{
void RunTests(IEnumerable<string> sources, IRunContext runContext, IFrameworkHandle frameworkHandle);
void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, IFrameworkHandle frameworkHandle);
void Cancel();
}
IFrameworkHandle
has methods for recording the status of the tests
RecordStart(TestCase testCase)
RecordResult(TestResult testResult)
RecordEnd(TestCase testCase, TestOutcome testOutcome)
So it would appear it is possible for the test window to show an icon while the test is running. However, I built a test fixture using a wizard created class library for MS-Test as I expect it would be the most feature complete of all the runners. I added the following test class
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
{
Thread.Sleep(10000);
Assert.IsTrue(true);
}
}
There was no indication that the test was running for 10 seconds. So I would say that the VS2012's [Update 3 RC] test window does not show the currently running test. A future update may improve the situation as it seems entirely possible given the unit test framework's API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With