Skip or fail a test in testng

To skip a test in testng we use skip exception

@Test
public void testA1(){
throw new SkipException("Skipping the test");
}

To fail a test in testng we use assert.fail

@Test
public void testA2(){
Assert.fail("failed test case ");}