repeating test cases using testng in specific orde

2019-03-04 00:02发布

I want to be able to execute test cases in this specific order where in each one is dependent on the previous one. Note that TestA and TestC is going to be executed again in this sequence. How can I do that using testng and Java.

TestA -> TestB -> TestC -> TestA -> TestX -> TestC

标签: testng
1条回答
等我变得足够好
2楼-- · 2019-03-04 00:46

It is not possible to run the same test many times during one run.

Instead, you can have:

TestA -> TestB -> TestC -> TestD -> TestX -> TestY

where TestD and TestY are just calling TestA and TestC methods.

Then, you just have to configure dependency between methods: http://testng.org/doc/documentation-main.html#dependent-methods

查看更多
登录 后发表回答