C# – What would be an alternate to [TearDown] and [SetUp] in MSTest

automated-testscmstestselenium

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?

Best Answer

You would use [TestCleanup] and [TestInitialize] respectively.