Package rife.bld.extension.testing
Annotation Interface EnabledOnCi
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@ExtendWith(EnabledOnCiCondition.class)
public @interface EnabledOnCi
JUnit annotation for enabling tests on CI/CD environments.
Example usage:
public class MyTest {
@Test
@EnabledOnCi
public void testMethod() {
// This test will be enabled on CI/CD environments
}
}
The decision is made by checking whether the CI environment variable is defined. It can be set manually
but is set automatically by most CI/CD environments, such as
GitHub Actions,
GitLab, etc.
- Since:
- 1.0
- Author:
- Erik C. Thauvin