use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class AndroidOperation method testBlackListApplication.
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test black list application " + "operation")
public void testBlackListApplication() throws FileNotFoundException, MalformedURLException, AutomationFrameworkException {
JsonObject blackListApplicationPayload = PayloadGenerator.getJsonPayload(Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.BLACKLIST_OPERATION);
HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.BLACKLIST_APPS_ENDPOINT, blackListApplicationPayload.toString());
Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode());
}
use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class AndroidOperation method testUnLock.
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android device un-lock " + "operation.")
public void testUnLock() throws MalformedURLException, AutomationFrameworkException {
HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.UNLOCK_ENDPOINT, Constants.AndroidOperations.UNLOCK_OPERATION_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 DeviceTypeManagementJMeterTestCase method DeviceTypeManagementTest.
@Test(description = "This test case tests the Device Type/Device Management/Device Agent APIs")
public void DeviceTypeManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "DeviceTypeManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running Device Type/Device Management/Device Agent management api test cases using jmeter scripts");
manager.runTest(script);
log.info("Completed DeviceType API service test using jmeter scripts");
}
use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class NotificationManagementAPIJMeterTestCase method NotificationManagementTest.
@Test(description = "This test case tests the Notification Management APIs")
public void NotificationManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "NotificationManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running notification management api 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 BrokerServerExtension method initiate.
@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);
}
}
Aggregations