开发者

Selenium Test Suite: Failover test execution

开发者 https://www.devze.com 2023-03-15 10:18 出处:网络
I have a test suite written up in Java using Selenium-RC and TestNG, per - public class testSuite extends SelenestTestCase {

I have a test suite written up in Java using Selenium-RC and TestNG, per -

public class testSuite extends SelenestTestCase {

@BeforeTest 
... 
@Test
...
@Test
...
@AfterTest
...

To improve robustness, I need to implement a set of steps that would be executed in case any of the commands within a @Test fails. These steps could simply be the restoration of the initial test state, so the next @Test can be executed.

Any ideas on how this can be 开发者_高级运维implemented within this framework?

Thanks.


You can implement your own test listener and annotate your test class. Or just use @BeforeMethod and set the initial state before each test.

0

精彩评论

暂无评论...
验证码 换一张
取 消