public boolean shouldExecute ( String suiteName , String [ ] includedGroups ) { String baseErrorMessage = "Suite container restrictions did not match %s - do not execute container '%s'" ; if ( StringUtils . hasText ( suiteName ) && ! CollectionUtils . isEmpty ( suiteNames ) && ! suiteNames . contains ( suiteName ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( String . format ( baseErrorMessage , "suite name" , getName ( ) ) ) ; } return false ; } if ( ! checkTestGroups ( includedGroups ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( String . format ( baseErrorMessage , "test groups" , getName ( ) ) ) ; } return false ; } for ( Map . Entry < String , String > envEntry : env . entrySet ( ) ) { if ( ! System . getenv ( ) . containsKey ( envEntry . getKey ( ) ) || ( StringUtils . hasText ( envEntry . getValue ( ) ) && ! System . getenv ( ) . get ( envEntry . getKey ( ) ) . equals ( envEntry . getValue ( ) ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( String . format ( baseErrorMessage , "env properties" , getName ( ) ) ) ; } return false ; } } for ( Map . Entry < String , String > systemProperty : systemProperties . entrySet ( ) ) { if ( ! System . getProperties ( ) . containsKey ( systemProperty . getKey ( ) ) || ( StringUtils . hasText ( systemProperty . getValue ( ) ) && ! System . getProperties ( ) . get ( systemProperty . getKey ( ) ) . equals ( systemProperty . getValue ( ) ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( String . format ( baseErrorMessage , "system properties" , getName ( ) ) ) ; } return false ; } } return true ; }
Checks if this suite actions should execute according to suite name and included test groups .