svn commit r43919 - trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup

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

svn commit r43919 - trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup

Yumani Ranaweera
Author: yumani
Date: Thu Aug 20 23:44:12 2009
New Revision: 43919
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=43919

Log:
updated to use the properties file.

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

Modified: trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/MSServiceMnagementTest.java
URL: http://wso2.org/svn/browse/wso2/trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/MSServiceMnagementTest.java?rev=43919&r1=43918&r2=43919&view=diff
==============================================================================
--- trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/MSServiceMnagementTest.java (original)
+++ trunk/commons/qa/web-test-framework/mashup/src/test/java/org/wso2/carbon/web/test/mashup/MSServiceMnagementTest.java Thu Aug 20 23:44:12 2009
@@ -3,6 +3,11 @@
 import org.wso2.carbon.web.test.common.SeleniumTestBase;
 import org.wso2.carbon.web.test.common.ServiceManagement;
 
+import java.util.Properties;
+import java.io.IOException;
+import java.io.FileInputStream;
+import java.io.File;
+
 /*
  *  Licensed to the Apache Software Foundation (ASF) under one
  *  or more contributor license agreements.  See the NOTICE file
@@ -34,6 +39,12 @@
         myseleniumTestBase.loginToUI("admin", "admin");
     }
 
+     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 testServiceManagement() throws Exception {
 
@@ -80,7 +91,9 @@
 
 
         //Access and test caching
-       serviceManagement.checkCaching("http://localhost:9763/services/testServiceManagement","getTime", "http://services.mashup.wso2.org/testServiceManagement","http://services.mashup.wso2.org/serviceClient/ServiceInterface/getTimeRequest");
+
+       String serviceepr = "http://" + loadProperties().getProperty("host.name") + ":" + loadProperties().getProperty("http.port") +  loadProperties().getProperty("context.root")+ "/services/" + "testServiceManagement";
+       serviceManagement.checkCaching(serviceepr,"getTime", "http://services.mashup.wso2.org/testServiceManagement","http://services.mashup.wso2.org/serviceClient/ServiceInterface/getTimeRequest");
 
         //Access and test RM
        serviceManagement.enableRM("testServiceManagement");

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