TestNG – How to ignore a test method

In this tutorial, we will show you how to ignore a test method with @Test(enabled = false). TestIgnore.java package com.mkyong.testng.examples.ignore; import org.testng.Assert; import org.testng.annotations.Test; public class TestIgnore { @Test //default enable=true public void test1() { Assert.assertEquals(true, true); } @Test(enabled = true) public void test2() { Assert.assertEquals(true, true); } @Test(enabled = false) public void test3() { …

Read more