aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/org/onap/sdc/ci/tests/run/RunTest.java
blob: a3f88e23bb9668f43067de362ebce9bcfdae9a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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();
	}
}