# 6\. TestNG忽略测试
有时候我们写的用例没准备好,或者该次测试不想运行此用例,那么删掉显然不明智,那么就可以通过注解`@Test(enabled = false)`来将其忽略掉,此用例就不会运行了,如下范例:
```
import org.testng.annotations.Test;
public class TestCase1 {
@Test(enabled=false)
public void TestNgLearn1() {
System.out.println("this is TestNG test case1");
}
@Test
public void TestNgLearn2() {
System.out.println("this is TestNG test case2");
}
}
```
运行结果:
```
this is TestNG test case2
PASSED: TestNgLearn2
```