How can we stop a test case not to run??
Dont use java comment to comment the test case function,
Please use @Ignore annotation to comment test case,
Example
on function level
@Ignore("not ready yet")
@Test public void testOnething() {
System.out.println("This method is ignored because its not ready yet");
}
on class level
@Ignore public class Ignored {
@Test public void test1() {
System.out.println("Ignored test case 1");
}
@Test public void test2() {
System.out.println("Ignored test case 2");
}
}
Dont use java comment to comment the test case function,
Please use @Ignore annotation to comment test case,
Example
on function level
@Ignore("not ready yet")
@Test public void testOnething() {
System.out.println("This method is ignored because its not ready yet");
}
on class level
@Ignore public class Ignored {
@Test public void test1() {
System.out.println("Ignored test case 1");
}
@Test public void test2() {
System.out.println("Ignored test case 2");
}
}
No comments:
Post a Comment