I have test:
public class MyTest {
@Test
public void test_1(){
assertTrue(false);
}
@Test
public void test_2(){
assertTrue(false);
}
and CustomListener:
public class CustomerListener extends RunListener {
@Override
public void testFailure(Failure failure) throws Exception {
if(some_condition) {
super.testAssumptionFailure(failure);
} else {
super.testFailure(failure);
}
}
Runing test using maven:
mvn test -Dtest=MyTest.java
CustomerListener worked but all the times tests marked as failed ('some_condition' are true). How I can mark some tests as skipped using CustomerListener?