aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java')
-rw-r--r--vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java b/vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java
new file mode 100644
index 000000000..a3f88e23b
--- /dev/null
+++ b/vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java
@@ -0,0 +1,25 @@
+package org.onap.sdc.ci.tests.run;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.testng.TestNG;
+
+public class RunTest {
+
+ public static void runTestSuite() {
+ TestNG testng = new TestNG();
+ List<String> suites = new ArrayList<String>();
+
+ String testSuite = System.getProperty("testSuite");
+ if (testSuite == null){
+ System.out.println("No test suite file was found, please provide test suite.");
+ System.exit(1);
+ }
+ suites.add(testSuite);
+ testng.setTestSuites(suites);
+ testng.setUseDefaultListeners(true);
+ testng.setOutputDirectory("target/");
+ testng.run();
+ }
+}