1package test.testng56;
2
3import org.testng.annotations.AfterClass;
4import org.testng.annotations.BeforeClass;
5import org.testng.annotations.Test;
6
7
8/**
9 * This class/interface
10 */
11public class ParallelTest {
12  @BeforeClass
13  public void setup() {
14    System.out.println(Thread.currentThread().getId() + ":setup");
15  }
16
17  @AfterClass
18  public void teardown() {
19    System.out.println(Thread.currentThread().getId() + ":teardown");
20  }
21
22  @Test
23  public void test1() {
24    System.out.println(Thread.currentThread().getId() + ":test1");
25  }
26
27  @Test(dependsOnMethods = {"test1"})
28  public void test2() {
29    System.out.println(Thread.currentThread().getId() + ":test2");
30  }
31
32  @Test
33  public void test3() {
34    System.out.println(Thread.currentThread().getId() + ":test3");
35  }
36
37  @Test(dependsOnMethods = {"test3"})
38  public void test4() {
39    System.out.println(Thread.currentThread().getId() + ":test4");
40  }
41
42  @Test
43  public void test5() {
44    System.out.println(Thread.currentThread().getId() + ":test5");
45  }
46}
47