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?
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
[TestInitialize]
and[TestCleanup]
at the individual test level,[ClassInitialize]
and[ClassCleanup]
at the class level.You can use
[TestInitialize]
for[SetUp]
and[TestCleanup]
for[TearDown]
.You would use
[TestCleanup]
and[TestInitialize]
respectively.Keep in mind that your Initialize/Cleanup methods have to use the right signature.
http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.classinitializeattribute.aspx