testng--忽略测试

package com.ignore;

import org.testng.annotations.Test;

public class IgnoreTest {
@Test
public void ignore01(){
System.out.println("ignore01执行");
}

@Test(enabled = false)
public void ignore02(){
System.out.println("ignore02执行");
}
@Test(enabled = true)
public void ignore03(){
System.out.println("ignore03 执行");
}
}

--结果

ignore01执行
ignore03 执行

===============================================
Default Suite
Total tests run: 2, Failures: 0, Skips: 0
===============================================

@Test(enabled = false)为忽略
 @Test(enabled = true)为默认执行==@Test


posted on 2021-07-31 21:03  thy520  阅读(58)  评论(0编辑  收藏  举报