String msg = "ERROR: the '" + WEBAPPS_PROPERTY + "' property must be set.";
log.error( msg );
throw new ConfigException( msg );
}
webappList = webappList.trim();
WebappDefinition webapp = null;
TestDefinitions tests = null;
if ( webappList.equalsIgnoreCase( "all" ) ) {
WebappDefinition[] webappDefList = serverDef.getWebapps();
for ( int i = 0; i < webappDefList.length; i++ ) {
webapp = webappDefList[i];
tests = getTestDefinitions( webapp );
if ( tests == null ) {
continue;
}
serverDef.addTestDefinitions( webapp, tests );
}
}
else {
String webappName = null;
for ( StringTokenizer stringTokenizer = new StringTokenizer( webappList, "," );
stringTokenizer.hasMoreTokens(); ) {
webappName = stringTokenizer.nextToken().trim();
if ( webappName.length() == 0 ) {
continue;
}
webapp = serverDef.getWebapp( webappName );
if ( webapp == null ) {
String msg = "WARNING: no webapp found with name( " + webappName + " )";
if ( log.isErrorEnabled() ) {
log.error( msg );
}
System.err.println( msg );
continue;
}
if ( log.isDebugEnabled() ) {
log.debug( "retrieving test definition for webapp at( " + webapp.getContextRoot() + " )" );
}
tests = getTestDefinitions( webapp );
if ( tests == null ) {
continue;
}