public synchronized static void initConfig ( ITestContext context ) { SeLionLogger . getLogger ( ) . entering ( context ) ; Map < ConfigProperty , String > initialValues = new HashMap <> ( ) ; Map < String , String > testParams = context . getCurrentXmlTest ( ) . getLocalParameters ( ) ; if ( ! testParams . isEmpty ( ) ) { for ( ConfigProperty prop : ConfigProperty . values ( ) ) { // Check if a selionConfig param resides in the <test> String newValue = testParams . get ( prop . getName ( ) ) ; // accept param values that are empty in initialValues. if ( newValue != null ) { initialValues . put ( prop , newValue ) ; } } } ConfigManager . addConfig ( context . getCurrentXmlTest ( ) . getName ( ) , new LocalConfig ( initialValues ) ) ; SeLionLogger . getLogger ( ) . exiting ( ) ; }
Parses configuration file and extracts values for test environment