Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 2.07 KB

README.md

File metadata and controls

28 lines (19 loc) · 2.07 KB

Maven Central License

codecov Coverage Status Codacy Badge

Build Status Build status Sputnik

DevOps By Rultor.com

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:

  1. Create class implementing name.valery1707.junit.rule.ConditionalIgnoreRule.IgnoreCondition
  2. Add @org.junit.Rule-annotated field in test class with name.valery1707.junit.rule.ConditionalIgnoreRule
  3. 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