svn commit r44201 - trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit r44201 - trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas

Charitha Kankanamge
Author: charitha
Date: Wed Aug 26 03:15:54 2009
New Revision: 44201
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=44201

Log:
Improved CSV data service tests

Modified:
   trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataService.java
   trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceClient.java
   trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceManagementTest.java

Modified: trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataService.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataService.java?rev=44201&r1=44200&r2=44201&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataService.java (original)
+++ trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataService.java Wed Aug 26 03:15:54 2009
@@ -1,3 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
 package org.wso2.carbon.web.test.wsas;
 
 import com.thoughtworks.selenium.SeleneseTestCase;
@@ -11,13 +30,6 @@
 import org.wso2.carbon.web.test.common.GenericServiceClient;
 import org.wso2.carbon.web.test.common.ServiceManagement;
 
-/**
- * Created by IntelliJ IDEA.
- * User: jayani
- * Date: Aug 24, 2009
- * Time: 12:13:52 PM
- * To change this template use File | Settings | File Templates.
- */
 public class CSVDataService extends SeleneseTestCase {
     Selenium browser;
     Properties properties = new Properties();
@@ -27,22 +39,22 @@
         browser = _browser;
     }
 
-     public static Properties loadProperties() throws IOException {
+    public static Properties loadProperties() throws IOException {
         Properties properties = new Properties();
         properties.load(new FileInputStream(".." + File.separator + "commons" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "framework.properties"));
         return properties;
     }
 
-    public void newDataService(String serviceName,String description) throws Exception {
+    public void newDataService(String serviceName, String description) throws Exception {
         browser.click("link=Create");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
         assertTrue(browser.isTextPresent("Create Data Service "));
         assertTrue(browser.isTextPresent("Service Details "));
         assertTrue(browser.isElementPresent("//input[@value='Cancel']"));
- browser.type("serviceName", serviceName);
- browser.type("description", description);
+        browser.type("serviceName", serviceName);
+        browser.type("description", description);
 
-       // String name=browser.getText("serviceName");
+        // String name=browser.getText("serviceName");
         browser.click("//input[@value='Next >']");
 
 //        if(name.equals("")){
@@ -51,36 +63,36 @@
 //     browser.click("//input[@value='Cancel']");
 //        }
         browser.waitForPageToLoad("30000");
-      
+
     }
 
-    public void newDataSource(String datasourceId,String path,String columns,String columnordinal,int startingrow) throws Exception{
+    public void newDataSource(String datasourceId, String path, String columns, String columnordinal, int startingrow) throws Exception {
         File resourcePath = new File("." + File.separator + "lib" + File.separator + path);
 
         assertTrue(browser.isTextPresent("Data Sources"));
         assertTrue(browser.isElementPresent("//input[@value='Next >']"));
         assertTrue(browser.isElementPresent("//input[@value='Cancel']"));
         browser.click("link=Add New Data Source");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
 
         assertTrue(browser.isTextPresent("Add New Data Source "));
         assertTrue(browser.isElementPresent("//input[@value='Save']"));
         assertTrue(browser.isElementPresent("//input[@value='Cancel']"));
- browser.type("datasourceId", datasourceId);
- browser.select("datasourceType", "label=CSV");
- browser.waitForPageToLoad("30000");
+        browser.type("datasourceId", datasourceId);
+        browser.select("datasourceType", "label=CSV");
+        browser.waitForPageToLoad("30000");
 
         assertTrue(browser.isTextPresent("Add New Data Source"));
         assertTrue(browser.isElementPresent("//input[@value='Cancel']"));
         browser.type("csv_datasource", resourcePath.getCanonicalPath());
- browser.type("csv_columns", columns);
- browser.type("csv_columnordinal", columnordinal);
-        browser.type("csv_startingrow",Integer.toString(startingrow));
- browser.select("csv_hasheader", "label=true");
+        browser.type("csv_columns", columns);
+        browser.type("csv_columnordinal", columnordinal);
+        browser.type("csv_startingrow", Integer.toString(startingrow));
+        browser.select("csv_hasheader", "label=true");
 
 
- browser.click("//input[@value='Save']");
- browser.waitForPageToLoad("30000");
+        browser.click("//input[@value='Save']");
+        browser.waitForPageToLoad("30000");
 
         assertTrue(browser.isTextPresent("Data Sources"));
         assertTrue(browser.isTextPresent("Name"));
@@ -92,40 +104,40 @@
         assertTrue(browser.isElementPresent("//input[@value='Finish']"));
 
         browser.click("//input[@value='Next >']");
- browser.waitForPageToLoad("30000");
-        
+        browser.waitForPageToLoad("30000");
+
     }
 
-    public void  addQuery(String queryId,String datasource,String wrapElement,String rowName) throws Exception{
+    public void addQuery(String queryId, String datasource, String wrapElement, String rowName) throws Exception {
         browser.click("link=Add New Query");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
 
         assertTrue(browser.isTextPresent("Add New Query"));
         assertTrue(browser.isTextPresent("Result (Output Mapping)"));
 
- browser.type("queryId", queryId);
- browser.select("datasource", "label="+datasource);
- browser.type("txtDataServiceWrapElement", wrapElement);
- browser.type("txtDataServiceRowName", rowName);
+        browser.type("queryId", queryId);
+        browser.select("datasource", "label=" + datasource);
+        browser.type("txtDataServiceWrapElement", wrapElement);
+        browser.type("txtDataServiceRowName", rowName);
 
         browser.click("newOutputMapping");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
     }
 
-    public void addOutputMapping(String mappingType,String feildName,int columnName) throws Exception{
+    public void addOutputMapping(String mappingType, String feildName, int columnName) throws Exception {
         assertTrue(browser.isTextPresent("Add/Edit Output Mapping"));
-       browser.select("cmbDataServiceOMType", "label="+mappingType);
- browser.type("txtDataServiceOMElementName", feildName);
- browser.type("txtDataServiceOMColumnName", Integer.toString(columnName));
- browser.click("//input[@value='Add']");
- browser.waitForPageToLoad("30000");
+        browser.select("cmbDataServiceOMType", "label=" + mappingType);
+        browser.type("txtDataServiceOMElementName", feildName);
+        browser.type("txtDataServiceOMColumnName", Integer.toString(columnName));
+        browser.click("//input[@value='Add']");
+        browser.waitForPageToLoad("30000");
     }
 
-    public void gotoMainConfiguration() throws Exception{
+    public void gotoMainConfiguration() throws Exception {
         browser.click("//input[@value='Main Configuration']");
         assertTrue(browser.isTextPresent("Do you want to go back to the main configuration?"));
- browser.click("//button[@type='button']");
- browser.waitForPageToLoad("30000");
+        browser.click("//button[@type='button']");
+        browser.waitForPageToLoad("30000");
         assertTrue(browser.isTextPresent("Edit Query"));
         assertTrue(browser.isTextPresent("Query ID*"));
         assertTrue(browser.isTextPresent("Data Source*"));
@@ -133,27 +145,27 @@
         assertTrue(browser.isElementPresent("//input[@value='Cancel']"));
         assertTrue(browser.isElementPresent("newOutputMapping"));
         browser.click("//input[@value='Save']");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
         browser.click("//input[@value='Next >']");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
     }
 
-    public void addOperation(String operationName,String queryId ) throws Exception{
+    public void addOperation(String operationName, String queryId) throws Exception {
         assertTrue(browser.isTextPresent("Operations"));
         browser.click("link=Add New Operation");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
         assertTrue(browser.isTextPresent("Add New Operation"));
- browser.type("operationName",operationName );
- browser.select("queryId", "label="+queryId);
- browser.waitForPageToLoad("30000");
- browser.click("//input[@value='Save']");
- browser.waitForPageToLoad("30000");
- browser.click("//input[@value='Finish']");
- browser.waitForPageToLoad("30000");
-      
+        browser.type("operationName", operationName);
+        browser.select("queryId", "label=" + queryId);
+        browser.waitForPageToLoad("30000");
+        browser.click("//input[@value='Save']");
+        browser.waitForPageToLoad("30000");
+        browser.click("//input[@value='Finish']");
+        browser.waitForPageToLoad("30000");
+
     }
 
-    public void checkService(String serviceName) throws Exception{
+    public void checkService(String serviceName) throws Exception {
         ServiceManagement instServiceManagement = new ServiceManagement(browser);
         Thread.sleep(12000);
         browser.click("link=List");
@@ -163,26 +175,26 @@
         instServiceManagement.accessServiceDashboard(serviceName);
         assertTrue(browser.isTextPresent("Specific Configuration"));
         browser.click("link=Edit Data Service (Wizard)");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
         assertTrue(browser.isTextPresent(" Edit Data Service(" + serviceName + ")"));
         browser.click("//input[@value='Cancel']");
         browser.waitForPageToLoad("30000");
 
         instServiceManagement.accessServiceDashboard(serviceName);
         browser.click("link=Edit Data Service (XML Edit)");
- browser.waitForPageToLoad("30000");
+        browser.waitForPageToLoad("30000");
         assertTrue(browser.isTextPresent(" Data Service XML Editor(" + serviceName + ")"));
- browser.click("cancel");
- browser.waitForPageToLoad("30000");
+        browser.click("cancel");
+        browser.waitForPageToLoad("30000");
     }
 
-    public void tryDataService(String ServiceName,String operationName,String SoapAction,String namespace) throws Exception{
-        CSVDataServiceClient CSVClient=new CSVDataServiceClient();
+    public String tryDataService(String ServiceName, String operationName, String SoapAction, String namespace) throws Exception {
+        CSVDataServiceClient CSVClient = new CSVDataServiceClient();
 
+        String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + ServiceName;
+        String result = CSVClient.CSVClient(serviceepr, operationName, SoapAction, namespace);
+        return result;
 
-        //String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + "/services/" + ServiceName;
-       CSVClient.CSVClient(ServiceName, operationName, SoapAction, namespace);
 
-        
-   }
+    }
 }

Modified: trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceClient.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceClient.java?rev=44201&r1=44200&r2=44201&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceClient.java (original)
+++ trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceClient.java Wed Aug 26 03:15:54 2009
@@ -1,3 +1,21 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
 package org.wso2.carbon.web.test.wsas;
 
 import org.apache.axiom.om.OMElement;
@@ -11,20 +29,14 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 
+import javax.xml.namespace.QName;
 import java.util.Properties;
 import java.io.FileInputStream;
 import java.io.File;
 import java.io.IOException;
 
 
-/**
- * Created by IntelliJ IDEA.
- * User: jayani
- * Date: Aug 24, 2009
- * Time: 3:12:02 PM
- * To change this template use File | Settings | File Templates.
- */
-public class CSVDataServiceClient{
+public class CSVDataServiceClient {
 
 
     public static Properties loadProperties() throws IOException {
@@ -33,19 +45,16 @@
         return properties;
     }
 
-    public void CSVClient(String epr, String operationName, String SoapAction, String NameSpace) throws Exception {
-
-
-
-           ServiceClient sc = new ServiceClient();
-           Options opts = new Options();
-           opts.setTo(new EndpointReference(epr));
-           opts.setAction(SoapAction);
-           sc.setOptions(opts);
-           OMElement result = sc.sendReceive(CreatePayload( operationName, NameSpace));
-           System.out.println(result);
-          // globalData = result.getText();
+    public String CSVClient(String epr, String operationName, String SoapAction, String NameSpace) throws Exception {
 
+        ServiceClient sc = new ServiceClient();
+        Options opts = new Options();
+        opts.setTo(new EndpointReference(epr));
+        opts.setAction(SoapAction);
+        sc.setOptions(opts);
+        OMElement result = sc.sendReceive(CreatePayload(operationName, NameSpace));
+        System.out.println(result.getFirstElement().getAttributeValue(new QName("http://ws.wso2.org/dataservice", "address")));
+        return result.getFirstElement().getAttributeValue(new QName("http://ws.wso2.org/dataservice", "address"));
 
 
     }

Modified: trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceManagementTest.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceManagementTest.java?rev=44201&r1=44200&r2=44201&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceManagementTest.java (original)
+++ trunk/commons/qa/web-test-framework/wsas/src/test/java/org/wso2/carbon/web/test/wsas/CSVDataServiceManagementTest.java Wed Aug 26 03:15:54 2009
@@ -1,3 +1,22 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
 package org.wso2.carbon.web.test.wsas;
 
 import com.thoughtworks.selenium.Selenium;
@@ -13,22 +32,15 @@
 import java.io.FileInputStream;
 import java.util.Properties;
 
-/**
- * Created by IntelliJ IDEA.
- * User: jayani
- * Date: Aug 24, 2009
- * Time: 12:33:28 PM
- * To change this template use File | Settings | File Templates.
- */
 public class CSVDataServiceManagementTest extends TestCase {
     Selenium browser;
     private static final String moduleVersion = "2.01";
 
-     public void setUp() throws Exception  {
+    public void setUp() throws Exception {
         browser = BrowserInitializer.getBrowser();
     }
 
-     public static Properties loadProperties() throws IOException {
+    public static Properties loadProperties() throws IOException {
         Properties properties = new Properties();
         properties.load(new FileInputStream(".." + File.separator + "commons" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "framework.properties"));
         return properties;
@@ -36,28 +48,28 @@
 
     public void testCreatMySQLDataService() throws Exception {
         SeleniumTestBase seleniumTestBase = new SeleniumTestBase(browser);
-
-
-
-        seleniumTestBase.loginToUI("admin","admin");
+        seleniumTestBase.loginToUI("admin", "admin");
         CSVDataService csvDataService = new CSVDataService(browser);
 
-        csvDataService.newDataService("CSVDataService" , "Sample data service");
-        csvDataService.newDataSource("CSVDataSource","DataServiceCSVResource.csv","id,name,address","1,2,3",2);
-        csvDataService.addQuery("q1","CSVDataSource","customers", "customer");
-        csvDataService.addOutputMapping("element","id",1);
-        csvDataService.addOutputMapping("element","name",2);
-        csvDataService.addOutputMapping("attribute","address",3);
+        csvDataService.newDataService("CSVDataService", "Sample data service");
+        csvDataService.newDataSource("CSVDataSource", "DataServiceCSVResource.csv", "id,name,address", "1,2,3", 2);
+        csvDataService.addQuery("q1", "CSVDataSource", "customers", "customer");
+        csvDataService.addOutputMapping("element", "id", 1);
+        csvDataService.addOutputMapping("element", "name", 2);
+        csvDataService.addOutputMapping("attribute", "address", 3);
         csvDataService.gotoMainConfiguration();
-        csvDataService.addOperation("getAllCustomer","q1");
+        csvDataService.addOperation("getAllCustomer", "q1");
         csvDataService.checkService("CSVDataService");
 
     }
 
-    public void testInvokeService() throws Exception{
+    public void testInvokeService() throws Exception {
         CSVDataService csvDataService = new CSVDataService(browser);
-       String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
-        csvDataService.tryDataService(serviceepr,"getAllCustomer","urn:getAllCustomer","http://ws.wso2.org/dataservice");
+        String serviceName = "CSVDataService";
+        String csvExpectedResult = "Boston";
+        String result = csvDataService.tryDataService(serviceName, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice");
+        assertEquals(csvExpectedResult, result);
+
     }
 
     public void testServiceGroupParameter() throws Exception {
@@ -68,155 +80,156 @@
     }
 
 
-        public void testAddServiceGroupModule() throws Exception {
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.engageServiceGroupModule("CSVDataService", "sandesha2-" + moduleVersion);
-            instServiceManagement.disengageServiceGroupModule("CSVDataService", "sandesha2-" + moduleVersion);
-        }
-
-        public void testCheckThrottling() throws Exception {
-
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.openServiceDashboard("CSVDataService", "data_service");
-            String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
-            instServiceManagement.checkThrottling(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice", "s");
-
-
-        }
-
-        public void testCheckCaching() throws Exception {
-
-
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
-            instServiceManagement.checkCaching(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice");
-
-        }
-
-        public void testServiceModuleMgt() throws Exception {
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.engageServiceModule("CSVDataService", "sandesha2-" + moduleVersion);
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.disengageServiceModule("CSVDataService", "sandesha2-" + moduleVersion);
-        }
-
-        public void testServiceActivation() throws Exception {
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.serviceActivation("CSVDataService", "Deactivate");
-            instServiceManagement.serviceActivation("CSVDataService", "Activate");
-        }
-
-       public void testTransport() throws Exception {
-          ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.checkTransport("CSVDataService");
-        }
-
-        public void testServiceParameter() throws Exception {
-            SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            mySeleniumTestBase.addNewParameter("testparam");
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            mySeleniumTestBase.deleteParameter("testparam");
-        }
-
-
-        public void testOperationalThrottling() throws Exception {
-
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.openOperationDashboard("CSVDataService", "getAllCustomer");
-            instServiceManagement.checkThrottling(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice", "s");
-
-        }
-
-        public void testOperationalCaching() throws Exception {
-
-
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.openOperationDashboard("CSVDataService","getAllCustomer");
-            instServiceManagement.checkCaching(serviceepr,"getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice");
-
-
-        }
-
-        public void testOperationalModuleMgt() throws Exception {
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.engageOperationModule("CSVDataService","getAllCustomer", "savan-SNAPSHOT");
-            instServiceManagement.disengageOperationModule("CSVDataService","getAllCustomer", "savan-SNAPSHOT");
-        }
-
-        public void testOperationalAddParameters() throws Exception {
-            SeleniumTestBase InstSeleniumTestBase = new SeleniumTestBase(browser);
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            String operationName = "getAllCustomer";
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.openOperationDashboard("CSVDataService", operationName);
-            InstSeleniumTestBase.addNewParameter("testparam");
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.openOperationDashboard("CSVDataService", operationName);
-            InstSeleniumTestBase.deleteOperationalParameter("testparam");
-        }
-
-        public void testOperationalFlows() throws Exception {
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.accessServiceDashboard("CSVDataService");
-            instServiceManagement.openOperationDashboard("CSVDataService", "getAllCustomer");
-            instServiceManagement.checkParamFlows();
-        }
-
-        public void testReliableMessaging() throws Exception {
-
-            String serviceName ="CSVDataService";
-            String nameSpace = "http://ws.wso2.org/dataservice";
-            String soapAction = "urn:getAllCustomer";
-            String operation = "getAllCustomer";
-
-            ServiceManagement instServiceManagement = new ServiceManagement(browser);
-            instServiceManagement.enableRM("CSVDataService");
-            instServiceManagement.rmInvocations(serviceName, soapAction, nameSpace, operation, "s");
-            instServiceManagement.disableRM("CSVDataService");
-
-        }
-
-        
-        public void testMTOM() throws Exception {
-            ServiceManagement insServiceManagement = new ServiceManagement(browser);
-
-            insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer", "True");
-            Thread.sleep(1000);
-            insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer", "Optional");
-            Thread.sleep(1000);
-            insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer", "False");
-            Thread.sleep(1000);
-            insServiceManagement.changeServiceGroupMTOM("CSVDataService", "True");
-            Thread.sleep(1000);
-            insServiceManagement.changeServiceGroupMTOM("CSVDataService", "Optional");
-            Thread.sleep(1000);
-            insServiceManagement.changeServiceGroupMTOM("CSVDataService", "False");
-            Thread.sleep(1000);
-            insServiceManagement.changeServiceMTOM("CSVDataService", "Optional");
-            Thread.sleep(1000);
-            insServiceManagement.changeServiceMTOM("CSVDataService", "True");
-            Thread.sleep(1000);
-            insServiceManagement.changeServiceMTOM("CSVDataService", "False");
-
-
-        }
-
-
-        public void testAddKeyStore() throws Exception {
-
-            KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);
-            File path = new File(".." + File.separator + "commons" + File.separator + "lib" + File.separator + "qaserver.jks");
-            instKeyStoreManagement.AddKeystore(path.getCanonicalPath(), "qaserver");
+    public void testAddServiceGroupModule() throws Exception {
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.engageServiceGroupModule("CSVDataService", "sandesha2-" + moduleVersion);
+        instServiceManagement.disengageServiceGroupModule("CSVDataService", "sandesha2-" + moduleVersion);
+    }
 
-        }
+    public void testCheckThrottling() throws Exception {
+
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.openServiceDashboard("CSVDataService", "data_service");
+        String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
+        instServiceManagement.checkThrottling(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice", "s");
+
+
+    }
+
+    public void testCheckCaching() throws Exception {
+
+
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
+        instServiceManagement.checkCaching(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice");
+
+    }
+
+    public void testServiceModuleMgt() throws Exception {
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        instServiceManagement.engageServiceModule("CSVDataService", "sandesha2-" + moduleVersion);
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        instServiceManagement.disengageServiceModule("CSVDataService", "sandesha2-" + moduleVersion);
+    }
+
+    public void testServiceActivation() throws Exception {
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.serviceActivation("CSVDataService", "Deactivate");
+        instServiceManagement.serviceActivation("CSVDataService", "Activate");
+    }
+
+    public void testTransport() throws Exception {
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.checkTransport("CSVDataService");
+    }
+
+    public void testServiceParameter() throws Exception {
+        SeleniumTestBase mySeleniumTestBase = new SeleniumTestBase(browser);
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        mySeleniumTestBase.addNewParameter("testparam");
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        mySeleniumTestBase.deleteParameter("testparam");
+    }
+
+
+//        public void testOperationalThrottling() throws Exception {
+//
+//            ServiceManagement instServiceManagement = new ServiceManagement(browser);
+//            String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
+//            instServiceManagement.accessServiceDashboard("CSVDataService");
+//            instServiceManagement.openOperationDashboard("CSVDataService", "getAllCustomer");
+//            instServiceManagement.checkThrottling(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice", "s");
+//
+//        }
+
+    //
+    public void testOperationalCaching() throws Exception {
+
+
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") + loadProperties().getProperty("context.root") + "/services/" + "CSVDataService";
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        instServiceManagement.openOperationDashboard("CSVDataService", "getAllCustomer");
+        instServiceManagement.checkCaching(serviceepr, "getAllCustomer", "urn:getAllCustomer", "http://ws.wso2.org/dataservice");
+
+
+    }
+
+    public void testOperationalModuleMgt() throws Exception {
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.engageOperationModule("CSVDataService", "getAllCustomer", "savan-SNAPSHOT");
+        instServiceManagement.disengageOperationModule("CSVDataService", "getAllCustomer", "savan-SNAPSHOT");
+    }
+
+    public void testOperationalAddParameters() throws Exception {
+        SeleniumTestBase InstSeleniumTestBase = new SeleniumTestBase(browser);
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        String operationName = "getAllCustomer";
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        instServiceManagement.openOperationDashboard("CSVDataService", operationName);
+        InstSeleniumTestBase.addNewParameter("testparam");
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        instServiceManagement.openOperationDashboard("CSVDataService", operationName);
+        InstSeleniumTestBase.deleteOperationalParameter("testparam");
+    }
+
+    public void testOperationalFlows() throws Exception {
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.accessServiceDashboard("CSVDataService");
+        instServiceManagement.openOperationDashboard("CSVDataService", "getAllCustomer");
+        instServiceManagement.checkParamFlows();
+    }
+
+    public void testReliableMessaging() throws Exception {
+
+        String serviceName = "CSVDataService";
+        String nameSpace = "http://ws.wso2.org/dataservice";
+        String soapAction = "urn:getAllCustomer";
+        String operation = "getAllCustomer";
+
+        ServiceManagement instServiceManagement = new ServiceManagement(browser);
+        instServiceManagement.enableRM("CSVDataService");
+        instServiceManagement.rmInvocations(serviceName, soapAction, nameSpace, operation, "s");
+        instServiceManagement.disableRM("CSVDataService");
+
+    }
+
+
+    public void testMTOM() throws Exception {
+        ServiceManagement insServiceManagement = new ServiceManagement(browser);
+
+        insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer", "True");
+        Thread.sleep(1000);
+        insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer", "Optional");
+        Thread.sleep(1000);
+        insServiceManagement.changeOperationalMTOM("CSVDataService", "getAllCustomer", "False");
+        Thread.sleep(1000);
+        insServiceManagement.changeServiceGroupMTOM("CSVDataService", "True");
+        Thread.sleep(1000);
+        insServiceManagement.changeServiceGroupMTOM("CSVDataService", "Optional");
+        Thread.sleep(1000);
+        insServiceManagement.changeServiceGroupMTOM("CSVDataService", "False");
+        Thread.sleep(1000);
+        insServiceManagement.changeServiceMTOM("CSVDataService", "Optional");
+        Thread.sleep(1000);
+        insServiceManagement.changeServiceMTOM("CSVDataService", "True");
+        Thread.sleep(1000);
+        insServiceManagement.changeServiceMTOM("CSVDataService", "False");
+
+
+    }
+
+
+    public void testAddKeyStore() throws Exception {
+
+        KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);
+        File path = new File(".." + File.separator + "commons" + File.separator + "lib" + File.separator + "qaserver.jks");
+        instKeyStoreManagement.AddKeystore(path.getCanonicalPath(), "qaserver");
+
+    }
 
 //        public void testCheckSecurityScenario1() throws Exception {
 //            ServiceManagement instServiceManagement = new ServiceManagement(browser);
@@ -453,19 +466,18 @@
 //        }
 
 
-  
-        public void testDeleteKeystore() throws Exception {
-            KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);
-            instKeyStoreManagement.deleteKeyStore("qaserver.jks");
-        }
+    public void testDeleteKeystore() throws Exception {
+        KeyStoreManagement instKeyStoreManagement = new KeyStoreManagement(browser);
+        instKeyStoreManagement.deleteKeyStore("qaserver.jks");
+    }
 
-    public void testRemoveServices() throws Exception{
+    public void testRemoveServices() throws Exception {
         SeleniumTestBase seleniumTestBase = new SeleniumTestBase(browser);
         seleniumTestBase.deleteService("CSVDataService");
-      
+
     }
 
-    public void testLogoutUi() throws Exception{
+    public void testLogoutUi() throws Exception {
         SeleniumTestBase seleniumTestBase = new SeleniumTestBase(browser);
         seleniumTestBase.logOutUI();
     }

_______________________________________________
Commons-dev mailing list
[hidden email]
https://wso2.org/cgi-bin/mailman/listinfo/commons-dev