- I have below defined scenario.
- I want to use testng annotation.
- I want to execute methodfortestcase1() as first.
- And then I want to execute testcase1() as second.
- And then I want to execute methodfortestcase2() as third.
- And then I want to execute testcase2() as fourth.
- I have tried with different combinations of testng annotations such as Before Suite,Beforeclass,Beforemethod and BeforeTest.
- But, I am not getting the correct order of the test executions.
- How can I use the annotation for below defined scenario?
My code will be like below:
1.methodfortestcase1() 2.testcase1() 3.methodefortestcase2() 4.testcase2()