use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class AndroidOperation method testUninstallApplication.
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android app un-install " + "operation")
public void testUninstallApplication() throws MalformedURLException, AutomationFrameworkException {
HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.UNINSTALL_APPS_ENDPOINT, Constants.AndroidOperations.UNINSTALL_APPS_PAYLOAD);
Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode());
}
use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class AppManagerJmeterTestCase method AppManagementTest.
@Test(description = "This test case tests the flow of App Manager mobile-app creation and lifecycle")
public void AppManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "AppManagerTest.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running app manager mobile creation related test cases using jmeter scripts");
manager.runTest(script);
}
use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class SampleInstallationTest method setup.
@BeforeClass(alwaysRun = true)
public void setup() throws XPathExpressionException, XMLStreamException, IOException, AutomationFrameworkException, LoginAuthenticationExceptionException {
super.init();
logViewerClient = new LogViewerClient(getBackendURL(), getSessionCookie(automationContext));
}
use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class CarbonServerManagerExtension method restartGracefully.
public synchronized void restartGracefully() throws AutomationFrameworkException {
try {
int httpsPort = defaultHttpsPort + this.portOffset;
String backendURL = this.automationContext.getContextUrls().getSecureServiceUrl().replaceAll("(:\\d+)", ":" + httpsPort);
User superUser = this.automationContext.getSuperTenant().getTenantAdmin();
ClientConnectionUtil.sendGraceFullRestartRequest(backendURL, superUser.getUserName(), superUser.getPassword());
} catch (XPathExpressionException var5) {
throw new AutomationFrameworkException("restart failed", var5);
}
long time = System.currentTimeMillis() + 300000L;
// while(!this.inputStreamHandler.getOutput().contains("Halting JVM") && System.currentTimeMillis() < time) {
// ;
// }
time = System.currentTimeMillis();
while (System.currentTimeMillis() < time + 5000L) {
;
}
try {
ClientConnectionUtil.waitForPort(Integer.parseInt((String) this.automationContext.getInstance().getPorts().get("https")), (String) this.automationContext.getInstance().getHosts().get("default"));
ClientConnectionUtil.waitForLogin(this.automationContext);
} catch (XPathExpressionException var4) {
throw new AutomationFrameworkException("Connection attempt to carbon server failed", var4);
}
}
Aggregations