You don't have to do this since this info can be injected as @ArquillianResource in the testcase. Take a look at org.jboss.as.test.integration.ejb.security.AuthenticationTestCase where a ManagementClient is being injected and later used to get the web uri:

         managementClient.getWebUri()