in surefire-providers/surefire-testng/src/main/java/org/apache/maven/surefire/testng/conf/TestNGMapConfigurator.java [78:125]
Map<String, Object> getConvertedOptions(Map<String, String> options) throws TestSetFailedException {
Map<String, Object> convertedOptions = new HashMap<>();
convertedOptions.put("-mixed", false);
for (Map.Entry<String, String> entry : options.entrySet()) {
String key = entry.getKey();
Object val = entry.getValue();
switch (key) {
case "listener":
val = convertListeners(entry.getValue());
break;
case "objectfactory":
case "testrunfactory":
val = AbstractDirectConfigurator.loadClass(entry.getValue());
break;
case "reporter":
// for TestNG 5.6 or higher
// TODO support multiple reporters?
val = convertReporterConfig(val);
key = "reporterslist";
break;
case "junit":
case "skipfailedinvocationcounts":
case "mixed":
case "group-by-instances":
val = convert(val, Boolean.class);
break;
case "configfailurepolicy":
case THREADCOUNT_PROP:
val = convert(val, String.class);
break;
// for TestNG 6.9.7 or higher
case "suitethreadpoolsize":
// for TestNG 5.10 or higher
case "dataproviderthreadcount":
val = convert(val, Integer.class);
break;
default:
break;
}
if (key.startsWith("-")) {
convertedOptions.put(key, val);
} else {
convertedOptions.put("-" + key, val);
}
}
return convertedOptions;
}