MSTest中[TearDown]和[SetUp]的替代方案是什么?

问题描述:

当我使用MSTest Framework并复制Selenium IDE为我生成的代码时,MSTest无法识别[TearDown][SetUp].有什么替代方法?

When I use MSTest Framework, and copy the code that Selenium IDE generated for me, MSTest doesn't recognize [TearDown] and [SetUp]. What is the alternative to this?

您将分别使用[TestCleanup][TestInitialize].