use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class DeviceManagementAPINegativeTestCase method negativeTests.
@Test(description = "This test case tests the response when the APIs are called with invalid payloads and without" + " required parameters")
public void negativeTests() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "AndroidDeviceManagementAPI_Negative_Tests.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
manager.runTest(script);
}
use of org.wso2.carbon.automation.engine.exceptions.AutomationFrameworkException in project product-iots by wso2.
the class GroupManagementJMeterTestCase method GroupManagementTest.
@Test(description = "This test case tests the Group Management APIs")
public void GroupManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "GroupManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running group 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 AndroidOperation method testLock.
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android device lock operation.")
public void testLock() throws MalformedURLException, AutomationFrameworkException {
HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.LOCK_ENDPOINT, Constants.AndroidOperations.LOCK_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 AndroidOperation method testConfigureVPN.
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test configure VPN operation")
public void testConfigureVPN() throws FileNotFoundException, MalformedURLException, AutomationFrameworkException {
JsonObject configureVPNPayload = PayloadGenerator.getJsonPayload(Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.VPN_OPERATION);
HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.VPN_ENDPOINT, configureVPNPayload.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 testUpdateApplication.
@Test(groups = { Constants.AndroidOperations.OPERATIONS_GROUP }, description = "Test Android app update operation")
public void testUpdateApplication() throws FileNotFoundException, MalformedURLException, AutomationFrameworkException {
JsonObject installApplicationPayload = PayloadGenerator.getJsonPayload(Constants.AndroidOperations.OPERATION_PAYLOAD_FILE_NAME, Constants.AndroidOperations.INSTALL_APPS_OPERATION);
HttpResponse response = client.post(Constants.AndroidOperations.OPERATION_ENDPOINT + Constants.AndroidOperations.UPDATE_APPS_ENDPOINT, installApplicationPayload.toString());
Assert.assertEquals(HttpStatus.SC_CREATED, response.getResponseCode());
}
Aggregations