}
if ( suite.countTestCases() == 0 ) {
String msg = "ERROR: no tests specified, check for warning of skipped webapps, tests and categories";
System.err.println( msg );
log.fatal( msg );
throw new RuntimeConfigException( msg );
}
// Delete results file for all webapps used, create results directory if it doesn't exist
// TODO move to server to allow for playback from remote server
Iterator it = webappMap.values().iterator();
WebappConfig webapp = null;
while ( it.hasNext() ) {
webapp = (WebappConfig) it.next();
// delete all results only if requested
if ( delete ) {
log.info( "Deleting results for webapp( " + webapp.getName() + " )" );
if ( !webapp.deleteResults() ) {
String msg = "WARNING: unable to delete all results files for webapp( " + webapp.getName() +
" )";
System.out.println( msg );
log.warn( msg );
}
}
if ( !webapp.createResultsDirectory() ) {
String msg = "ERROR: unable to create results directory( " + webapp.getResultsDirectory() +
" ), for webapp( " + webapp.getName() + " )";
System.err.println( msg );
log.error( msg );
throw new RuntimeConfigException( msg );
}
}
}