非常简单的测试:
[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);
}
}
失败。。。现在我使用的是VS2008开发版。有没有可能解决这个问题?或者我需要一个测试(或团队套件)版本?
谢谢。
p.s.需要访问testcontext对象才能访问其requestedpage属性