use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.
the class SampleInstallationVerification method setup.
@BeforeClass(alwaysRun = true)
public void setup() throws XPathExpressionException, XMLStreamException, IOException {
super.init();
driver = BrowserManager.getWebDriver();
LoginUtils.login(driver, automationContext, getWebAppURL());
adminDashboard = new IOTAdminDashboard(driver);
}
use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.
the class SampleEnrolmentVerificationTest method setUp.
@BeforeClass(alwaysRun = true)
public void setUp() throws XPathExpressionException, XMLStreamException, IOException {
super.init();
webDriver = BrowserManager.getWebDriver();
LoginUtils.login(webDriver, automationContext, getWebAppURL());
webDriver.get(getWebAppURL() + Constants.IOT_DEVICES_URL);
devicesPage = new DevicesPage(webDriver);
}
use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.
the class SampleInstallationTest method serverRestartTest.
@Test(description = "Test restarting the server", groups = Constants.TestSample.SAMPLE_INSTALL, dependsOnMethods = { "sampleInstallationTest" })
public void serverRestartTest() {
ServerConfigurationManager serverManager;
try {
serverManager = new ServerConfigurationManager(automationContext);
log.info("Restart Triggered -------------------------------------------------------------------");
serverManager.restartGracefully();
logViewerClient.getAllRemoteSystemLogs();
waitForRestart();
} catch (AutomationUtilException | XPathExpressionException | MalformedURLException e) {
log.error("Restart failed due to : " + e.getLocalizedMessage());
} catch (RemoteException | LogViewerLogViewerException e) {
log.error("Cannot get server log due to : " + e.getLocalizedMessage());
}
}
use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.
the class BrokerServerExtension method initiate.
@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);
}
}
use of org.wso2.carbon.automation.engine.context.AutomationContext in project product-iots by wso2.
the class AnalyticsServerExtension method initiate.
@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);
}
}
Aggregations