use of org.wso2.siddhi.core.function.Script in project carbon-business-process by wso2.
the class ActivitiEngineBuilder method setResolverFactories.
/**
* Function to register resolver factories that used by script engines and JUEL
* @param processEngineConfiguration
*/
private void setResolverFactories(ProcessEngineConfigurationImpl processEngineConfiguration) {
List<ResolverFactory> resolverFactories = new ArrayList<>();
// Resolvers from Activiti
resolverFactories.add(new VariableScopeResolverFactory());
resolverFactories.add(new BeansResolverFactory());
// Resolvers added for WSO2 BPS
resolverFactories.add(new XmlAPIResolverFactory());
resolverFactories.add(new JsonAPIResolverFactory());
processEngineConfiguration.setResolverFactories(resolverFactories);
}
use of org.wso2.siddhi.core.function.Script in project product-iots by wso2.
the class MobileQSGTestCase method testPolicyCreation.
@Test(description = "This test case tests the policy creation through qsg script", dependsOnMethods = { "executeQSGScript" })
public void testPolicyCreation() throws Exception {
HttpResponse response = client.get(Constants.PolicyManagement.VIEW_POLICY_LIST_ENDPOINT + "?offset=0&limit=10");
Assert.assertEquals(response.getResponseCode(), HttpStatus.SC_OK);
Assert.assertTrue(response.getData().contains("android-passcode-policy1"), "Android pass-code policy is not " + "added from qsg script");
Assert.assertTrue(response.getData().contains("windows-passcode-policy1"), "Windows pass-code policy is not " + "added from qsg script");
}
use of org.wso2.siddhi.core.function.Script in project product-iots by wso2.
the class AndroidDeviceManagementAPIJmeterTestCase method permutationTest.
@Test(description = "Testing the response when sending different input parameters with different values")
public void permutationTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "AndroidDeviceManagementAPIAdditionalPermutations.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running permutation test using jmeter scripts");
manager.runTest(script);
}
use of org.wso2.siddhi.core.function.Script in project product-iots by wso2.
the class PolicyManagementJMeterTestCase method PolicyManagementTest.
@Test(description = "This test case tests the Policy Management APIs")
public void PolicyManagementTest() throws AutomationFrameworkException {
URL url = Thread.currentThread().getContextClassLoader().getResource("jmeter-scripts" + File.separator + "PolicyManagementAPI.jmx");
JMeterTest script = new JMeterTest(new File(url.getPath()));
JMeterTestManager manager = new JMeterTestManager();
log.info("Running policy management api test cases using jmeter scripts");
manager.runTest(script);
}
use of org.wso2.siddhi.core.function.Script 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");
}
Aggregations