ClassLoader surefireClassLoader = classpathConfiguration.createInprocSurefireClassLoader( testsClassLoader );
CommonReflector commonReflector = new CommonReflector( surefireClassLoader );
Object reporterFactory = commonReflector.createReportingReporterFactory( startupReportConfiguration );
final ProviderFactory providerFactory =
new ProviderFactory( startupConfiguration, providerConfiguration, surefireClassLoader,
testsClassLoader, reporterFactory );
SurefireProvider surefireProvider = providerFactory.createProvider( false );
return surefireProvider.getSuites();
}
catch ( SurefireExecutionException e )
{
throw new SurefireBooterForkException( "Unable to create classloader to find test suites", e );