protected void init(TestUserMode userMode) throws XPathExpressionException/*, AutomationUtilException*/ { automationContext = new AutomationContext(CarbonIntegrationConstants.PRODUCT_GROUP, userMode); contextUrls = automationContext.getContextUrls(); /*loginLogoutClient = new LoginLogoutClient(automationContext); sessionCookie = loginLogoutClient.login(); backendURL = automationContext.getContextUrls().getBackEndUrl(); userInfo = automationContext.getContextTenant().getContextUser(); } protected String getServiceUrl(String serviceName) throws XPathExpressionException { return automationContext.getContextUrls().getServiceUrl() + "/" + serviceName;*/ }
protected String getWebSocketAPIInvocationURL(String apiContext, String version) throws XPathExpressionException { String url = gatewayContextWrk.getContextUrls().getServiceUrl().replace("/services", ""). replace("http", "ws"); url = url.substring(0, url.lastIndexOf(":") + 1) + (inboundWebSocketPort + portOffset) + "/" + apiContext + "/" + version; return url; }
protected String getWebSocketTenantAPIInvocationURL(String apiContext, String version, String tenantDomain) throws XPathExpressionException { String url = gatewayContextWrk.getContextUrls().getServiceUrl().replace("/services", ""). replace("http", "ws"); url = url.substring(0, url.lastIndexOf(":") + 1) + (inboundWebSocketPort + portOffset) + "/t/" + tenantDomain + "/" + apiContext + "/" + version; return url; }
protected String getServiceURL() throws XPathExpressionException { String serviceURL = automationContext.getContextUrls().getServiceUrl(); return automationContext.getContextUrls().getServiceUrl(); } protected String getLoginURL() throws XPathExpressionException {
public LoginLogoutClient(AutomationContext context) throws MalformedURLException, XPathExpressionException, AxisFault { URL backend = new URL(context.getContextUrls().getBackEndUrl()); backendURL = context.getContextUrls().getBackEndUrl(); backend.getPort(); backend.getHost(); this.automationContext = context; this.loginClient = new AuthenticatorClient(backendURL); }
protected String getSuperTenantAPIInvocationURLHttp(String apiContext, String version) throws XPathExpressionException { return gatewayContextWrk.getContextUrls().getServiceUrl().replace("/services", "") .replace("/t/" + user.getUserDomain(), "") + "/" + apiContext + "/" + version; }
protected void initPublisher(String productGroupName, String instanceName, TestUserMode userMode, String userKey) throws XPathExpressionException { automationContext = new AutomationContext(productGroupName, instanceName, userMode); backendURL = automationContext.getContextUrls().getBackEndUrl(); }
protected String getServiceUrlHttp(String serviceName) throws XPathExpressionException { String serviceUrl = esContext.getContextUrls().getServiceUrl() + "/" + serviceName; validateServiceUrl(serviceUrl, tenantInfo); return serviceUrl; }
protected String getServiceUrlHttps(String serviceName) throws XPathExpressionException { String serviceUrl = esContext.getContextUrls().getSecureServiceUrl() + "/" + serviceName; validateServiceUrl(serviceUrl, tenantInfo); return serviceUrl; }
protected void initPublisher(String productGroupName, String instanceName, TestUserMode userMode, String userKey) throws XPathExpressionException { automationContext = new AutomationContext(productGroupName, instanceName, userMode); backendURL = automationContext.getContextUrls().getBackEndUrl(); }
protected void init(String domainKey, String userKey) throws Exception { bpsServer = new AutomationContext("BPS", "bpsServerInstance0001", domainKey, userKey); loginLogoutClient = new LoginLogoutClient(bpsServer); sessionCookie = loginLogoutClient.login(); backEndUrl = bpsServer.getContextUrls().getBackEndUrl(); serviceUrl = bpsServer.getContextUrls().getServiceUrl(); bpelUploaderClient = new BpelUploaderClient(backEndUrl, sessionCookie); humanTaskUploaderClient = new HumanTaskUploaderClient(backEndUrl, sessionCookie); bpmnUploaderClient = new BPMNUploaderClient(backEndUrl, sessionCookie); }
protected void init(TestUserMode testUserMode) throws Exception { bpsServer = new AutomationContext("BPS", testUserMode); loginLogoutClient = new LoginLogoutClient(bpsServer); sessionCookie = loginLogoutClient.login(); backEndUrl = bpsServer.getContextUrls().getBackEndUrl(); serviceUrl = bpsServer.getContextUrls().getServiceUrl(); bpelUploaderClient = new BpelUploaderClient(backEndUrl, sessionCookie); humanTaskUploaderClient = new HumanTaskUploaderClient(backEndUrl, sessionCookie); bpmnUploaderClient = new BPMNUploaderClient(backEndUrl, sessionCookie); }
public LoginLogoutClient(AutomationContext context) throws AutomationUtilException { try { this.automationContext = context; String backendURL = context.getContextUrls().getBackEndUrl(); this.loginClient = new AuthenticatorClient(backendURL); } catch (AxisFault axisFault) { throw new AutomationUtilException("Error while initializing authenticator client ", axisFault); } catch (XPathExpressionException e) { throw new AutomationUtilException("Error while retrieving backend URL from auto context ", e); } }
protected void init() throws Exception { bpsServer = new AutomationContext("BPS", TestUserMode.SUPER_TENANT_ADMIN); loginLogoutClient = new LoginLogoutClient(bpsServer); sessionCookie = loginLogoutClient.login(); backEndUrl = bpsServer.getContextUrls().getBackEndUrl(); serviceUrl = bpsServer.getContextUrls().getServiceUrl(); bpelUploaderClient = new BpelUploaderClient(backEndUrl, sessionCookie); humanTaskUploaderClient = new HumanTaskUploaderClient(backEndUrl, sessionCookie); bpmnUploaderClient = new BPMNUploaderClient(backEndUrl, sessionCookie); }
protected void init(TestUserMode testUserMode) throws Exception { storeContext = new AutomationContext("es", "store", testUserMode); publisherContext = new AutomationContext("es", "publisher", testUserMode); automationContext = new AutomationContext("es",testUserMode); loginLogoutClient = new LoginLogoutClient(automationContext); sessionCookie = loginLogoutClient.login(); backendURL = automationContext.getContextUrls().getBackEndUrl(); webAppURL = automationContext.getContextUrls().getWebAppURL(); userInfo = automationContext.getContextTenant().getContextUser(); }
public void setInfoRolesAndUsers(String adminUserKey) throws LoginAuthenticationExceptionException, RemoteException, XPathExpressionException { //todo - // FrameworkProperties isProperties = FrameworkFactory.getFrameworkProperties(ProductConstant.IS_SERVER_NAME); AutomationContext isContext = new AutomationContext("IS", "is", "carbon.supper", adminUserKey); Tenant userAdminDetails = isContext.getContextTenant(); sessionCookie = login(userAdminDetails.getContextUser().getUserName(), userAdminDetails.getContextUser().getPassword(), isContext.getContextUrls().getBackEndUrl()); userAdminStub = new UserManagementClient(isContext.getContextUrls().getBackEndUrl(), sessionCookie); }
public FeatureManagementUtil(List<FeatureInfo> featureList, AutomationContext automationContext) throws Exception { this.automationContext = automationContext; featureInfos = featureList.toArray(new FeatureInfo[featureList.size()]); backendURL = automationContext.getContextUrls().getBackEndUrl(); loginLogoutUtil = new LoginLogoutUtil(); String sessionCookie = loginLogoutUtil.login( automationContext.getContextTenant().getContextUser().getUserName(), automationContext.getContextTenant().getContextUser().getPassword().toCharArray(), backendURL); repositoryAdminClient = new RepositoryAdminClient(backendURL, automationContext); featureAdminClient = new FeatureAdminClient(backendURL, sessionCookie); }
protected String getSessionCookie(AutomationContext context) throws RemoteException, XPathExpressionException, LoginAuthenticationExceptionException { AuthenticatorClient authenticationAdminClient = new AuthenticatorClient(context.getContextUrls().getBackEndUrl()); String sessionCookie = authenticationAdminClient.login(automationContext.getSuperTenant(). getTenantAdmin().getUserName(), automationContext.getSuperTenant(). getTenantAdmin().getPassword(), automationContext.getDefaultInstance().getHosts().get("default")); return sessionCookie; }
public ServerAdminClient(AutomationContext automationContext) throws AxisFault, XPathExpressionException { String endPoint = automationContext.getContextUrls().getBackEndUrl() + serviceName; serverAdminStub = new ServerAdminStub(endPoint); AuthenticateStubUtil.authenticateStub(automationContext.getContextTenant().getContextUser().getUserName(), automationContext.getContextTenant().getContextUser().getPassword(), serverAdminStub); }
@BeforeSuite(alwaysRun = true) public void initialize() throws XPathExpressionException, AxisFault { AutomationContext autoContext = new AutomationContext(); logViewerClient = new LogViewerClient(autoContext.getContextUrls().getBackEndUrl(), autoContext.getSuperTenant().getTenantAdmin().getUserName(), autoContext.getSuperTenant().getTenantAdmin().getPassword()); }