Library for JUnit 4 with some useful rules
ConditionalIgnoreRule
Core mechanism for implementing custom conditions for ignore tests.
You can ignore test by custom rule only in 3 steps:
- Create class implementing
name.valery1707.junit.rule.ConditionalIgnoreRule.IgnoreCondition
- Add
@org.junit.Rule
-annotated field in test class withname.valery1707.junit.rule.ConditionalIgnoreRule
- Add annotation
name.valery1707.junit.rule.ConditionalIgnoreRule.ConditionalIgnore
with condition created at first step
Conditions can be reused by many test methods and ever test classes.
Base implementations of conditionals:
BaseEnvironmentCondition
- test of environment values by regexp or simple equals