aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@intl.att.com>2018-08-12 12:20:55 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-12 12:20:55 +0000
commit91b057331b92ecf7f3c2d495681b05295dc8346c (patch)
tree0ce3f821ada8ad518784f7f9869db4b537ba3237 /vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java
parent9152b2ae03c4751b492a219993d85d522c58b383 (diff)
parent4a4dcc5185f8ba5a28c7f9fef509f32c0c2389e6 (diff)
Merge "vid-automation selenium tests"
Diffstat (limited to 'vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java')
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java b/vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java
new file mode 100644
index 00000000..6dfb4f11
--- /dev/null
+++ b/vid-automation/src/main/java/vid/automation/test/infra/FeatureTogglingTest.java
@@ -0,0 +1,31 @@
+package vid.automation.test.infra;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+
+/*
+In order to skip test classes regards the state of feature flag please use this annotation
+There are 2 ways to annotate that tests required featureFlags to be active :
+In method level - with @FeatureTogglingTest on the test method and list of Required Feature flags on
+In Class level - with @FeatureTogglingTest on the test class and list of Required Feature flags on
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({METHOD, TYPE})
+public @interface FeatureTogglingTest {
+
+ /**
+ * @return list of feature flags relevant to the test
+ */
+ Features[] value();
+
+ /**
+ * @return if all features shall be active.
+ * If true test would run if all features are active.
+ * If false test would run if all features are not active.
+ */
+ boolean flagActive() default true;
+}