Tuesday 7 January 2014

set the execution order for TestNg Testcases.

In TestNG I have some test's  Test1-Test2-
Test3-Test4-Test5I want to run my execution 
order is Test5-Test1-Test3-Test2-Test4.How 
do you set the execution order can you explain 
for that?

package programs;import org.testng.annotations.Test;public class testngexecution { @Test(priority=2)public void test1(){System.out.print("Inside Test1"); }@Test(priority=4)public void test2(){System.out.print("Inside Test2"); }@Test(priority=3)public void test3(){System.out.print("Inside Test3"); }@Test(priority=5)public void test4(){System.out.print("Inside Test4"); }@Test(priority=1)public void test5(){System.out.print("Inside Test5"); }


Back to Selenium Interview Questions and Answers

1 comment:

  1. Hi,



    I have read yourSelenium blog.It"s very attractive and impressive.Very useful to me, I like it your blog
    Thanks for sharing this blog.......

    Thank you
    priya

    ReplyDelete