This “Ignored” means the method is not ready to test, the JUnit engine will just bypass this method.

import org.junit.*;
 
/**
 * JUnit Ignore Test
 * @author mkyong
 *
 */
public class JunitTest3 {
 
	@Ignore("Not Ready to Run")  
	@Test
	public void divisionWithException() {  
	  System.out.println("Method is not ready yet");
	}  
 
}

In above example, JUnit will not test the divisionWithException() method.

This article was posted in unittest category.

Related Posts