geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1041362 - in /geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins: org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/...
Date Thu, 02 Dec 2010 13:07:44 GMT
Author: hanhongfang
Date: Thu Dec  2 13:07:43 2010
New Revision: 1041362

URL: http://svn.apache.org/viewvc?rev=1041362&view=rev
Log:
GERONIMODEVTOOLS-679 TestSuite not working on branch 2.1.7: second commit for test cases upgrade.

Added:
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java   (with props)
Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java
    geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml

Added: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java?rev=1041362&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java Thu Dec  2 13:07:43 2010
@@ -0,0 +1,65 @@
+package org.apache.geronimo.testsuite.common;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.swt.widgets.Widget;
+
+import abbot.swt.finder.WidgetFinder;
+import abbot.swt.finder.WidgetFinderImpl;
+import abbot.swt.finder.WidgetHierarchy;
+import abbot.swt.finder.WidgetHierarchyImpl;
+import abbot.swt.finder.generic.Matcher;
+import abbot.swt.finder.generic.MultipleFoundException;
+import abbot.swt.finder.generic.NotFoundException;
+import abbot.swt.hierarchy.Visitable.Visitor;
+
+public class MultiWidgetFinderImpl extends WidgetFinderImpl {
+	private final WidgetHierarchy hierarchy;
+	private static MultiWidgetFinderImpl Default;
+	
+	public MultiWidgetFinderImpl(WidgetHierarchy hierarchy) {
+		super(hierarchy);
+		this.hierarchy = hierarchy;
+		// TODO Auto-generated constructor stub
+	}
+	
+	public static synchronized MultiWidgetFinderImpl getDefault() {
+		if (Default == null)
+			Default = new MultiWidgetFinderImpl(WidgetHierarchyImpl.getDefault());
+		return Default;
+	}
+	
+	public List<Widget> findMulti(final Matcher<Widget> matcher) throws NotFoundException,
+		MultipleFoundException {
+		
+		// Collect matches.
+		final List<Widget> found = new ArrayList<Widget>();
+		hierarchy.accept(new Visitor<Widget>() {
+			public Result visit(Widget candidate) {
+				if (matcher.matches(candidate))
+					found.add(candidate);
+				return Result.ok;
+			}
+		});
+		
+		return found;
+	}
+	
+	public List<Widget> findMulti(Widget widget, final Matcher<Widget> matcher) throws NotFoundException,
+		MultipleFoundException {
+		
+		// Collect matches.
+		final List<Widget> found = new ArrayList<Widget>();
+		hierarchy.accept(widget, new Visitor<Widget>() {
+			public Result visit(Widget candidate) {
+				if (matcher.matches(candidate))
+					found.add(candidate);
+				return Result.ok;
+			}
+		});
+		
+		return found;
+	}
+
+}

Propchange: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/MultiWidgetFinderImpl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java Thu Dec  2 13:07:43 2010
@@ -17,11 +17,8 @@
 
 package org.apache.geronimo.testsuite.common.selenium;
 
-import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
-import org.eclipse.swt.widgets.Shell;
 
 import com.thoughtworks.selenium.DefaultSelenium;
-import com.thoughtworks.selenium.Selenium;
 
 /**
  * EclipseSelenium
@@ -32,7 +29,7 @@ public class EclipseSelenium extends Def
 
 	private static String serverHost = "localhost";
 	private static int serverPort = 4444;
-	private static String browserStartCommand = "*EclipseBrowser";
+	private static String browserStartCommand = "*firefox";
 	private static String browserURL = "http://localhost:4444";
 	
 	public EclipseSelenium() {

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java Thu Dec  2 13:07:43 2010
@@ -17,16 +17,13 @@
 
 package org.apache.geronimo.testsuite.common.selenium;
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.PrintStream;
 
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.swt.widgets.Shell;
 import org.openqa.selenium.server.SeleniumServer;
 import org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory;
+import org.openqa.selenium.server.browserlaunchers.MockBrowserLauncher;
 
 /**
  * EclipseSeleniumServer
@@ -63,7 +60,7 @@ public class EclipseSeleniumServer imple
 	}
 
 	public void run() throws Exception {
-		BrowserLauncherFactory.addBrowserLauncher("EclipseBrowser", EclipseBrowserLauncher.class);
+		BrowserLauncherFactory.addBrowserLauncher("MockBrowser", MockBrowserLauncher.class);
 		SeleniumServer.setDebugMode( true );
 		server = new SeleniumServer();
 		server.start();

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java Thu Dec  2 13:07:43 2010
@@ -17,8 +17,10 @@
 
 package org.apache.geronimo.testsuite.common.ui;
 
+import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.geronimo.testsuite.common.MultiWidgetFinderImpl;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Item;
@@ -57,9 +59,11 @@ import abbot.swt.utilities.ExtendedCompa
 public class AbbotHelper {
     Shell workbenchShell;
     WidgetFinder finder;
+    MultiWidgetFinderImpl mulFinder;
 
     public AbbotHelper (Shell aShell) {
         finder = WidgetFinderImpl.getDefault();
+        mulFinder = MultiWidgetFinderImpl.getDefault();
         workbenchShell = aShell;
     }
     
@@ -184,6 +188,7 @@ public class AbbotHelper {
     //helper method when there are multiple text boxes
     public void setTextFieldForMulti (Shell aShell, String oldText, String newText) throws MultipleFoundException, NotFoundException {
         Text text = (Text) finder.find (aShell, new TextMultipleMatcher(oldText, Text.class, true));
+        
         if (oldText.length() > 0)
         {
             TextTester.getTextTester().actionSelect (text, 0, oldText.length());
@@ -194,6 +199,29 @@ public class AbbotHelper {
         waitTime( 1500 );
     }
     
+    // helper method to get MultiTextFields
+    public List<Text> getMultiTextFiled(Shell aShell, String text) throws MultipleFoundException, NotFoundException {
+    	List<Text> retList = new ArrayList<Text>();
+    	
+    	List<Widget> founds = this.mulFinder.findMulti(aShell, new TextMultipleMatcher(text, Text.class, true));
+    	for(int i=0; i<founds.size(); ++i) {
+    		retList.add((Text)founds.get(i));
+    	}
+    	return retList;
+    }
+    
+    // helper method to update TextField
+    public void updateTextField(Text text, String oldText, String newText) {
+    	if (oldText.length() > 0)
+        {
+            TextTester.getTextTester().actionSelect (text, 0, oldText.length());
+            TextTester.getTextTester().actionKeyString (newText);
+        } else {
+            TextTester.getTextTester().actionKeyString (text, newText);  
+        }
+        waitTime( 1500 );
+    }
+    
     //helper method to select a Tab 
     public void selectTabItem(Shell aShell, String newText)throws MultipleFoundException,NotFoundException
     {
@@ -238,7 +266,8 @@ public class AbbotHelper {
 
         while (statusGood == false && countdown > 0) {
             TreeItem item = (TreeItem) finder.find (aShell, new WidgetTextMatcher (itemText, TreeItem.class));
-            if (desiredState.equals (TreeItemTester.getTreeItemTester().getText (item, 1)))
+            String serverStatus = TreeItemTester.getTreeItemTester().getText (item, 0);
+            if (serverStatus.contains(desiredState))
                 statusGood = true;
             
             countdown--;

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java Thu Dec  2 13:07:43 2010
@@ -64,16 +64,16 @@ public class ServerTasks {
     }
 
     public void editServer()throws MultipleFoundException, NotFoundException { 
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+        String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
         aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
+                new String[] {"&Window", "Show View", "Servers"});
          aHelper.doubleClickItem(workbenchShell, serverDisplay);
     }
 
     public void startServer () throws MultipleFoundException, NotFoundException {
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+        String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
         aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
+                new String[] {"&Window", "Show View", "Servers"});
         
         aHelper.rightClickItem (workbenchShell, serverDisplay,
                 new String[] {"&Start"});
@@ -83,9 +83,9 @@ public class ServerTasks {
     }
     
     public void stopServer () throws MultipleFoundException, NotFoundException {
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+    	String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
         aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
+                new String[] {"&Window", "Show View", "Servers"});
 
         aHelper.rightClickItem (workbenchShell, serverDisplay,
                 new String[] {"S&top"});
@@ -111,12 +111,12 @@ public class ServerTasks {
     }
 
     public void publishAllProjects () throws MultipleFoundException, NotFoundException {
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+        String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
         
         aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
+                new String[] {"&Window", "Show View", "Servers"});
         Shell deployShell = aHelper.rightClickItem (workbenchShell, serverDisplay,
-                 new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects");
+                 new String[] {"&Add and Remove..."}, "Add and Remove...");
         aHelper.clickButton (deployShell, "Add A&ll >>");
         
         aHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java Thu Dec  2 13:07:43 2010
@@ -40,7 +40,7 @@ public class WorkbenchTasks {
     	Shell perspectiveShell = aHelper.clickMenuItem (workbenchShell,
               new String[] {"&Window", "&Open Perspective", "&Other..." },
               "Open Perspective");
-        aHelper.clickItem (perspectiveShell, "Java EE (default)");
+        aHelper.clickItem (perspectiveShell, "Java EE");
         aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);        
     }
 }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java Thu Dec  2 13:07:43 2010
@@ -45,6 +45,18 @@ public class EclipseUITest extends Workb
     {
         boolean success = false;
         try {
+            // About Eclipse Test Case. There are three Shell newShell, nextShell and nextNextShell 
+            //used because we need to save the states for newShell and nextShell
+            //newShell->nextShell->nextNextShell this is the order in which shell comes up
+            aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+            aHelper = new AbbotHelper(aShell);
+            Shell newShell = aHelper.clickMenuItem(aShell, new String[]{"&Help","&About Eclipse Platform"},"About Eclipse Platform");
+            Shell nextShell = aHelper.clickImageButton(newShell, "Apache Software Foundation","About Eclipse Platform Features");
+            Shell nextNextShell = aHelper.clickButton(nextShell, "&Plug-in Details", "Feature Plug-ins");
+            aHelper.clickButton(nextNextShell, IDialogConstants.CLOSE_LABEL);
+            aHelper.clickButton(nextShell, IDialogConstants.CLOSE_LABEL);
+            aHelper.clickButton(newShell, IDialogConstants.OK_LABEL);
+
             success = true;
         }
         catch(Exception e)

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java Thu Dec  2 13:07:43 2010
@@ -17,7 +17,6 @@
 
 package org.apache.geronimo.testsuite.v20.ui;
 
-import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ServerTasks;
@@ -65,20 +64,23 @@ public class NewServerTest extends Workb
 
             serverTasks.startServer();
             
-            EclipseSelenium selenium = new EclipseSelenium();
-        	selenium.start();
+//            EclipseSelenium selenium = new EclipseSelenium();
+//        	selenium.start();
             
-            selenium.open( "http://localhost:8080/console/" );
-            selenium.waitForPageToLoad( "2000" );
-            selenium.type("j_username", "system");
-            selenium.type("j_password", "manager");
-            selenium.click("submit");
             
+//            selenium.open( "http://localhost:8080/console/" );
+//            selenium.waitForPageToLoad( "2000" );
+//            selenium.type("j_username", "system");
+//            selenium.type("j_password", "manager");
+//            selenium.click("submit");
+//
             serverTasks.stopServer();
-
-            // remove the server 
+//
+//            // remove the server 
             serverTasks.removeServer();
-            selenium.stop();
+
+            //selenium.stop();
+            //ds.stop();
 
             success = true;
         }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java Thu Dec  2 13:07:43 2010
@@ -19,8 +19,6 @@ package org.apache.geronimo.testsuite.v2
 
 import java.io.FileInputStream;
 
-import org.apache.geronimo.testsuite.common.AssertUtil;
-import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ProjectTasks;
@@ -60,7 +58,6 @@ public class RunOnServerTest extends Wor
 
     public void testRunOnServer() {
         createServer();
-        startServer();
         createProject();
         copyCodeToProject();
         deployProject();
@@ -85,19 +82,6 @@ public class RunOnServerTest extends Wor
     }
 
 
-    private void startServer() {
-        success = false;
-        try {
-            ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V20 );
-            success = true;
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
-    }
-
-
     private void createProject() {
         success = false;
         try {
@@ -124,7 +108,7 @@ public class RunOnServerTest extends Wor
         try {
             IWorkspaceRoot aWSRoot = ResourcesPlugin.getWorkspace().getRoot();
             IProject aProject = aWSRoot.getProject ("DynamicWebProject");
-            String fileDir = aWSRoot.getLocation().toOSString() + "/src/main/resources/run-on-server";
+            String fileDir = aWSRoot.getLocation().toOSString() + "/src/main/resources/run-on-server";// when run in eclipse, you should change 
             IFile aFile = aProject.getFile("WebContent/index.jsp");
             aFile.create(new FileInputStream (fileDir + "/index.jsp"), true, null);
             abbotHelper.waitTime( 1500 );

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java Thu Dec  2 13:07:43 2010
@@ -19,8 +19,6 @@ package org.apache.geronimo.testsuite.v2
 
 import java.io.FileInputStream;
 
-import org.apache.geronimo.testsuite.common.AssertUtil;
-import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ProjectTasks;
@@ -34,12 +32,15 @@ import org.eclipse.swt.widgets.Shell;
 
 import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase;
 import abbot.swt.eclipse.utils.WorkbenchUtilities;
+import abbot.swt.finder.generic.MultipleFoundException;
+import abbot.swt.finder.generic.NotFoundException;
 
 /*
  * @version $Rev$ $Date$
  */
 public class SharedLibPojoTest extends WorkbenchTestCase {
 
+	ServerTasks serverTasks;
     Shell aShell;
     AbbotHelper aHelper;
     boolean success = false;
@@ -56,23 +57,38 @@ public class SharedLibPojoTest extends W
 
     public void testSharedLib()
     {
+    	createServer();
         createPojoProject();
         copyCodeToPojoProject();
         createHelloWorldProject();
         copyCodeToHelloWorldProject();
         modifyHelloWorldBuildPath();
-        deployHelloWorldProject();
+        startServer();
         addSharedLibSupport();
         displayApplication();    
     }
+    public void createServer() {
+    	aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+    	aHelper = new AbbotHelper (aShell);
 
+        serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
+        try {
+			serverTasks.createServer();
+		} catch (MultipleFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (NotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
     public void createPojoProject()
     {
         try {
-            aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
-            aHelper = new AbbotHelper(aShell);
-            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
-            serverTasks.createServer();
+//            aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+//            aHelper = new AbbotHelper(aShell);
+//            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
+//            serverTasks.createServer();
             aHelper.clickMenuItem (aShell,new String[] {"&Window", "&Close Perspective"});
             Shell perspectiveShell = aHelper.clickMenuItem (aShell,
                                                             new String[] {"&Window", "&Open Perspective", "&Other..."},
@@ -128,7 +144,7 @@ public class SharedLibPojoTest extends W
             Shell perspectiveShell = aHelper.clickMenuItem (aShell,
                                                             new String[] {"&Window", "&Open Perspective", "&Other..."},
                                                             "Open Perspective");
-            aHelper.clickItem (perspectiveShell, "Java EE (default)");
+            aHelper.clickItem (perspectiveShell, "Java EE");
             aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);  
             Shell wizardShell = aHelper.clickMenuItem (aShell,
                                                        new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
@@ -139,6 +155,9 @@ public class SharedLibPojoTest extends W
             aHelper.setTextField(wizardShell,"", "HelloWorld");
             aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
             aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+            aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+            aHelper.setTextField(wizardShell, "", "helloworld");
+            aHelper.setTextField(wizardShell, "car", "war");
             aHelper.clickButton(wizardShell, "Add a runtime dependency to Geronimo's shared library");
             aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
             aHelper.waitForDialogDisposal(wizardShell);
@@ -191,25 +210,16 @@ public class SharedLibPojoTest extends W
             aHelper.clickButton(aShell, "Enable in-place shared library support.");
             aHelper.clickMenuItem(aShell,new String[]{"&File","&Save"});
             aHelper.clickMenuItem(aShell, new String[]{"&File","C&lose All"});
-            serverTasks.startServer();
         }
         catch (Exception e) {
             e.printStackTrace();        
         }
     }
 
-    public void deployHelloWorldProject()
+    public void startServer()
     {
         try {
-            aHelper.clickMenuItem (aShell,
-                                   new String[] {"&Window", "&Close Perspective"});
-            Shell perspectiveShell = aHelper.clickMenuItem (aShell,
-                                                            new String[] {"&Window", "&Open Perspective", "&Other..."},
-                                                            "Open Perspective");
-            aHelper.clickItem (perspectiveShell, "Java EE (default)");
-            aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);  
-            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
-            serverTasks.publishAllProjects();   
+            serverTasks.startServer();// start server first!
         }
         catch (Exception e) {
             e.printStackTrace();
@@ -218,21 +228,20 @@ public class SharedLibPojoTest extends W
 
     public void displayApplication()
     {
+        success = false;
         try {
-            EclipseSelenium selenium = new EclipseSelenium();
-            selenium.start();
-            selenium.open("http://localhost:8080/HelloWorld/index.jsp");
-            selenium.waitForPageToLoad("60000");
-            AssertUtil.assertTrue(selenium.getHtmlSource().indexOf( "Hello World!!" ) > 0);
-            AssertUtil.assertTrue(selenium.getHtmlSource().indexOf( "100 USD = 3938.81 INR" ) > 0);
-            aHelper.waitTime(1500);
-            selenium.stop();
-            success=true;
+            Shell deployShell = aHelper.rightClickItem(aShell, "HelloWorld",
+                                                           new String [] {"&Run As", "&1 Run on Server\tAlt+Shift+X, R"}, 
+                                                           "Run On Server");
+            aHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
+            aHelper.waitTime( 10000 );
+            aHelper.clickCombo( aShell, "http://localhost:8080/HelloWorld/");
+            success = true;
         }
         catch (Exception e) {
             e.printStackTrace();
         }
-        assertTrue(success);
+        assertTrue( success );
     }
 
     public void deleteProjects()
@@ -254,7 +263,7 @@ public class SharedLibPojoTest extends W
     public void deleteServer()
     {
         try {
-            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
+            serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
             // stop the server 
             serverTasks.stopServer();
             // remove the server 

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml Thu Dec  2 13:07:43 2010
@@ -86,10 +86,10 @@
         </ant>
 
 
-        <!--
+         <!-- 
          #########################################################################
          ##                                                                     ##
-         ## Run on Server testcase                                              ##
+         ## Define new server testcase                                          ##
          ##                                                                     ##
          #########################################################################
          -->
@@ -97,14 +97,14 @@
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
-                      value="org.apache.geronimo.testsuite.v20.ui.RunOnServerTest"/>
+                      value="org.apache.geronimo.testsuite.v20.ui.NewServerTest"/>
         </ant>
 
 
         <!--
-         #########################################################################                                                                     ##
+         #########################################################################
          ##                                                                     ##
-         ## Shared Lib Pojo testcase                                            ##
+         ## Run on Server testcase                                              ##
          ##                                                                     ##
          #########################################################################
          -->
@@ -112,14 +112,14 @@
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
-             value="org.apache.geronimo.testsuite.v20.ui.SharedLibPojoTest"/>
+                      value="org.apache.geronimo.testsuite.v20.ui.RunOnServerTest"/>
         </ant>
-    
-    
-        <!-- 
-         #########################################################################
+
+
+        <!--
+         #########################################################################                                                                     ##
          ##                                                                     ##
-         ## Define new server testcase                                          ##
+         ## Shared Lib Pojo testcase                                            ##
          ##                                                                     ##
          #########################################################################
          -->
@@ -127,17 +127,17 @@
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
-                      value="org.apache.geronimo.testsuite.v20.ui.NewServerTest"/>
+             value="org.apache.geronimo.testsuite.v20.ui.SharedLibPojoTest"/>
         </ant>
-
-
-        <!-- 
+    
+    
+       <!-- 
          #########################################################################
          ##                                                                     ##
          ## 5 minute tutorial testcase                                          ##
          ##                                                                     ##
          #########################################################################
-         -->
+        
         <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
@@ -145,7 +145,7 @@
                       value="org.apache.geronimo.testsuite.v20.ui.Tutorial5MinuteTest"/>
         </ant>
 
-
+        -->
     </target>
 	
     <!-- This target holds code to cleanup the testing environment after -->

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java Thu Dec  2 13:07:43 2010
@@ -17,7 +17,6 @@
 
 package org.apache.geronimo.testsuite.v21.ui;
 
-import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ServerTasks;
@@ -65,21 +64,23 @@ public class NewServerTest extends Workb
 
             serverTasks.startServer();
 
-            EclipseSelenium selenium = new EclipseSelenium();
-        	selenium.start();
+//            EclipseSelenium selenium = new EclipseSelenium();
+//        	selenium.start();
             
-            selenium.open( "http://localhost:8080/console/" );
-            selenium.waitForPageToLoad( "2000" );
-            selenium.type("j_username", "system");
-            selenium.type("j_password", "manager");
-            selenium.click("submit");
-
+            
+//            selenium.open( "http://localhost:8080/console/" );
+//            selenium.waitForPageToLoad( "2000" );
+//            selenium.type("j_username", "system");
+//            selenium.type("j_password", "manager");
+//            selenium.click("submit");
+//
             serverTasks.stopServer();
-
-            // remove the server 
+//
+//            // remove the server 
             serverTasks.removeServer();
 
-            selenium.stop();
+            //selenium.stop();
+            //ds.stop();
 
             success = true;
         }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java Thu Dec  2 13:07:43 2010
@@ -19,8 +19,6 @@ package org.apache.geronimo.testsuite.v2
 
 import java.io.FileInputStream;
 
-import org.apache.geronimo.testsuite.common.AssertUtil;
-import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ProjectTasks;
@@ -60,7 +58,6 @@ public class RunOnServerTest extends Wor
 
     public void testRunOnServer() {
         createServer();
-        startServer();
         createProject();
         copyCodeToProject();
         deployProject();
@@ -84,20 +81,6 @@ public class RunOnServerTest extends Wor
         assertTrue( success );
     }
 
-
-    private void startServer() {
-        success = false;
-        try {
-            ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V21 );
-            success = true;
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
-    }
-
-
     private void createProject() {
         success = false;
         try {

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java Thu Dec  2 13:07:43 2010
@@ -19,8 +19,6 @@ package org.apache.geronimo.testsuite.v2
 
 import java.io.FileInputStream;
 
-import org.apache.geronimo.testsuite.common.AssertUtil;
-import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ProjectTasks;
@@ -34,12 +32,15 @@ import org.eclipse.swt.widgets.Shell;
 
 import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase;
 import abbot.swt.eclipse.utils.WorkbenchUtilities;
+import abbot.swt.finder.generic.MultipleFoundException;
+import abbot.swt.finder.generic.NotFoundException;
 
 /*
  * @version $Rev$ $Date$
  */
 public class SharedLibPojoTest extends WorkbenchTestCase {
 
+	ServerTasks serverTasks;
     Shell aShell;
     AbbotHelper aHelper;
     boolean success = false;
@@ -56,23 +57,42 @@ public class SharedLibPojoTest extends W
 
     public void testSharedLib()
     {
+    	createServer();
         createPojoProject();
         copyCodeToPojoProject();
         createHelloWorldProject();
         copyCodeToHelloWorldProject();
         modifyHelloWorldBuildPath();
-        deployHelloWorldProject();
+        startServer();
         addSharedLibSupport();
-        displayApplication();    
-    }
+       
+		displayApplication();
+ 
+    }
+    
+    public void createServer() {
+    	aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+    	aHelper = new AbbotHelper (aShell);
 
+        serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
+        try {
+			serverTasks.createServer();
+		} catch (MultipleFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		} catch (NotFoundException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+    }
+    
     public void createPojoProject()
     {
         try {
-            aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
-            aHelper = new AbbotHelper(aShell);
-            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
-            serverTasks.createServer();
+//            aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+//            aHelper = new AbbotHelper(aShell);
+//            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
+//            serverTasks.createServer();
             aHelper.clickMenuItem (aShell,new String[] {"&Window", "&Close Perspective"});
             Shell perspectiveShell = aHelper.clickMenuItem (aShell,
                                                             new String[] {"&Window", "&Open Perspective", "&Other..."},
@@ -128,7 +148,7 @@ public class SharedLibPojoTest extends W
             Shell perspectiveShell = aHelper.clickMenuItem (aShell,
                                                             new String[] {"&Window", "&Open Perspective", "&Other..."},
                                                             "Open Perspective");
-            aHelper.clickItem (perspectiveShell, "Java EE (default)");
+            aHelper.clickItem (perspectiveShell, "Java EE");
             aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);  
             Shell wizardShell = aHelper.clickMenuItem (aShell,
                                                        new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
@@ -139,6 +159,9 @@ public class SharedLibPojoTest extends W
             aHelper.setTextField(wizardShell,"", "HelloWorld");
             aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
             aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+            aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+            aHelper.setTextField(wizardShell, "", "helloworld");
+            aHelper.setTextField(wizardShell, "car", "war");
             aHelper.clickButton(wizardShell, "Add a runtime dependency to Geronimo's shared library");
             aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
             aHelper.waitForDialogDisposal(wizardShell);
@@ -153,7 +176,7 @@ public class SharedLibPojoTest extends W
         try {
             IWorkspaceRoot aWSRoot = ResourcesPlugin.getWorkspace().getRoot();
             IProject aProject = aWSRoot.getProject ("HelloWorld");
-            String fileDir =aWSRoot.getLocation().toOSString()+"/src/main/resources/sharedlib";
+            String fileDir =aWSRoot.getLocation().toOSString()+"/src/main/resources/sharedlib";// when run in eclipse, you should change 
             IFile aFile = aProject.getFile("WebContent/index.jsp");
             aFile.create(new FileInputStream (fileDir + "/index.jsp"), true, null);
             aHelper.waitTime(1500);
@@ -191,25 +214,16 @@ public class SharedLibPojoTest extends W
             aHelper.clickButton(aShell, "Enable in-place shared library support.");
             aHelper.clickMenuItem(aShell,new String[]{"&File","&Save"});
             aHelper.clickMenuItem(aShell, new String[]{"&File","C&lose All"});
-            serverTasks.startServer();
         }
         catch (Exception e) {
             e.printStackTrace();        
         }
     }
 
-    public void deployHelloWorldProject()
+    public void startServer()
     {
         try {
-            aHelper.clickMenuItem (aShell,
-                                   new String[] {"&Window", "&Close Perspective"});
-            Shell perspectiveShell = aHelper.clickMenuItem (aShell,
-                                                            new String[] {"&Window", "&Open Perspective", "&Other..."},
-                                                            "Open Perspective");
-            aHelper.clickItem (perspectiveShell, "Java EE (default)");
-            aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);  
-            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
-            serverTasks.publishAllProjects();   
+            serverTasks.startServer();// start server first!
         }
         catch (Exception e) {
             e.printStackTrace();
@@ -218,21 +232,20 @@ public class SharedLibPojoTest extends W
 
     public void displayApplication()
     {
+        success = false;
         try {
-            EclipseSelenium selenium = new EclipseSelenium();
-            selenium.start();
-            selenium.open("http://localhost:8080/HelloWorld/index.jsp");
-            selenium.waitForPageToLoad("60000");
-            AssertUtil.assertTrue(selenium.getHtmlSource().indexOf( "Hello World!!" ) > 0);
-            AssertUtil.assertTrue(selenium.getHtmlSource().indexOf( "100 USD = 3938.81 INR" ) > 0);
-            aHelper.waitTime(1500);
-            selenium.stop();
-            success=true;
+            Shell deployShell = aHelper.rightClickItem(aShell, "HelloWorld",
+                                                           new String [] {"&Run As", "&1 Run on Server\tAlt+Shift+X, R"}, 
+                                                           "Run On Server");
+            aHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
+            aHelper.waitTime( 10000 );
+            aHelper.clickCombo( aShell, "http://localhost:8080/HelloWorld/");
+            success = true;
         }
         catch (Exception e) {
             e.printStackTrace();
         }
-        assertTrue(success);
+        assertTrue( success );
     }
 
     public void deleteProjects()
@@ -254,7 +267,7 @@ public class SharedLibPojoTest extends W
     public void deleteServer()
     {
         try {
-            ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
+            serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
             // stop the server 
             serverTasks.stopServer();
             // remove the server 

Modified: geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml?rev=1041362&r1=1041361&r2=1041362&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml Thu Dec  2 13:07:43 2010
@@ -84,12 +84,11 @@
             <property name="classname"
                       value="org.apache.geronimo.testsuite.v21.ui.EclipseUITest"/>
         </ant>
-        
-        
-        <!--
+
+        <!-- 
          #########################################################################
          ##                                                                     ##
-         ## Run on Server testcase                                              ##
+         ## Define new server testcase                                          ##
          ##                                                                     ##
          #########################################################################
          -->
@@ -97,14 +96,14 @@
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
-                      value="org.apache.geronimo.testsuite.v21.ui.RunOnServerTest"/>
-        </ant>
-
+                      value="org.apache.geronimo.testsuite.v21.ui.NewServerTest"/>
+        </ant>    
 
+        
         <!--
-         #########################################################################                                                                     ##
+         #########################################################################
          ##                                                                     ##
-         ## Shared Lib Pojo testcase                                            ##
+         ## Run on Server testcase                                              ##
          ##                                                                     ##
          #########################################################################
          -->
@@ -112,14 +111,14 @@
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
-             value="org.apache.geronimo.testsuite.v21.ui.SharedLibPojoTest"/>
+                      value="org.apache.geronimo.testsuite.v21.ui.RunOnServerTest"/>
         </ant>
-    
-    
-        <!-- 
-         #########################################################################
+
+
+        <!--
+         #########################################################################                                                                     ##
          ##                                                                     ##
-         ## Define new server testcase                                          ##
+         ## Shared Lib Pojo testcase                                            ##
          ##                                                                     ##
          #########################################################################
          -->
@@ -127,7 +126,7 @@
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
-                      value="org.apache.geronimo.testsuite.v21.ui.NewServerTest"/>
+             value="org.apache.geronimo.testsuite.v21.ui.SharedLibPojoTest"/>
         </ant>
 
 
@@ -138,14 +137,14 @@
          ##                                                                     ##
          #########################################################################
          -->
+        <!--       
         <ant target="ui-test" antfile="${library-file}" dir="${eclipse-home}">
             <property name="data-dir" value="${jdt-folder}"/>
             <property name="plugin-name" value="${plugin-name}"/>
             <property name="classname"
                       value="org.apache.geronimo.testsuite.v21.ui.Tutorial5MinuteTest"/>
         </ant>
-
-
+        -->        
     </target>
 
     <!-- This target holds code to cleanup the testing environment after -->



Mime
View raw message