开发者

Selenium Test Suite: Failover test execution

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜