private static String getServiceUserCredential ( String clazz , ITestContext context ) { if ( System . getenv ( "SERVICES_USER" ) != null ) { return System . getenv ( "SERVICES_USER" ) ; } if ( context . getAttribute ( clazz + SERVICES_USER ) != null ) { return ( String ) context . getAttribute ( clazz + SERVICES_USER ) ; } else { return "" ; } }
Obtains the web services username provided for the current test suite being executed . Anything passed in from the command line will first be taken to override any other values . Next values being set in the classes will be checked for . If neither of these are set an empty string will be returned