Created
December 24, 2017 09:07
-
-
Save handakumbura/a4209285320575a2b8063788b4edcb7b to your computer and use it in GitHub Desktop.
made for demonstrational purposes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.testngrunner; | |
import com.beust.jcommander.internal.Lists; | |
import org.testng.TestNG; | |
import java.util.List; | |
public class App | |
{ | |
public static void main( String[] args ) | |
{ | |
String trigger = System.getenv("EXEC_TYPE"); | |
if(trigger != null) { | |
if(trigger.equals("TEST")) { | |
TestNG testng = new TestNG(); | |
List<String> suites = Lists.newArrayList(); | |
suites.add("testng.xml"); | |
testng.setTestSuites(suites); | |
testng.run(); | |
} | |
} | |
else { | |
System.out.println("--- default execution flow of the component ---"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment