Skip to content

Instantly share code, notes, and snippets.

@handakumbura
Created December 24, 2017 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save handakumbura/a4209285320575a2b8063788b4edcb7b to your computer and use it in GitHub Desktop.
Save handakumbura/a4209285320575a2b8063788b4edcb7b to your computer and use it in GitHub Desktop.
made for demonstrational purposes.
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