public static String serverUnderTest(){
  String ipAddress="";
  String baseURL="";
  String server=System.getProperty("app.url");
  if (server == null) {
    baseURL=Utils.readConfigProperty("serverUnderTest");
  }
 else {
    InetAddress localMachine=null;
    try {
      localMachine=InetAddress.getLocalHost();
    }
 catch (    UnknownHostException e) {
      e.printStackTrace();
    }
    ipAddress=localMachine.getHostAddress();
    baseURL=server.replace("localhost",ipAddress);
  }
  return baseURL;
}

public static String serverUnderTest ( ) { String ipAddress = "" ; String baseURL = "" ; String server = System . getProperty ( "app.url" ) ; if ( server == null ) { baseURL = Utils . readConfigProperty ( "serverUnderTest" ) ; } else { InetAddress localMachine = null ; try { localMachine = InetAddress . getLocalHost ( ) ; } catch ( UnknownHostException e ) { e . printStackTrace ( ) ; } ipAddress = localMachine . getHostAddress ( ) ; baseURL = server . replace ( "localhost" , ipAddress ) ; } return baseURL ; }
serverundertest ( ) - check to see if automation is being run via maven
