org.wso2.carbon.automation.engine.context.ContextXpathConstants Java Examples

The following examples show how to use org.wso2.carbon.automation.engine.context.ContextXpathConstants. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CarbonServerExtension.java    From micro-integrator with Apache License 2.0 5 votes vote down vote up
public void initiate() {
    try {
        getParameters().putIfAbsent(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "0");
        serverManager = new TestServerManager(getAutomationContext(), null, getParameters()) {
        };
        executionEnvironment = getAutomationContext().getConfigurationValue(
                ContextXpathConstants.EXECUTION_ENVIRONMENT);
    } catch (XPathExpressionException e) {
        handleException("Error while initiating test environment", e);
    }
}
 
Example #2
Source File: BrokerServerExtension.java    From product-iots with Apache License 2.0 5 votes vote down vote up
@Override
public void initiate() {
    try {
        automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
        if (getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, BROKER_PORT_OFFSET);
        }
        serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                automationContext.getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);

    } catch (XPathExpressionException e) {
        throw new RuntimeException("Error while initiating test environment", e);
    }
}
 
Example #3
Source File: AnalyticsServerExtension.java    From product-iots with Apache License 2.0 5 votes vote down vote up
@Override
public void initiate() {
    try {
        automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
        if (getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, ANALYTICS_PORT_OFFSET);
        }
        serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                automationContext.getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);

    } catch (XPathExpressionException e) {
        throw new RuntimeException("Error while initiating test environment", e);
    }
}
 
Example #4
Source File: IOTServerExtension.java    From product-iots with Apache License 2.0 5 votes vote down vote up
@Override
public void initiate() {
    try {
        automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
        if (getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, IOT_CORE_PORT_OFFSET);
        }
        serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                automationContext.getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);

    } catch (XPathExpressionException e) {
        throw new RuntimeException("Error while initiating test environment", e);
    }
}
 
Example #5
Source File: BrokerServerExtension.java    From product-iots with Apache License 2.0 5 votes vote down vote up
@Override
public void initiate() throws AutomationFrameworkException {
    try {
        automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
        if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "3");
        }
        serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                automationContext.getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);

    } catch (XPathExpressionException e) {
        handleException("Error while initiating test environment", e);
    }
}
 
Example #6
Source File: AnalyticsServerExtension.java    From product-iots with Apache License 2.0 5 votes vote down vote up
@Override
public void initiate() throws AutomationFrameworkException {
    try {
        automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
        if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "2");
        }
        serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                automationContext.getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);

    } catch (XPathExpressionException e) {
        handleException("Error while initiating test environment", e);
    }
}
 
Example #7
Source File: IOTServerExtension.java    From product-iots with Apache License 2.0 5 votes vote down vote up
@Override
public void initiate() throws AutomationFrameworkException {
    try {
        automationContext = new AutomationContext("IOT", TestUserMode.SUPER_TENANT_USER);
        if(getParameters().get(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "0");
        }
        serverManager = new CustomTestServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                automationContext.getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);

    } catch (XPathExpressionException e) {
        handleException("Error while initiating test environment", e);
    }
}
 
Example #8
Source File: ESServerExtension.java    From product-es with Apache License 2.0 5 votes vote down vote up
public void initiate() {
    try {
        if (getParameters().get(ExtensionCommonConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND) == null) {
            getParameters().put(ExtensionCommonConstants.SERVER_STARTUP_PORT_OFFSET_COMMAND, "0");
        }
        serverManager = new ESServerManager(getAutomationContext(), null, getParameters());
        executionEnvironment =
                getAutomationContext().getConfigurationValue(ContextXpathConstants.EXECUTION_ENVIRONMENT);
    } catch (XPathExpressionException e) {
        handleException("Error while initiating test environment", e);
    }
}