svn commit r43826 - trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common

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

svn commit r43826 - trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common

Charitha Kankanamge
Author: charitha
Date: Thu Aug 20 01:59:54 2009
New Revision: 43826
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=43826

Log:
Made transport tests work with different web context

Modified:
   trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common/ServiceManagement.java

Modified: trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common/ServiceManagement.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common/ServiceManagement.java?rev=43826&r1=43825&r2=43826&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common/ServiceManagement.java (original)
+++ trunk/commons/qa/web-test-framework/commons/src/test/java/org/wso2/carbon/web/test/common/ServiceManagement.java Thu Aug 20 01:59:54 2009
@@ -20,6 +20,9 @@
 import junit.framework.TestCase;
 
 import java.awt.event.KeyEvent;
+import java.util.Properties;
+import java.io.FileInputStream;
+import java.io.File;
 
 import org.apache.axiom.om.OMElement;
 
@@ -28,6 +31,7 @@
 
 {
     Selenium browser;
+    Properties properties = new Properties();
     //   ReadXMLFile instReadXMLFile = new ReadXMLFile();
 
 
@@ -219,12 +223,9 @@
         if (sCachData != null && !sCachData.equals(sCachingCurrent)) {
             System.out.println("Caching Done..");
         } else if (sCachData != null && sCachData.equals(sCachingCurrent)) {
-//<<<<<<< .mine
-            //assertTrue(browser.isTextPresent("caching false"));
-            verifyTrue(browser.isTextPresent("caching false"));
-//=======
+
             verifyTrue(browser.isTextPresent("caching false"));
-//>>>>>>> .r43231
+
         }
         browser.click("link=Response Caching");
         browser.waitForPageToLoad("30000");
@@ -584,6 +585,9 @@
     }
 
     public void checkTransport(String ServiceName) throws Exception {
+        properties.load(new FileInputStream(".." + File.separator + "commons" + File.separator + "src" + File.separator + "test" + File.separator + "resources" + File.separator + "framework.properties"));
+        String http_port = properties.getProperty("http.port");
+        String https_port = properties.getProperty("https.port");
         accessServiceDashboard(ServiceName);
         browser.click("//table[@id='serviceOperationsTable']/tbody/tr[3]/td[2]/a");
         browser.waitForPageToLoad("30000");
@@ -605,10 +609,10 @@
         assertTrue(browser.isTextPresent("port"));
         assertTrue(browser.isTextPresent("Parameter Value"));
         if ("http".equals(protocol)) {
-            assertTrue(browser.isTextPresent("9763"));
+            assertTrue(browser.isTextPresent(http_port));
         }
         if ("https".equals(protocol)) {
-            assertTrue(browser.isTextPresent("9443"));
+            assertTrue(browser.isTextPresent(https_port));
         }
         browser.click("//input[@value='Back']");
        // browser.click("//input[@value='Update']");

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