Class TestNGMapConfigurator

java.lang.Object
org.apache.maven.surefire.testng.conf.TestNGMapConfigurator
All Implemented Interfaces:
Configurator
Direct Known Subclasses:
TestNG510Configurator

public class TestNGMapConfigurator extends Object implements Configurator
TestNG configurator for 5.3+ versions. TestNG exposes a TestNG.configure(java.util.Map) method. All supported TestNG options are passed in String format, except
invalid reference
org.testng.TestNGCommandLineArgs#LISTENER_COMMAND_OPT
which is List>Class<,
invalid reference
org.testng.TestNGCommandLineArgs#JUNIT_DEF_OPT
which is a Boolean,
invalid reference
org.testng.TestNGCommandLineArgs#SKIP_FAILED_INVOCATION_COUNT_OPT
which is a Boolean,
invalid reference
org.testng.TestNGCommandLineArgs#OBJECT_FACTORY_COMMAND_OPT
which is a Class,
invalid reference
org.testng.TestNGCommandLineArgs#REPORTERS_LIST
which is a List>ReporterConfig<.
Test classes and/or suite files are not passed along as options parameters, but configured separately.
Author:
Alex Popescu
  • Constructor Details

    • TestNGMapConfigurator

      public TestNGMapConfigurator()
  • Method Details

    • configure

      public void configure(org.testng.TestNG testng, Map<String,String> options) throws org.apache.maven.surefire.testset.TestSetFailedException
      Specified by:
      configure in interface Configurator
      Throws:
      org.apache.maven.surefire.testset.TestSetFailedException
    • configure

      public void configure(org.testng.xml.XmlSuite suite, Map<String,String> options) throws org.apache.maven.surefire.testset.TestSetFailedException
      Specified by:
      configure in interface Configurator
      Throws:
      org.apache.maven.surefire.testset.TestSetFailedException
    • convertReporterConfig

      protected Object convertReporterConfig(Object val)
    • convertListeners

      protected Object convertListeners(String listenerClasses) throws org.apache.maven.surefire.testset.TestSetFailedException
      Throws:
      org.apache.maven.surefire.testset.TestSetFailedException
    • convert

      protected Object convert(Object val, Class<?> type)