JUnit 4 Tutorial 3 – Ignore Test
Published: May 19, 2009 , Updated: April 1, 2010 , Author: mkyong
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.
Any Java questions or problems? please post at this JavaNullPointer.com forum, see you there ~
Wow very useful..
Thanks For You Article, Very Interesting I would often visit here.
[...] Tutorial 3 – Ignore Test Ignore certain method for unit test. [...]