TestContext is null

Pretty simple test:

[TestClass] public class MyTestClass { private TestContext _testContext; protected TestContext TestContext { get { return _testContext; } set { _testContext = value; } } [TestMethod] [HostType("ASP.NET")] [UrlToTest("http://localhost/MyPage.aspx")] public void TestMyPage() { Assert.IsNotNull(TestContext); } } 

Failure ... Now I am using VS2008 Development edition. Is there any way to fix this? Or do I need to have a Test (or Team Suite) release?

Thanks.

PS Access to the TestContext object is required to access it. RequestedPage Property

+6
unit-testing visual-studio testing
source share
1 answer

I am sure TestContext must be publicly available so that the infrastructure can install it for you. Have you tried to make it publicly available?

+8
source share

All Articles