ConsoleOutputCapture.startCapture( (ConsoleOutputReceiver) reporter );
JUnit4RunListener jUnit4TestSetReporter = new JUnit4RunListener( reporter );
Result result = new Result();
RunNotifier runNotifier = getRunNotifier( jUnit4TestSetReporter, result, customRunListeners );
runNotifier.fireTestRunStarted( createTestsDescription() );
for ( Class aTestsToRun : testsToRun )
{
executeTestSet( aTestsToRun, reporter, runNotifier );
}
runNotifier.fireTestRunFinished( result );
JUnit4RunListener.rethrowAnyTestMechanismFailures( result );
closeRunNotifier( jUnit4TestSetReporter, customRunListeners );
return reporterFactory.close();