Jaka byłaby alternatywa dla [TearDown] i [SetUp] w MSTest?
Kiedy używam frameworka MSTest i kopiuję kod wygenerowany przez Selenium IDE, MSTest nie rozpoznaje [TearDown]
i [SetUp]
. Jaka jest alternatywa dla tego?
199
Author: Marcos Dimitrio, 2011-06-01
4 answers
Użyłbyś odpowiednio [TestCleanup]
i [TestInitialize]
.
219
Author: Tejs,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-31 21:26:32
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-31 21:26:32
Należy pamiętać, że metody Initialize / Cleanup muszą używać odpowiedniego podpisu.
[AssemblyInitialize()]
public static void AssemblyInit(TestContext context) {}
[ClassInitialize()]
public static void ClassInit(TestContext context) {}
[TestInitialize()]
public void Initialize() {}
[TestCleanup()]
public void Cleanup() {}
[ClassCleanup()]
public static void ClassCleanup() {}
[AssemblyCleanup()]
public static void AssemblyCleanup() {}
216
Author: Dunken,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-01-23 09:54:08
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-01-23 09:54:08
[TestInitialize]
i [TestCleanup]
na poziomie testu indywidualnego, [ClassInitialize]
i [ClassCleanup]
na poziomie klasy.
95
Author: John Gardner,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-31 21:28:35
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-05-31 21:28:35
Możesz użyć [TestInitialize]
dla [SetUp]
i [TestCleanup]
dla [TearDown]
.
6
Author: Mohsin Awan,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-01-06 22:38:27
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-01-06 22:38:27