You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2008/08/14 09:41:33 UTC

svn commit: r685791 - in /geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite: launcher/ plugins/org.apache.geronimo.testsuite.common/META-INF/ plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ pl...

Author: mcconne
Date: Thu Aug 14 00:41:31 2008
New Revision: 685791

URL: http://svn.apache.org/viewvc?rev=685791&view=rev
Log:
GERONIMODEVTOOL-480 Cleanup selenium testcases in v20 and v21 testsuites

Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/launcher/testsuite.properties
    geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/META-INF/MANIFEST.MF
    geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/Tutorial5Minute.java
    geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java
    geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/launcher/testsuite.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/launcher/testsuite.properties?rev=685791&r1=685790&r2=685791&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/launcher/testsuite.properties (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/launcher/testsuite.properties Thu Aug 14 00:41:31 2008
@@ -16,7 +16,6 @@
 #
 # @version $Rev$ $Date$
 #
-org.apache.geronimo.devtools.helloworld=org.apache.geronimo.devtools.helloworld-2.1.2
 org.apache.geronimo.testsuite.v21=org.apache.geronimo.testsuite.v21-2.1.2
 org.apache.geronimo.testsuite.v20=org.apache.geronimo.testsuite.v20-2.1.2
 org.apache.geronimo.testsuite.common=org.apache.geronimo.testsuite.common-2.1.2

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/META-INF/MANIFEST.MF?rev=685791&r1=685790&r2=685791&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/META-INF/MANIFEST.MF (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/META-INF/MANIFEST.MF Thu Aug 14 00:41:31 2008
@@ -4,9 +4,8 @@
 Bundle-SymbolicName: org.apache.geronimo.testsuite.common;singleton:=true
 Bundle-Version: 2.1.2
 Bundle-Vendor: Apache.org
-Bundle-Localization: plugin
-Require-Bundle: abbot.swt;resolution:=optional,
- abbot.swt.eclipse;resolution:=optional,
+Require-Bundle: abbot.swt,
+ abbot.swt.eclipse,
  org.eclipse.core.runtime,
  org.eclipse.debug.ui,
  org.eclipse.debug.core,

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/Tutorial5Minute.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/Tutorial5Minute.java?rev=685791&r1=685790&r2=685791&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/Tutorial5Minute.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/Tutorial5Minute.java Thu Aug 14 00:41:31 2008
@@ -171,11 +171,12 @@
 
     public void webTesting () throws Exception {
     	EclipseSelenium selenium = new EclipseSelenium();
+        selenium.start();
    		selenium.open( "http://localhost:8080/SampleWAR/");
    		selenium.type("name", "Tom");
-   		selenium.click("submit");
+	   	selenium.click("submit");
    		selenium.waitForPageToLoad( "3000" );
-   		AssertUtil.assertTrue(selenium.getHtmlSource().indexOf( "says hello to" ) > 0);
+	   	AssertUtil.assertTrue(selenium.getHtmlSource().indexOf( "says hello to" ) > 0);
 
         // TODO fill in a name and click the Process button
         // This is a problem, HTML objects are not the same as SWT objects and 

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java?rev=685791&r1=685790&r2=685791&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java Thu Aug 14 00:41:31 2008
@@ -17,10 +17,16 @@
 
 package org.apache.geronimo.testsuite.v20;
 
+import org.apache.geronimo.testsuite.common.selenium.EclipseSeleniumServer;
+import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.SafeRunner;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.swt.widgets.Shell;
 import org.osgi.framework.BundleContext;
 
+import abbot.swt.eclipse.utils.WorkbenchUtilities;
+
 /**
  * The activator class controls the plug-in life cycle
  *
@@ -34,6 +40,8 @@
 	// The shared instance
 	private static Activator plugin;
 
+	private EclipseSeleniumServer seleniumServer;
+	
 	/**
 	 * The constructor
 	 */
@@ -48,6 +56,16 @@
 	 */
 	public void start(BundleContext context) throws Exception {
 		super.start(context);
+	    Shell workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+	    AbbotHelper aHelper = new AbbotHelper (workbenchShell);
+    	seleniumServer = new EclipseSeleniumServer(aHelper, workbenchShell);
+		try {
+			SafeRunner.run( seleniumServer );
+			Thread.sleep(5000);
+//			new Exception("sdsfsdf").printStackTrace();
+		} catch ( Exception e ) {
+			e.printStackTrace();
+		}
 	}
 
 	/*
@@ -58,6 +76,7 @@
 	public void stop(BundleContext context) throws Exception {
 		plugin = null;
 		super.stop(context);
+		seleniumServer.stop();
 	}
 
 	/**

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp?rev=685791&r1=685790&r2=685791&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp Thu Aug 14 00:41:31 2008
@@ -26,7 +26,7 @@
   </head>
   <body>
     <form action="${pageContext.request.contextPath}/sayHello">
-      <input type="text" name="name" /><input type="submit" value="Press me!" />
+      <input type="text" name="name" /><input type="submit" name="submit" value="Press me!" />
     </form>
   </body>
 </html>