TestNG最简单的测试

 下面是TestNG的最简单的一个例子

package firstprograme;

import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

public class NewTest {
     @BeforeClass //只运行一次
     public void beforeClass() {
          System.out.println("this is before class");
     }

     @Test
     public void TestNgLearn() {
          System.out.println("this is TestNG test case");
     }

     @AfterClass //只运行一次
     public void afterClass() {
          System.out.println("this is after class");
     }
}

 

 

posted on 2018-03-12 13:40  美含卡卡  阅读(126)  评论(0)    收藏  举报

导航