protected String getBackendURL() throws XPathExpressionException { return automationContext.getContextUrls().getBackEndUrl(); }
protected String getBackendURL() throws XPathExpressionException { return automationContext.getContextUrls().getBackEndUrl(); }
protected String getBackendURL() throws XPathExpressionException { return automationContext.getContextUrls().getBackEndUrl(); }
protected String getKeyManagerURLHttps() throws XPathExpressionException { return keyManagerContext.getContextUrls().getBackEndUrl().replace("/services", ""); }
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); }
/** * Create a ServerConfigurationManager * * @param productGroup product group name * @param userMode user mode */ public ServerConfigurationManager(String productGroup, TestUserMode userMode) throws AutomationUtilException, XPathExpressionException, MalformedURLException { this.autoCtx = new AutomationContext(productGroup, userMode); this.loginLogoutClient = new LoginLogoutClient(autoCtx); this.backEndUrl = autoCtx.getContextUrls().getBackEndUrl(); this.port = new URL(backEndUrl).getPort(); this.hostname = new URL(backEndUrl).getHost(); }
/** * Initialize the base test by initializing the automation context. * * @param userMode The testing user mode * @throws XPathExpressionException */ protected void init(TestUserMode userMode) throws XPathExpressionException { // org.apache.xerces.dom.ParentNode.nodeListItem which is used in AutomationContext // does not guarantee thread safety. // Hence to allow tests to run in parallel, this initialization should be synchronized synchronized (this.getClass()) { automationContext = new AutomationContext("MB", userMode); backendURL = automationContext.getContextUrls().getBackEndUrl(); } }
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 initPublisher(String productGroupName, String instanceName, TestUserMode userMode, String userKey) throws XPathExpressionException { automationContext = new AutomationContext(productGroupName, instanceName, userMode); backendURL = automationContext.getContextUrls().getBackEndUrl(); }
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); } }
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); }
/** * Initializes the automation context, login client, session cookie and the backend url by {@link org.wso2.carbon * .automation.engine.context.TestUserMode#SUPER_TENANT_ADMIN}. * * @throws AutomationUtilException * @throws MalformedURLException * @throws XPathExpressionException */ protected void init() throws AutomationUtilException, IOException, XPathExpressionException { mbServer = new AutomationContext("MB", TestUserMode.SUPER_TENANT_ADMIN); loginLogoutClient = new LoginLogoutClient(mbServer); sessionCookie = loginLogoutClient.login(); backendURL = mbServer.getContextUrls().getBackEndUrl(); this.driver = BrowserManager.getWebDriver(); }
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; }
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 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); }
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); }
@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()); }
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(); }