- 我有以下定义的场景。
- 我想使用 testng 注释。
- 我想先执行 methodfortestcase1() 。
- 然后我想第二次执行 testcase1() 。
- 然后我想将 methodfortestcase2() 作为第三个执行。
- 然后我想执行 testcase2() 作为第四个。
- 我尝试过使用不同的 testng 注释组合,例如 Before Suite、Beforeclass、Beforemethod 和 BeforeTest。
- 但是,我没有得到正确的测试执行顺序。
- 如何将注释用于以下定义的场景?
我的代码将如下所示:
1.methodfortestcase1() 2.testcase1() 3.methodefortestcase2() 4.testcase2()