本文整理汇总了Java中org.wso2.carbon.automation.engine.context.AutomationContext类的典型用法代码示例。如果您正苦于以下问题:Java AutomationContext类的具体用法?Java AutomationContext怎么用?Java AutomationContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AutomationContext类属于org.wso2.carbon.automation.engine.context包,在下文中一共展示了AutomationContext类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: setEnvironment
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
init(); //init master class
bpelPackageManagementClient = new BpelPackageManagementClient(backEndUrl, sessionCookie);
humanTaskPackageManagementClient = new HumanTaskPackageManagementClient(backEndUrl, sessionCookie);
requestSender = new RequestSender();
initialize();
//initialize HT Client API for Clerk1 user
AutomationContext clerk1AutomationContext = new AutomationContext("BPS", "bpsServerInstance0001",
FrameworkConstants.SUPER_TENANT_KEY, "clerk1");
LoginLogoutClient clerk1LoginLogoutClient = new LoginLogoutClient(clerk1AutomationContext);
String clerk1SessionCookie = clerk1LoginLogoutClient.login();
clerk1HumanTaskClientApiClient = new HumanTaskClientApiClient(backEndUrl, clerk1SessionCookie);
//initialize HT Client API for Manager1 user
AutomationContext manager1AutomationContext = new AutomationContext("BPS", "bpsServerInstance0001",
FrameworkConstants.SUPER_TENANT_KEY, "manager1");
LoginLogoutClient manager1LoginLogoutClient = new LoginLogoutClient(manager1AutomationContext);
String manager1SessionCookie = manager1LoginLogoutClient.login();
manager1HumanTaskClientApiClient = new HumanTaskClientApiClient(backEndUrl, manager1SessionCookie);
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:HumanTaskCreationTestCase.java
示例2: readXMLforEmailCredentials
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
/**
* Read automation.xml to set email credentials to relevant variables.
*/
public static void readXMLforEmailCredentials()
throws ESBMailTransportIntegrationTestException {
try {
AutomationContext automationContext = new AutomationContext();
automationContext.getConfigurationNodeList(EMAIL_CREDENTIAL_PARENT_XPATH);
sender = automationContext.getConfigurationValue(EMAIL_CREDENTIAL_SENDER_XPATH);
senderPassword = automationContext.getConfigurationValue(EMAIL_CREDENTIAL_SENDER_PASSWORD_XPATH).toCharArray();
receiver = automationContext.getConfigurationValue(EMAIL_CREDENTIAL_RECEIVER_XPATH);
receiverPassword = automationContext.getConfigurationValue(EMAIL_CREDENTIAL_RECEIVER_PASSWORD_XPATH).toCharArray();
domain = automationContext.getConfigurationValue(EMAIL_CREDENTIAL_DOMAIN_XPATH);
} catch (XPathExpressionException e) {
log.error("Error when getting value from automation.xml ", e);
throw new ESBMailTransportIntegrationTestException("Error when getting value from automation.xml ", e);
}
}
开发者ID:wso2,项目名称:product-ei,代码行数:22,代码来源:MailToTransportUtil.java
示例3: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
serverConfigurationManagerProp = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
String nhttpFile = /*ProductConstant.getResourceLocations(ProductConstant.ESB_SERVER_NAME)*/FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator +
"ESB" +separator + "synapseconfig" + separator + "MaxOpenConnections" + separator
+ "nhttp.properties";
File srcFile = new File(nhttpFile);
serverConfigurationManagerProp.applyConfigurationWithoutRestart(srcFile);
serverConfigurationManagerAxis2 = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
String nhttpAxis2xml = /*ProductConstant.getResourceLocations(ProductConstant.ESB_SERVER_NAME)*/FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator +
"ESB" +separator +separator + "synapseconfig" + separator + "MaxOpenConnections" + separator + "nhttp"
+ separator + "axis2.xml";
File axis2File = new File(nhttpAxis2xml);
serverConfigurationManagerAxis2.applyConfiguration(axis2File);
super.init();
list = Collections.synchronizedList(new ArrayList());
maxOpenConnectionClients = new MaximumOpenConnectionsClient[CONCURRENT_CLIENTS];
clients = new Thread[CONCURRENT_CLIENTS];
}
开发者ID:wso2,项目名称:product-ei,代码行数:27,代码来源:NhttpMaximumOpenConnections.java
示例4: setEnvironment
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init();
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB",
TestUserMode.SUPER_TENANT_ADMIN));
String carbonHome = System.getProperty(ServerConstants.CARBON_HOME);
String confDir = carbonHome + File.separator + "conf" + File.separator;
File originalConfig = new File(getESBResourceLocation() + File.separator + "synapseconfig" + File.separator +
"nhttp_transport" + File.separator + "default_content_type_axis2.xml");
File destDir = new File(confDir + "axis2" + File.separator);
FileUtils.copyFileToDirectory(originalConfig, destDir);
serverConfigurationManager.restartGracefully();
super.init();
loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/nhttp_transport"
+ "/default_content_type_synapse.xml");
}
开发者ID:wso2,项目名称:product-ei,代码行数:21,代码来源:DefaultRequestContentTypeTestCase.java
示例5: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
pathToVfsDir = getClass().getResource(File.separator + "artifacts" + File.separator + "ESB" +
File.separator + "synapseconfig" + File.separator +
"vfsTransport" + File.separator).getPath(); // change this to get samba path
serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfiguration(new File(pathToVfsDir + File.separator + "axis2.xml"));
super.init();
File outFolder = new File(pathToVfsDir + "test" + File.separator + "out" + File.separator);
File inFolder = new File(pathToVfsDir + "test" + File.separator + "in" + File.separator);
File originalFolder = new File(pathToVfsDir + "test" + File.separator + "original" + File.separator);
File failureFolder = new File(pathToVfsDir + "test" + File.separator + "failure" + File.separator);
assertTrue(outFolder.mkdirs(), "file folder not created");
assertTrue(inFolder.mkdirs(), "file folder not created");
assertTrue(originalFolder.mkdirs(), "file folder not created");
assertTrue(failureFolder.mkdirs(), "file folder not created");
assertTrue(outFolder.exists(), "File folder doesn't exists");
assertTrue(inFolder.exists(), "File folder doesn't exists");
assertTrue(originalFolder.exists(), "File folder doesn't exists");
assertTrue(failureFolder.exists(), "File folder doesn't exists");
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:Sample265TestCase.java
示例6: setEnvironment
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init();
serverManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File sourceFile = new File(FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + File.separator +
"ESB" + File.separator + "streamingxpath" + File.separator + "synapse.properties");
serverManager.applyConfiguration(sourceFile);
super.init();
String relativePath = "artifacts" + File.separator + "ESB" + File.separator + "streamingxpath" +
File.separator + "StreamingException.xml";
ESBTestCaseUtils util = new ESBTestCaseUtils();
OMElement proxyConfig = util.loadResource(relativePath);
try {
addProxyService(proxyConfig);
} catch (Exception ignore) {
exceptionCaught=true;
}
}
开发者ID:wso2,项目名称:product-ei,代码行数:21,代码来源:StreamingXpathExceptionTestCase.java
示例7: startJMSBrokerAndConfigureESB
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void startJMSBrokerAndConfigureESB() throws Exception {
super.init();
context = new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN);
super.init();
loadSampleESBConfiguration(705);
axis2Server1 = new SampleAxis2Server("test_axis2_server_9001.xml");
axis2Server2 = new SampleAxis2Server("test_axis2_server_9002.xml");
axis2Server3 = new SampleAxis2Server("test_axis2_server_9003.xml");
axis2Server1.deployService(SampleAxis2Server.SIMPLE_STOCK_QUOTE_SERVICE);
axis2Server1.start();
axis2Server2.deployService(SampleAxis2Server.SIMPLE_STOCK_QUOTE_SERVICE);
axis2Server2.start();
axis2Server3.deployService(SampleAxis2Server.SIMPLE_STOCK_QUOTE_SERVICE);
axis2Server3.start();
}
开发者ID:wso2,项目名称:product-ei,代码行数:22,代码来源:Sample705TestCase.java
示例8: startServerWithEagerLoading
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void startServerWithEagerLoading() throws Exception {
super.init(TestUserMode.SUPER_TENANT_USER);
serverManager = new ServerConfigurationManager(context);
AutomationContext autoContext = new AutomationContext();
// upload a faulty sequence which refer registry resource doesn't exists
FileUtils.copyFileToDirectory(new File(FrameworkPathUtil.getSystemResourceLocation() +
"/artifacts/ESB/eager/loading/ESBJAVA3602-FaultySeq.xml"),
getSynapseDeploymentDir());
File carbonXml = new File(FrameworkPathUtil.getSystemResourceLocation() +
"/artifacts/ESB/eager/loading/ESBJAVA3602Carbon.xml");
serverManager.applyConfiguration(carbonXml, getCarbonXmlFile());
super.init(TestUserMode.TENANT_ADMIN);
logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:18,代码来源:EagerLoadingTestCase.java
示例9: testStartServers
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@SetEnvironment(executionEnvironments = {ExecutionEnvironment.STANDALONE})
@BeforeClass(groups = {"esb.multi.server"})
public void testStartServers() throws Exception {
context = new AutomationContext();
startupParameterMap1.put("-DportOffset", "10");
startupParameterMap1.put("startupScript", "integrator");
CarbonTestServerManager server1 = new CarbonTestServerManager(context, System.getProperty("carbon.zip"),
startupParameterMap1);
startupParameterMap2.put("-DportOffset", "20");
startupParameterMap2.put("startupScript", "integrator");
CarbonTestServerManager server2 = new CarbonTestServerManager(context, System.getProperty("carbon.zip"),
startupParameterMap2);
manager.startServers(server1, server2);
}
开发者ID:wso2,项目名称:product-ei,代码行数:17,代码来源:NewInstanceTestCase.java
示例10: initialize
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void initialize() throws Exception {
//Starting the thrift port to listen to statistics events
thriftServer = new ThriftServer("Wso2EventTestCase", 7612, true);
thriftServer.start(7612);
log.info("Thrift Server is Started on port 8462");
//Changing synapse configuration to enable statistics and tracing
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfiguration(
new File(getESBResourceLocation() + File.separator + "StatisticTestResources" + File.separator +
"synapse.properties"));
super.init();
thriftServer.resetMsgCount();
thriftServer.resetPreservedEventList();
//load esb configuration to the server
loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/statistics/synapseconfigproxy.xml");
thriftServer.waitToReceiveEvents(20000, 4); //waiting for esb to send artifact config data to the thriftserver
//Checking whether all the artifact configuration events are received
Assert.assertEquals("Four configuration events are required", 4, thriftServer.getMsgCount());
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:ProxyStatisticsTest.java
示例11: initialize
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void initialize() throws Exception {
//Starting the thrift port to listen to statistics events
thriftServer = new ThriftServer("Wso2EventTestCase", 7612, true);
thriftServer.start(7612);
log.info("Thrift Server is Started on port 8462");
//Changing synapse configuration to enable statistics and tracing
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfiguration(
new File(getESBResourceLocation() + File.separator + "StatisticTestResources" + File.separator +
"synapse.properties"));
super.init();
thriftServer.resetMsgCount();
thriftServer.resetPreservedEventList();
//load esb configuration to the server
loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/statistics/synapseconfigapi.xml");
thriftServer.waitToReceiveEvents(20000, 3); //waiting for esb to send artifact config data to the thriftserver
//Checking whether all the artifact configuration events are received
Assert.assertEquals("Three configuration events are required", 3, thriftServer.getMsgCount());
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:ApiStatisticsTest.java
示例12: initialize
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void initialize() throws Exception {
//Starting the thrift port to listen to statistics events
thriftServer = new ThriftServer("Wso2EventTestCase", 7612, true);
thriftServer.start(7612);
log.info("Thrift Server is Started on port 8462");
//Changing synapse configuration to enable statistics and tracing
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfiguration(
new File(getESBResourceLocation() + File.separator + "StatisticTestResources" + File.separator +
"synapse.properties"));
super.init();
thriftServer.resetMsgCount();
thriftServer.resetPreservedEventList();
//load esb configuration to the server
loadESBConfigurationFromClasspath("/artifacts/ESB/synapseconfig/statistics/sequencereference.xml");
thriftServer.waitToReceiveEvents(20000, 6); //waiting for esb to send artifact config data to the thriftserver
//Checking whether all the artifact configuration events are received
Assert.assertEquals("Six configuration events are required", 6, thriftServer.getMsgCount());
}
开发者ID:wso2,项目名称:product-ei,代码行数:25,代码来源:SequenceStatisticsTest.java
示例13: setEnvironment
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void setEnvironment() throws Exception {
super.init();
serverConfigurationManager =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
serverConfigurationManager.applyConfigurationWithoutRestart(new File(FULL_RESOURCE_PATH + "axis2.xml"));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + HAWTBUF).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + ACTIVEMQ_BROKER).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + ACTIVEMQ_CLIENT).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + GERONIMO_J2EE_MANAGEMENT).toURI()));
serverConfigurationManager.copyToComponentLib
(new File(getClass().getResource(JAR_LOCATION + File.separator + GERONIMO_JMS).toURI()));
serverConfigurationManager.restartGracefully();
super.init();
addInboundEndpoint(esbUtils.loadResource(RELATIVE_RESOURCE_PATH + "JMSEndpoint.xml"));
logViewerClient = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:22,代码来源:InboundEPWithNonWorkerManager.java
示例14: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
serverConfigurationManager = new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
String nhttpFile = FrameworkPathUtil.getSystemResourceLocation() + "artifacts" + separator + "ESB" + separator +
"passthru" + separator + "transport" + separator + "httpaccesslogs" + separator + "nhttp.properties";
File srcFile = new File(nhttpFile);
String carbonHome = System.getProperty(ServerConstants.CARBON_HOME);
httpLogDir = carbonHome + File.separator + "repository" + File.separator + "logs" + File.separator + "httpLogs";
File log4jProperties = new File(carbonHome + File.separator + "conf" +
File.separator + "log4j.properties");
String propertyName = "nhttp.log.directory";
createNewDir(httpLogDir);
applyProperty(srcFile, propertyName, httpLogDir);
applyProperty(log4jProperties, "log4j.logger.org.apache.synapse.transport.http.access", "DEBUG");
serverConfigurationManager.restartGracefully();
super.init();
verifyProxyServiceExistence("HttpAccessLogsTestProxy");
}
开发者ID:wso2,项目名称:product-ei,代码行数:23,代码来源:HttpAccessLogTestCase.java
示例15: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
configurationManagerAxis2 =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator +
"axis2config" + File.separator + "axis2.xml");
configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2);
super.init();
rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance();
//This is to stop existing rabbitMQ server instances
rabbitMQServer.stop();
rabbitMQServer.start();
Assert.assertTrue(rabbitMQServer.isRabbitMQStarted(90), "Failed to start rabbitMQ server properly within given timeout");
initRabbitMQBroker();
loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/multipleListner/RabbitMQMultipleListnerProxy.xml");
proxyServiceAdminClient = new ProxyServiceAdminClient(contextUrls.getBackEndUrl(), getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:ESBJAVA4630RabbitMQMultipleListnerTestCase.java
示例16: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance();
sender = new RabbitMQProducerClient("localhost", 5672, "guest", "guest");
consumer = new RabbitMQConsumerClient("localhost");
configurationManagerAxis2 =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator +
"axis2config" + File.separator + "axis2.xml");
configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2);
super.init();
logViewer = new LogViewerClient(contextUrls.getBackEndUrl(), getSessionCookie());
loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/transport/rabbitmq_consumer_proxy.xml");
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:RabbitMQReceiverConnectionRecoveryTestCase.java
示例17: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
public void init() throws Exception {
super.init();
rabbitMQServer = RabbitMQTestUtils.getRabbitMQServerInstance();
configurationManagerAxis2 =
new ServerConfigurationManager(new AutomationContext("ESB", TestUserMode.SUPER_TENANT_ADMIN));
File customAxisConfigAxis2 = new File(getESBResourceLocation() + File.separator +
"axis2config" + File.separator + "axis2.xml");
configurationManagerAxis2.applyConfiguration(customAxisConfigAxis2);
super.init();
loadESBConfigurationFromClasspath("/artifacts/ESB/rabbitmq/transport/rabbitmq_endpoint_proxy.xml");
}
开发者ID:wso2,项目名称:product-ei,代码行数:17,代码来源:RabbitMQSenderConnectionRecoveryTestCase.java
示例18: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void init() throws Exception {
super.init();
AutomationContext automationContext = new AutomationContext();
DATASOURCE_NAME = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_NAME);
DB_PASSWORD = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_DB_PASSWORD);
JDBC_URL = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_URL);
DB_USER = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_DB_USER_NAME);
JDBC_DRIVER = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_DRIVER_CLASS_NAME);
serverConfigurationManager = new ServerConfigurationManager(context);
copyJDBCDriverToClassPath();
mySqlDatabaseManager = new MySqlDatabaseManager(JDBC_URL, DB_USER, DB_PASSWORD);
mySqlDatabaseManager.executeUpdate("DROP DATABASE IF EXISTS WSO2SampleDBForAutomation");
super.init();
}
开发者ID:wso2,项目名称:product-ei,代码行数:18,代码来源:JDBCMessageProcessorTestCase.java
示例19: init
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@BeforeClass(alwaysRun = true)
protected void init() throws Exception {
super.init();
AutomationContext automationContext = new AutomationContext();
DATASOURCE_NAME = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_NAME);
DB_PASSWORD = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_DB_PASSWORD);
JDBC_URL = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_URL);
DB_USER = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_DB_USER_NAME);
JDBC_DRIVER = automationContext.getConfigurationValue(XPathConstants.DATA_SOURCE_DRIVER_CLASS_NAME);
serverConfigurationManager = new ServerConfigurationManager(context);
copyJDBCDriverToClassPath();
mySqlDatabaseManager = new MySqlDatabaseManager(JDBC_URL, DB_USER, DB_PASSWORD);
mySqlDatabaseManager.executeUpdate("DROP DATABASE IF EXISTS WSO2SampleDBForAutomation");
super.init();
headers.put("Test-Header-Field", "TestHeaderValue");
logViewer = new LogViewerClient(contextUrls.getBackEndUrl(),getSessionCookie());
}
开发者ID:wso2,项目名称:product-ei,代码行数:21,代码来源:JDBCMessageStoreProcRESTTestCase.java
示例20: unDeployServices
import org.wso2.carbon.automation.engine.context.AutomationContext; //导入依赖的package包/类
@AfterTest(alwaysRun = true)
public void unDeployServices()
throws IOException, LoginAuthenticationExceptionException, ExceptionException,
XPathExpressionException, URISyntaxException, SAXException, XMLStreamException, AutomationUtilException {
if (TestConfigurationProvider.isIntegration() && axis2Server1 != null && axis2Server1.isStarted()) {
axis2Server1.stop();
} else {
AutomationContext asContext = new AutomationContext("AS", TestUserMode.SUPER_TENANT_ADMIN);
int deploymentDelay = TestConfigurationProvider.getServiceDeploymentDelay();
String serviceName = "SecureStockQuoteServiceScenario";
ServiceDeploymentUtil deployer = new ServiceDeploymentUtil();
LoginLogoutClient loginLogoutClient = new LoginLogoutClient(asContext);
for (int i = 1; i < 9; i++) {
deployer.unDeployArrService(asContext.getContextUrls().getBackEndUrl(), loginLogoutClient.login()
, serviceName + i, deploymentDelay);
}
}
}
开发者ID:wso2,项目名称:product-ei,代码行数:20,代码来源:Axis2ServerStartupWithSecuredServices.java
注:本文中的org.wso2.carbon.automation.engine.context.AutomationContext类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论