Package org.apache.maven.surefire.testng
Class TestNGExecutor
java.lang.Object
org.apache.maven.surefire.testng.TestNGExecutor
Contains utility methods for executing TestNG.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
The default name for a suite launched from the maven surefire pluginprivate static final String
The default name for a test launched from the maven surefire pluginprivate static final boolean
private static final Constructor<org.testng.xml.XmlClass>
private static final Method
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addSelector
(org.testng.xml.XmlTest xmlTest, org.testng.xml.XmlMethodSelector selector) private static org.testng.xml.XmlMethodSelector
createGroupMatchingSelector
(Map<String, String> options) private static org.testng.xml.XmlMethodSelector
createMethodNameFilteringSelector
(TestListResolver methodFilter) private static Stoppable
createStoppable
(RunListener reportManager, int skipAfterFailureCount) private static int
extractVerboseLevel
(Map<String, String> options) private static <T extends Annotation>
TfindAnnotation
(Class<?> clazz, Class<T> annotationType) private static TestNGExecutor.TestMetadata
findTestMetadata
(Class<?> testClass) private static Configurator
getConfigurator
(String className) private static boolean
isCliDebugOrShowErrors
(List<CommandLineOption> mainCliOptions) private static org.testng.xml.XmlClass
newXmlClassInstance
(String testClassName, int index) private static void
postConfigure
(org.testng.TestNG testNG, String sourcePath, TestNGReporter testNGReporter, File reportsDirectory, int skipAfterFailureCount, int verboseLevel) (package private) static void
run
(Iterable<Class<?>> testClasses, String testSourceDirectory, Map<String, String> options, TestNGReporter testNGReporter, File reportsDirectory, TestListResolver methodFilter, List<CommandLineOption> mainCliOptions, int skipAfterFailureCount) (package private) static void
run
(List<String> suiteFiles, String testSourceDirectory, Map<String, String> options, TestNGReporter testNGReporter, File reportsDirectory, int skipAfterFailureCount)
-
Field Details
-
DEFAULT_SUREFIRE_SUITE_NAME
The default name for a suite launched from the maven surefire plugin- See Also:
-
DEFAULT_SUREFIRE_TEST_NAME
The default name for a test launched from the maven surefire plugin- See Also:
-
HAS_TEST_ANNOTATION_ON_CLASSPATH
private static final boolean HAS_TEST_ANNOTATION_ON_CLASSPATH -
XML_CLASS_SET_INDEX
-
XML_CLASS_CONSTRUCTOR_WITH_INDEX
-
-
Constructor Details
-
TestNGExecutor
private TestNGExecutor()
-
-
Method Details
-
run
static void run(Iterable<Class<?>> testClasses, String testSourceDirectory, Map<String, String> options, TestNGReporter testNGReporter, File reportsDirectory, TestListResolver methodFilter, List<CommandLineOption> mainCliOptions, int skipAfterFailureCount) throws TestSetFailedException- Throws:
TestSetFailedException
-
newXmlClassInstance
-
isCliDebugOrShowErrors
-
findTestMetadata
-
findAnnotation
-
addSelector
private static void addSelector(org.testng.xml.XmlTest xmlTest, org.testng.xml.XmlMethodSelector selector) -
createMethodNameFilteringSelector
private static org.testng.xml.XmlMethodSelector createMethodNameFilteringSelector(TestListResolver methodFilter) throws TestSetFailedException - Throws:
TestSetFailedException
-
createGroupMatchingSelector
private static org.testng.xml.XmlMethodSelector createGroupMatchingSelector(Map<String, String> options) throws TestSetFailedException- Throws:
TestSetFailedException
-
run
static void run(List<String> suiteFiles, String testSourceDirectory, Map<String, String> options, TestNGReporter testNGReporter, File reportsDirectory, int skipAfterFailureCount) throws TestSetFailedException- Throws:
TestSetFailedException
-
getConfigurator
-
postConfigure
private static void postConfigure(org.testng.TestNG testNG, String sourcePath, TestNGReporter testNGReporter, File reportsDirectory, int skipAfterFailureCount, int verboseLevel) -
createStoppable
-
extractVerboseLevel
- Throws:
TestSetFailedException
-