My code will be like below:
1.methodfortestcase1() 2.testcase1() 3.methodefortestcase2() 4.testcase2()
To get the desired result you'll likely have to use a combination of @Test(priority)
and dependsOnMethods
. Keep in mind that when using dependsOnMethods
that if a dependency method fails, the dependents will not be run.