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 classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final StringThe default name for a suite launched from the maven surefire pluginprivate static final StringThe default name for a test launched from the maven surefire pluginprivate static final booleanprivate static final Constructor<org.testng.xml.XmlClass> private static final Method -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddSelector(org.testng.xml.XmlTest xmlTest, org.testng.xml.XmlMethodSelector selector) private static org.testng.xml.XmlMethodSelectorcreateGroupMatchingSelector(Map<String, String> options) private static org.testng.xml.XmlMethodSelectorcreateMethodNameFilteringSelector(TestListResolver methodFilter) private static StoppablecreateStoppable(RunListener reportManager, int skipAfterFailureCount) private static intextractVerboseLevel(Map<String, String> options) private static <T extends Annotation>
TfindAnnotation(Class<?> clazz, Class<T> annotationType) private static TestNGExecutor.TestMetadatafindTestMetadata(Class<?> testClass) private static ConfiguratorgetConfigurator(String className) private static booleanisCliDebugOrShowErrors(List<CommandLineOption> mainCliOptions) private static org.testng.xml.XmlClassnewXmlClassInstance(String testClassName, int index) private static voidpostConfigure(org.testng.TestNG testNG, String sourcePath, TestNGReporter testNGReporter, File reportsDirectory, int skipAfterFailureCount, int verboseLevel) (package private) static voidrun(Iterable<Class<?>> testClasses, String testSourceDirectory, Map<String, String> options, TestNGReporter testNGReporter, File reportsDirectory, TestListResolver methodFilter, List<CommandLineOption> mainCliOptions, int skipAfterFailureCount) (package private) static voidrun(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
-