geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bjr...@apache.org
Subject svn commit: r736695 [1/2] - in /geronimo/devtools/eclipse-plugin/trunk: plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/co...
Date Thu, 22 Jan 2009 16:36:18 GMT
Author: bjreed
Date: Thu Jan 22 08:36:14 2009
New Revision: 736695

URL: http://svn.apache.org/viewvc?rev=736695&view=rev
Log:
GERONIMODEVTOOLS-541.  Overhaul to GEP GUI test suite.  Use extension points for new test cases.

Added:
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/schema/
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/schema/testCases.exsd
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java   (with props)
Removed:
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/NewServerTest.java
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ProjectTasks.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/Activator.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/EclipseUITest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/RunOnServerTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/SharedLibPojoTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/Tutorial5MinuteTest.java
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/test.xml

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java Thu Jan 22 08:36:14 2009
@@ -87,7 +87,7 @@
 
 	public String resolve(IServer server, IModule module) {
 		Map artifactEntries = (Map) serverEntries.get(server.getRuntime().getLocation().toFile());
-		if (artifactEntries != null) {
+		if (artifactEntries != null && module != null && module.getProject() != null) {
 			return (String) artifactEntries.get(module.getProject().getName());
 		}
 		return null;

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseBrowserLauncher.java Thu Jan 22 08:36:14 2009
@@ -36,22 +36,20 @@
     @Override
     protected void launch(String url) {
         try {
-            
-            AbbotHelper aHelper = EclipseSeleniumServer.INSTANCE.getAHelper();
-            Shell shell = EclipseSeleniumServer.INSTANCE.getShell();
+            AbbotHelper abbotHelper = EclipseSeleniumServer.INSTANCE.getAHelper();
+            Shell workbenchShell = EclipseSeleniumServer.INSTANCE.getShell();
 
-            aHelper.clickMenuItem (shell,
+            abbotHelper.clickMenuItem (workbenchShell,
                     new String[] {"&Window", "Web Browser", "&0 Internal Web Browser"});
-            Shell openShell = aHelper.clickMenuItem (shell,
+            Shell openShell = abbotHelper.clickMenuItem (workbenchShell,
                     new String[] {"&Window", "Show &View", "&Other..."}, "Show View");
-            aHelper.clickTreeItem (openShell, 
+            abbotHelper.clickTreeItem (openShell, 
                     new String[] {"General", "Internal Web Browser"});
-            aHelper.clickButton (openShell, IDialogConstants.OK_LABEL);
+            abbotHelper.clickButton (openShell, IDialogConstants.OK_LABEL);
             
-            aHelper.setCombo (shell, url);
-            aHelper.clickToolItem (shell, "Go to the selected URL");
-            aHelper.waitTime (15000);
-
+            abbotHelper.setCombo (workbenchShell, url);
+            abbotHelper.clickToolItem (workbenchShell, "Go to the selected URL");
+            abbotHelper.waitTime (AbbotHelper.WAIT_LONG);
         } catch ( Exception e ) {
             e.printStackTrace();
         }

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java Thu Jan 22 08:36:14 2009
@@ -55,9 +55,12 @@
  * @version $Rev: 679174 $ $Date: 2008-07-23 12:52:55 -0700 (Wed, 23 Jul 2008) $
  */
 public class AbbotHelper {
-    Shell workbenchShell;
-    WidgetFinder finder;
-
+    private Shell workbenchShell;
+    private WidgetFinder finder;
+    public static long WAIT_STANDARD = 1500;
+    public static long WAIT_MEDIUM = 5000;
+    public static long WAIT_LONG = 15000;
+    
     public AbbotHelper (Shell aShell) {
         finder = WidgetFinderImpl.getDefault();
         workbenchShell = aShell;
@@ -67,14 +70,14 @@
     public void clickButton (Shell aShell, String buttonText) throws MultipleFoundException, NotFoundException {
         Button button = (Button) finder.find (aShell, new WidgetTextMatcher (buttonText, Button.class, true));
         ButtonTester.getButtonTester().actionClick (button);        
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method
     public Shell clickButton (Shell aShell, String buttonText, String newDialogName) throws MultipleFoundException, NotFoundException {
         Button button = (Button) finder.find (aShell, new WidgetTextMatcher (buttonText, Button.class));
         ButtonTester.getButtonTester().actionClick (button);  
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
         return ShellTester.waitVisible (newDialogName);
     }
 
@@ -82,7 +85,7 @@
     public Shell clickEnabledButton (Shell aShell, String buttonText, String newDialogName) throws MultipleFoundException, NotFoundException {
         Button button = (Button) finder.find (aShell, new ButtonMultiMatcher (buttonText, Button.class, true));
         ButtonTester.getButtonTester().actionClick (button);  
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
         return ShellTester.waitVisible (newDialogName);
     }
 
@@ -90,21 +93,21 @@
     public void doubleClickItem (Shell aShell, String itemText) throws MultipleFoundException, NotFoundException {
         Item item = (Item) finder.find (aShell, new WidgetTextMatcher (itemText, Item.class, true));
         ItemTester.getItemTester().actionDoubleClick(item);       
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method
     public void clickItem (Shell aShell, String itemText) throws MultipleFoundException, NotFoundException {
         Item item = (Item) finder.find (aShell, new WidgetTextMatcher (itemText, Item.class, true));
         ItemTester.getItemTester().actionClick (item, 3, 3);       
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method
     public void clickCombo(Shell aShell, String itemText) throws MultipleFoundException, NotFoundException {
         Combo combo = (Combo) finder.find (aShell, new WidgetTextMatcher (itemText, Combo.class, true));
         ComboTester.getComboTester().actionClick (combo);      
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method    
@@ -112,7 +115,7 @@
         Item item = (Item) finder.find (workbenchShell, new WidgetTextMatcher (itemText, Item.class, true));
         ItemPath anItemPath = new ItemPath (menuList);
         ItemTester.getItemTester().actionClickMenuItem (item, anItemPath);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
         return ShellTester.waitVisible (newDialogName);
     }
 
@@ -121,7 +124,7 @@
         Item item = (Item) finder.find (workbenchShell, new WidgetTextMatcher (itemText, Item.class, true));
         ItemPath anItemPath = new ItemPath (menuList);
         ItemTester.getItemTester().actionClickMenuItem (item, anItemPath);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method    
@@ -129,7 +132,7 @@
         ItemPath anItemPath = new ItemPath (menuList);
         Menu bar = ShellTester.getShellTester().getMenuBar (aShell);
         MenuTester.getMenuTester().actionClickItem (bar, anItemPath);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
         return ShellTester.waitVisible (newDialogName);
     }
     
@@ -138,7 +141,7 @@
         ItemPath anItemPath = new ItemPath (menuList);
         Menu bar = ShellTester.getShellTester().getMenuBar (aShell);
         MenuTester.getMenuTester().actionClickItem (bar, anItemPath);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method
@@ -146,14 +149,14 @@
     public void clickToolItem (Shell aShell, String toolTipText) throws MultipleFoundException, NotFoundException {
         ToolItem toolItem = (ToolItem) finder.find (aShell, new WidgetToolTipMatcher (toolTipText, ToolItem.class, true));
         ToolItemTester.getToolItemTester().actionClick (toolItem);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
     
     //helper method to find the button by its tool tip text
     public Shell clickImageButton (Shell aShell, String toolTipText, String newDialogName) throws MultipleFoundException, NotFoundException {
         Button button = (Button) finder.find (aShell, new WidgetToolTipMatcher (toolTipText, Button.class, true));
         ButtonTester.getButtonTester().actionClick (button);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
         return ShellTester.waitVisible(newDialogName);
     }
 
@@ -162,7 +165,7 @@
         ItemPath anItemPath = new ItemPath (treeList);
         Tree tree = (Tree) finder.find (aShell, new WidgetClassMatcher (Tree.class));
         TreeTester.getTreeTester().actionClickItem (tree, anItemPath);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     //helper method to check a box present in a tree
@@ -170,7 +173,7 @@
         ItemPath anItemPath = new ItemPath (treeList);
         Tree tree = (Tree) finder.find (aShell, new WidgetClassMatcher (Tree.class));
         TreeTester.getTreeTester().actionCheckItem(tree, anItemPath, true);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method
@@ -178,7 +181,7 @@
         Combo combo = (Combo) finder.find (aShell, new WidgetClassMatcher (Combo.class, true));
         ComboTester.getComboTester().actionClick(combo);
         ComboTester.getComboTester().actionKeyString(newText);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
     
     //helper method when there are multiple text boxes
@@ -191,7 +194,7 @@
         } else {
             TextTester.getTextTester().actionKeyString (text, newText);  
         }
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
     
     //helper method to select a Tab 
@@ -199,7 +202,7 @@
     {
         TabItem tabitem=(TabItem) finder.find (aShell, new WidgetTabMatcher (newText, TabItem.class, true));
         TabItemTester.getTabItemTester().actionClick(tabitem);      
-        waitTime(1500);
+        waitTime (WAIT_STANDARD);
     }
     
     // helper method
@@ -212,29 +215,29 @@
         } else {
             TextTester.getTextTester().actionKeyString (text, newText);  
         }
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
 
     // helper method with a leap of faith that the cursor is
     // exactly where we want it to be.
     public void setCursorText (String newText) {
         TextTester.getTextTester().actionKeyString (newText);
-        waitTime( 1500 );
+        waitTime (WAIT_STANDARD);
     }
        
     // helper method
     public void waitForDialogDisposal (Shell aShell) {
         while (!ShellTester.getShellTester().isDisposed (aShell))
-            ShellTester.getShellTester().actionDelay (1000);
+            ShellTester.getShellTester().actionDelay (WAIT_STANDARD);
         // wait an extra 4 seconds
-        ShellTester.getShellTester().actionDelay (4000);
+        ShellTester.getShellTester().actionDelay (WAIT_MEDIUM);
     }
 
     // helper method
     public void waitForServerStatus (Shell aShell, String itemText, String desiredState) throws MultipleFoundException, NotFoundException {
         // will wait up to 2 minutes for status to change
         boolean statusGood = false;
-        int countdown = 120;
+        int countdown = 180;
 
         while (statusGood == false && countdown > 0) {
             TreeItem item = (TreeItem) finder.find (aShell, new WidgetTextMatcher (itemText, TreeItem.class));
@@ -242,7 +245,7 @@
                 statusGood = true;
             
             countdown--;
-            ShellTester.getShellTester().actionDelay (1000);
+            ShellTester.getShellTester().actionDelay (WAIT_STANDARD);
         }
         if (statusGood == false)
             throw new NotFoundException ("Unable to start or stop the server");

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ProjectTasks.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ProjectTasks.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ProjectTasks.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ProjectTasks.java Thu Jan 22 08:36:14 2009
@@ -34,15 +34,32 @@
 
 public class ProjectTasks {
     Shell workbenchShell;
-    AbbotHelper aHelper;
-    String serverVersion;
+    AbbotHelper abbotHelper;
 
-    public ProjectTasks (Shell shell, AbbotHelper helper, String serverVersion) {
+    public ProjectTasks (Shell shell, AbbotHelper helper) {
         workbenchShell = shell;
-        aHelper = helper;
-        this.serverVersion = serverVersion;
+        abbotHelper = helper;
     }
     
+    public boolean deleteProject (String projectName) {
+        boolean success = true;
+        try {
+            Shell questionShell = abbotHelper.rightClickItem (workbenchShell, projectName, 
+                    new String[] {"&Delete"}, "Delete Resources");
+
+            // use .* to signify use of a wildcard
+            abbotHelper.clickButton (questionShell, "&Delete project contents.*");
+            abbotHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
+            abbotHelper.waitForDialogDisposal (questionShell);
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+
+    //TODO all methods from here down are specific to Tutorial5MinuteTest v20 and v21 and should not be here
+    // would be nice to have some createXXXProjects that just do the basics
     public void createProjects() throws Exception {
         createEARProject ();
         createEJBProject ();
@@ -51,83 +68,83 @@
     }
 
     private void createEARProject() throws MultipleFoundException, NotFoundException {
-        Shell wizardShell = aHelper.clickMenuItem (workbenchShell,
+        Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
                 new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
                 "New");
 
-        aHelper.clickTreeItem (wizardShell,
+        abbotHelper.clickTreeItem (wizardShell,
                 new String[] {"Java EE", "Enterprise Application Project"});
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.setTextField(wizardShell, "", "SampleEAR");
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickButton (wizardShell, "Generate Deployment Descriptor");
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.setTextField(wizardShell, "default", "sampleear");
-        aHelper.setTextField(wizardShell, "", "sample-ear");
-        aHelper.setTextField(wizardShell, "car", "ear");
-        aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.setTextField(wizardShell, "", "SampleEAR");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.clickButton (wizardShell, "Generate Deployment Descriptor");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.setTextField(wizardShell, "default", "sampleear");
+        abbotHelper.setTextField(wizardShell, "", "sample-ear");
+        abbotHelper.setTextField(wizardShell, "car", "ear");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
 
-        aHelper.waitForDialogDisposal (wizardShell);
+        abbotHelper.waitForDialogDisposal (wizardShell);
     }
 
     private void createEJBProject() throws MultipleFoundException, NotFoundException {
-        Shell wizardShell = aHelper.clickMenuItem (workbenchShell,
+        Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
                 new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
                 "New");
 
-        aHelper.clickTreeItem (wizardShell,
+        abbotHelper.clickTreeItem (wizardShell,
                 new String[] {"EJB", "EJB Project"});
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.setTextField(wizardShell, "", "SampleEJB");
-        aHelper.clickButton (wizardShell, "Add &project to an EAR");
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickButton (wizardShell, "Create an EJB Client JAR module to hold the client interfaces and classes.");
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.setTextField(wizardShell, "default", "sampleear");
-        aHelper.setTextField(wizardShell, "", "sample-ejb");
-        aHelper.setTextField(wizardShell, "car", "ejb");
-        aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.setTextField(wizardShell, "", "SampleEJB");
+        abbotHelper.clickButton (wizardShell, "Add &project to an EAR");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.clickButton (wizardShell, "Create an EJB Client JAR module to hold the client interfaces and classes.");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.setTextField(wizardShell, "default", "sampleear");
+        abbotHelper.setTextField(wizardShell, "", "sample-ejb");
+        abbotHelper.setTextField(wizardShell, "car", "ejb");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
         
-        aHelper.waitForDialogDisposal (wizardShell);
+        abbotHelper.waitForDialogDisposal (wizardShell);
         
-        aHelper.doubleClickItem(workbenchShell, "SampleEJB");
-        aHelper.doubleClickItem(workbenchShell, "ejbModule");
-        aHelper.doubleClickItem(workbenchShell, "META-INF");
-        Shell questionShell = aHelper.rightClickItem(workbenchShell, "openejb-jar.xml",
+        abbotHelper.doubleClickItem(workbenchShell, "SampleEJB");
+        abbotHelper.doubleClickItem(workbenchShell, "ejbModule");
+        abbotHelper.doubleClickItem(workbenchShell, "META-INF");
+        Shell questionShell = abbotHelper.rightClickItem(workbenchShell, "openejb-jar.xml",
                 new String[] {"&Delete"}, "Delete Resources");
-        aHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
-        aHelper.waitForDialogDisposal (questionShell);
+        abbotHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
+        abbotHelper.waitForDialogDisposal (questionShell);
     }
 
     private void createWARProject() throws MultipleFoundException, NotFoundException {
-        Shell wizardShell = aHelper.clickMenuItem (workbenchShell,
+        Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
                 new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
                 "New");
 
-        aHelper.clickTreeItem (wizardShell,
+        abbotHelper.clickTreeItem (wizardShell,
                 new String[] {"Web", "Dynamic Web Project"});
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.setTextField(wizardShell, "", "SampleWAR");
-        aHelper.clickButton (wizardShell, "Add &project to an EAR");
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.setTextField(wizardShell, "default", "sampleear");
-        aHelper.setTextField(wizardShell, "", "sample-war");
-        aHelper.setTextField(wizardShell, "car", "war");
-        aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.setTextField(wizardShell, "", "SampleWAR");
+        abbotHelper.clickButton (wizardShell, "Add &project to an EAR");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.setTextField(wizardShell, "default", "sampleear");
+        abbotHelper.setTextField(wizardShell, "", "sample-war");
+        abbotHelper.setTextField(wizardShell, "car", "war");
+        abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
         
-        aHelper.waitForDialogDisposal (wizardShell);
+        abbotHelper.waitForDialogDisposal (wizardShell);
     }
     
     private void copyCode () throws Exception {
-        aHelper.clickItem (workbenchShell, "SampleWAR");
-        Shell propShell = aHelper.clickMenuItem (workbenchShell,
+        abbotHelper.clickItem (workbenchShell, "SampleWAR");
+        Shell propShell = abbotHelper.clickMenuItem (workbenchShell,
                 new String[] {"&Project", "&Properties"},
                 "Properties for SampleWAR");
-        aHelper.clickItem (propShell, "Java EE Module Dependencies");
-        aHelper.clickButton (propShell, "Select &All");
-        aHelper.clickButton (propShell, "&Apply");
-        aHelper.clickButton (propShell, IDialogConstants.OK_LABEL);
+        abbotHelper.clickItem (propShell, "Java EE Module Dependencies");
+        abbotHelper.clickButton (propShell, "Select &All");
+        abbotHelper.clickButton (propShell, "&Apply");
+        abbotHelper.clickButton (propShell, IDialogConstants.OK_LABEL);
 
         IWorkspaceRoot aWSRoot = ResourcesPlugin.getWorkspace().getRoot();
         IProject aProject = aWSRoot.getProject ("SampleEJB");
@@ -145,35 +162,25 @@
         aFile = aProject.getFile("WebContent/index.jsp");
         aFile.create(new FileInputStream (fileDir + "/index.jsp"), true, null);
         // have to go through Servlet Creation dialog to make the web.xml correct
-        Shell servletShell = aHelper.rightClickItem(workbenchShell, "SampleWAR",
+        Shell servletShell = abbotHelper.rightClickItem(workbenchShell, "SampleWAR",
                 new String [] {"&New", "Servlet"}, "Create Servlet");
-        aHelper.setCursorText("MyServlet");
-        aHelper.setTextField(servletShell, "", "sampleear");
-        aHelper.clickButton (servletShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickItem(servletShell, "/MyServlet");
-        Shell urlShell = aHelper.clickEnabledButton (servletShell, "Edit...", "URL Mappings");
-        aHelper.setTextField(urlShell, "/MyServlet", "/sayHello");
-        aHelper.clickButton (urlShell, IDialogConstants.OK_LABEL);
-        aHelper.clickButton (servletShell, IDialogConstants.FINISH_LABEL);
+        abbotHelper.setCursorText("MyServlet");
+        abbotHelper.setTextField(servletShell, "", "sampleear");
+        abbotHelper.clickButton (servletShell, IDialogConstants.NEXT_LABEL);
+        abbotHelper.clickItem(servletShell, "/MyServlet");
+        Shell urlShell = abbotHelper.clickEnabledButton (servletShell, "Edit...", "URL Mappings");
+        abbotHelper.setTextField(urlShell, "/MyServlet", "/sayHello");
+        abbotHelper.clickButton (urlShell, IDialogConstants.OK_LABEL);
+        abbotHelper.clickButton (servletShell, IDialogConstants.FINISH_LABEL);
 
         // copy over the correct contents
         aFile = aProject.getFile("src/sampleear/MyServlet.java");
         aFile.setContents(new FileInputStream (fileDir + "/MyServlet.java"), true, true, null);
 
         // close the open file
-        aHelper.clickMenuItem (workbenchShell,
+        abbotHelper.clickMenuItem (workbenchShell,
                 new String[] {"&File", "&Close"});
     }
-    
-    public void deleteProject (String projectName) throws MultipleFoundException, NotFoundException {
-        Shell questionShell = aHelper.rightClickItem (workbenchShell, projectName, 
-                new String[] {"&Delete"}, "Delete Resources");
-
-        // use .* to signify use of a wildcard
-        aHelper.clickButton (questionShell, "&Delete project contents.*");
-        aHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
-        aHelper.waitForDialogDisposal (questionShell);
-    }
 
     public void webTesting () throws Exception {
         EclipseSelenium selenium = new EclipseSelenium();
@@ -184,11 +191,6 @@
         selenium.waitForPageToLoad( "3000" );
         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 
-        // Abbot cannot find these
-        //aHelper.setTextField(workbenchShell, "", "MyName");
-        //aHelper.clickButton (workbenchShell, "Press me!");
         selenium.stop();
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java Thu Jan 22 08:36:14 2009
@@ -19,108 +19,189 @@
 
 import java.io.File;
 
+import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.widgets.Shell;
 
-import abbot.swt.finder.generic.MultipleFoundException;
-import abbot.swt.finder.generic.NotFoundException;
-
 public class ServerTasks {
     Shell workbenchShell;
-    AbbotHelper aHelper;
+    AbbotHelper abbotHelper;
     String serverVersion;
 
     public ServerTasks (Shell shell, AbbotHelper helper, String serverVersion) {
         workbenchShell = shell;
-        aHelper = helper;
+        abbotHelper = helper;
         this.serverVersion = serverVersion;
     }
     
     // just getting through this with no exceptions is success.
-    public void createServer() throws MultipleFoundException, NotFoundException {
-        // Launch the New Project wizard and aHelper.wait for it to open.
-        Shell wizardShell = aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
-                "New");
-
-        // Having 2 tree items with the same name is not very good design
-        aHelper.clickTreeItem (wizardShell, 
-                new String[] {"Server", "Server"});
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-
-        // Select the proper Server. why do we have this in there twice?
-        aHelper.clickItem (wizardShell, Constants.getConstant(serverVersion, Constants.SERVERNAME));
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-
-        //TODO would be nice to install the server instead of have to know where it is in advance
-        aHelper.setTextField (wizardShell, "", getServerInstallDirectory());
-
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
-        aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
-    }
-
-    public void editServer()throws MultipleFoundException, NotFoundException { 
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
-        aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
-         aHelper.doubleClickItem(workbenchShell, serverDisplay);
-    }
-
-    public void startServer () throws MultipleFoundException, NotFoundException {
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
-        aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
-        
-        aHelper.rightClickItem (workbenchShell, serverDisplay,
-                new String[] {"&Start"});
-        aHelper.waitForServerStatus (workbenchShell, serverDisplay, "Started");
-        
-        aHelper.waitTime( 1500 );
+    public boolean createServer(){
+        boolean success = true;
+        try {
+            // Launch the New Project wizard and aHelper.wait for it to open.
+            Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+                    "New");
+
+            // Having 2 tree items with the same name is not very good design
+            abbotHelper.clickTreeItem (wizardShell, 
+                    new String[] {"Server", "Server"});
+            abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+
+            // Select the proper Server. why do we have this in there twice?
+            abbotHelper.clickItem (wizardShell, Constants.getConstant(serverVersion, Constants.SERVERNAME));
+            abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+
+            // TODO would be nice to install the server instead of have to know where it is in advance
+            abbotHelper.setTextField (wizardShell, "", getServerInstallDirectory());
+
+            abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+
+    public boolean showServerOverview() { 
+        boolean success = true;
+        try {
+            String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Show &View", "Servers"});
+            abbotHelper.doubleClickItem(workbenchShell, serverDisplay);
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+
+    public boolean startServer () {
+        return startServer (false);
     }
     
-    public void stopServer () throws MultipleFoundException, NotFoundException {
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
-        aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
-
-        aHelper.rightClickItem (workbenchShell, serverDisplay,
-                new String[] {"S&top"});
-        aHelper.waitForServerStatus (workbenchShell, serverDisplay, "Stopped");
-        
-        aHelper.waitTime( 1500 );
+    public boolean startServer (boolean restart) {
+        boolean success = true;
+        try {
+            String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Show &View", "Servers"});
+        
+            if (restart == true) {
+                abbotHelper.rightClickItem (workbenchShell, serverDisplay,
+                        new String[] {"&Restart"});                
+            } else {
+                abbotHelper.rightClickItem (workbenchShell, serverDisplay,
+                        new String[] {"&Start"});
+            }
+            abbotHelper.waitForServerStatus (workbenchShell, serverDisplay, "Started");
+        
+            abbotHelper.waitTime (AbbotHelper.WAIT_STANDARD);
+
+            // if starting the server for the first time, do a quick sanity check
+            if (restart == false) {
+                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.stop();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+    
+    public boolean stopServer () {
+        boolean success = true;
+        try {
+            String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Show &View", "Servers"});
+
+            abbotHelper.rightClickItem (workbenchShell, serverDisplay,
+                    new String[] {"S&top"});
+            abbotHelper.waitForServerStatus (workbenchShell, serverDisplay, "Stopped");
+        
+            abbotHelper.waitTime (AbbotHelper.WAIT_STANDARD);
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
     }
 
     
     // remove the server so that the test will be reset back to its original state.
-    public void removeServer () throws MultipleFoundException, NotFoundException {
-        Shell preferenceShell = aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "&Preferences"},
-                "Preferences");
-
-        aHelper.clickTreeItem (preferenceShell,
-                new String[] {"Server", "Runtime Environments"});
-        aHelper.clickItem (preferenceShell, Constants.getConstant(serverVersion, Constants.SERVERRUNTIME));
-        Shell questionShell = aHelper.clickButton (preferenceShell, "&Remove", "Server");
-        
-        aHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
-        aHelper.clickButton (preferenceShell, IDialogConstants.OK_LABEL);
-    }
-
-    public void publishAllProjects () throws MultipleFoundException, NotFoundException {
-        String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
-        
-        aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "Show &View", "Servers"});
-        Shell deployShell = aHelper.rightClickItem (workbenchShell, serverDisplay,
-                 new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects");
-        aHelper.clickButton (deployShell, "Add A&ll >>");
-        
-        aHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
-        aHelper.waitForDialogDisposal (deployShell);
+    public boolean removeServer () {
+        boolean success = true;
+        try {
+            Shell preferenceShell = abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "&Preferences"},
+                    "Preferences");
+
+            abbotHelper.clickTreeItem (preferenceShell,
+                    new String[] {"Server", "Runtime Environments"});
+            abbotHelper.clickItem (preferenceShell, Constants.getConstant(serverVersion, Constants.SERVERRUNTIME));
+            Shell questionShell = abbotHelper.clickButton (preferenceShell, "&Remove", "Server");
+        
+            abbotHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
+            abbotHelper.clickButton (preferenceShell, IDialogConstants.OK_LABEL);
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+
+    public boolean publishAllProjects () {
+        boolean success = true;
+        try {
+            String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+        
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Show &View", "Servers"});
+            Shell deployShell = abbotHelper.rightClickItem (workbenchShell, serverDisplay,
+                    new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects");
+            abbotHelper.clickButton (deployShell, "Add A&ll >>");
+        
+            abbotHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
+            abbotHelper.waitForDialogDisposal (deployShell);
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+
+    public boolean removeAllProjects () {
+        boolean success = true;
+        try {
+            String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+        
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Show &View", "Servers"});
+            Shell deployShell = abbotHelper.rightClickItem (workbenchShell, serverDisplay,
+                    new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects");
+            abbotHelper.clickButton (deployShell, "<< Re&move All");
+        
+            abbotHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
+            abbotHelper.waitForDialogDisposal (deployShell);
+        } catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
     }
 
     private String getServerInstallDirectory() {

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java Thu Jan 22 08:36:14 2009
@@ -20,27 +20,69 @@
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.widgets.Shell;
 
-import abbot.swt.finder.generic.MultipleFoundException;
-import abbot.swt.finder.generic.NotFoundException;
-
 public class WorkbenchTasks {
     Shell workbenchShell;
-    AbbotHelper aHelper;
+    AbbotHelper abbotHelper;
 
     public WorkbenchTasks (Shell shell, AbbotHelper helper) {
         workbenchShell = shell;
-        aHelper = helper;
+        abbotHelper = helper;
     }
     
-    public void showJEEPerspective() throws MultipleFoundException, NotFoundException {
-
-        aHelper.clickMenuItem (workbenchShell,
-                new String[] {"&Window", "&Close Perspective"});
+    public boolean showJEEPerspective() {
+        boolean success = true;
+        try {
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "&Close Perspective"});
         
-        Shell perspectiveShell = aHelper.clickMenuItem (workbenchShell,
-              new String[] {"&Window", "&Open Perspective", "&Other..." },
-              "Open Perspective");
-        aHelper.clickItem (perspectiveShell, "Java EE (default)");
-        aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);        
+            Shell perspectiveShell = abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "&Open Perspective", "&Other..." },
+                    "Open Perspective");
+            abbotHelper.clickItem (perspectiveShell, "Java EE (default)");
+            abbotHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);    
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+    
+    public boolean checkValidInstallation (String version) {
+        boolean success = true;
+        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
+            Shell newShell = abbotHelper.clickMenuItem(workbenchShell, new String[]{"&Help","&About Eclipse Platform"},"About Eclipse Platform");
+            Shell nextShell = abbotHelper.clickImageButton(newShell, "Apache.org - Geronimo " + version + " Server Tools Core Plug-in","About Eclipse Platform Features");
+            Shell nextNextShell = abbotHelper.clickButton(nextShell, "&Plug-in Details", "Feature Plug-ins");
+            abbotHelper.clickButton(nextNextShell, IDialogConstants.OK_LABEL);
+            abbotHelper.clickButton(nextShell, IDialogConstants.OK_LABEL);
+            abbotHelper.clickButton(newShell, IDialogConstants.OK_LABEL);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
+    }
+    
+    public boolean openInternalBrowser () {
+        boolean success = true;
+        try {
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Web Browser", "&0 Internal Web Browser"});
+            Shell openShell = abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&Window", "Show &View", "&Other..."}, "Show View");
+            abbotHelper.clickTreeItem (openShell,
+                    new String[] {"General", "Internal Web Browser"});
+            abbotHelper.clickButton (openShell, IDialogConstants.OK_LABEL);
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+            success = false;
+        }
+        return success;
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java Thu Jan 22 08:36:14 2009
@@ -19,8 +19,6 @@
 
 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;
@@ -75,7 +73,6 @@
             workbenchTasks.showJEEPerspective();
             ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V20 );
             serverTasks.createServer();
-            serverTasks.startServer();
             success = true;
         }
         catch (Exception e) {
@@ -89,6 +86,7 @@
         success = false;
         try {
             ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V20 );
+            serverTasks.startServer();
             success = true;
         }
         catch (Exception e) {
@@ -158,7 +156,7 @@
     private void deleteProject() {
         success = false;
         try {
-            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, abbotHelper, Constants.SERVER_V20 );
+            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, abbotHelper);
             projectTasks.deleteProject ("DynamicWebProject");
             success = true;
         }

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java Thu Jan 22 08:36:14 2009
@@ -187,7 +187,7 @@
     {
         try {
             ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
-            serverTasks.editServer();
+            serverTasks.showServerOverview();
             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"});
@@ -238,7 +238,7 @@
     public void deleteProjects()
     {
         try {
-            ProjectTasks projectTasks = new ProjectTasks(aShell, aHelper, Constants.SERVER_V20 );
+            ProjectTasks projectTasks = new ProjectTasks(aShell, aHelper);
             // delete the projects that have been created
             // reverse alphabetical is a little smoother
             projectTasks.deleteProject ("HelloWorld");

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java Thu Jan 22 08:36:14 2009
@@ -58,7 +58,7 @@
             
             ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V20 );
             WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper);
-            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, aHelper, Constants.SERVER_V20 );
+            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, aHelper);
             
             // so we are sure that we are looking in the desired perspective
             workbenchTasks.showJEEPerspective();

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java Thu Jan 22 08:36:14 2009
@@ -19,8 +19,6 @@
 
 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;
@@ -75,7 +73,6 @@
             workbenchTasks.showJEEPerspective();
             ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V21 );
             serverTasks.createServer();
-            serverTasks.startServer();
             success = true;
         }
         catch (Exception e) {
@@ -89,6 +86,7 @@
         success = false;
         try {
             ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V21 );
+            serverTasks.startServer();
             success = true;
         }
         catch (Exception e) {
@@ -158,7 +156,7 @@
     private void deleteProject() {
         success = false;
         try {
-            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, abbotHelper, Constants.SERVER_V21 );
+            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, abbotHelper);
             projectTasks.deleteProject ("DynamicWebProject");
             success = true;
         }

Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java Thu Jan 22 08:36:14 2009
@@ -187,7 +187,7 @@
     {
         try {
             ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21 );
-            serverTasks.editServer();
+            serverTasks.showServerOverview();
             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"});
@@ -238,7 +238,7 @@
     public void deleteProjects()
     {
         try {
-            ProjectTasks projectTasks = new ProjectTasks(aShell, aHelper, Constants.SERVER_V21 );
+            ProjectTasks projectTasks = new ProjectTasks(aShell, aHelper);
             // delete the projects that have been created
             // reverse alphabetical is a little smoother
             projectTasks.deleteProject ("HelloWorld");

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java Thu Jan 22 08:36:14 2009
@@ -17,24 +17,17 @@
 
 package org.apache.geronimo.testsuite.v21.ui;
 
-import java.io.File;
-
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
 import org.apache.geronimo.testsuite.common.ui.Constants;
 import org.apache.geronimo.testsuite.common.ui.ProjectTasks;
 import org.apache.geronimo.testsuite.common.ui.ServerTasks;
 import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks;
-import org.eclipse.core.resources.IWorkspace;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.widgets.Shell;
 
 import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase;
 import abbot.swt.eclipse.utils.Preferences;
 import abbot.swt.eclipse.utils.WorkbenchUtilities;
 import abbot.swt.eclipse.utils.Preferences.Mode;
-import abbot.swt.finder.generic.MultipleFoundException;
-import abbot.swt.finder.generic.NotFoundException;
 
 /**
  * Tutorial5MinuteTest
@@ -65,7 +58,7 @@
             
             ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V21 );
             WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper);
-            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, aHelper, Constants.SERVER_V21 );
+            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, aHelper);
             
             // so we are sure that we are looking in the desired perspective
             workbenchTasks.showJEEPerspective();

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml Thu Jan 22 08:36:14 2009
@@ -48,4 +48,19 @@
         <import plugin="org.apache.geronimo.testsuite.common"/>
     </requires>
 
+    <extension-point id="testCases" name="org.apache.geronimo.testsuite.v22.testCases" schema="schema/testCases.exsd"/>
+
+    <extension point="org.apache.geronimo.testsuite.v22.testCases">
+    	<testCase class="org.apache.geronimo.testsuite.v22.ui.RunOnServerTest">
+    	</testCase>
+    </extension>
+    <extension point="org.apache.geronimo.testsuite.v22.testCases">
+    	<testCase class="org.apache.geronimo.testsuite.v22.ui.Tutorial5MinuteTest">
+    	</testCase>
+    </extension>
+    <extension point="org.apache.geronimo.testsuite.v22.testCases">
+    	<testCase class="org.apache.geronimo.testsuite.v22.ui.SharedLibPojoTest">
+    	</testCase>
+    </extension>
+
 </plugin>

Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/schema/testCases.exsd
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/schema/testCases.exsd?rev=736695&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/schema/testCases.exsd (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/schema/testCases.exsd Thu Jan 22 08:36:14 2009
@@ -0,0 +1,102 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.apache.geronimo.testsuite.v22" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.apache.geronimo.testsuite.v22" id="testCases" name="org.apache.geronimo.testsuite.v22.testCases"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <choice minOccurs="1" maxOccurs="unbounded">
+            <element ref="testCase"/>
+         </choice>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="testCase">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn="org.apache.geronimo.testsuite.v22.ui.AbstractTestCase:"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/Activator.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/Activator.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/Activator.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/Activator.java Thu Jan 22 08:36:14 2009
@@ -35,7 +35,7 @@
 public class Activator extends Plugin {
 
     // The plug-in ID
-    public static final String PLUGIN_ID = "org.apache.geronimo.st.v22.core";
+    public static final String PLUGIN_ID = "org.apache.geronimo.testsuite.v22";
 
     // The shared instance
     private static Activator plugin;

Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java?rev=736695&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java Thu Jan 22 08:36:14 2009
@@ -0,0 +1,62 @@
+/*
+ * 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.apache.geronimo.testsuite.v22.ui;
+
+import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
+import org.apache.geronimo.testsuite.common.ui.ProjectTasks;
+import org.apache.geronimo.testsuite.common.ui.ServerTasks;
+import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks;
+import org.eclipse.swt.widgets.Shell;
+
+/*
+ * This is the abstract base class of all the GUI test cases that use Abbot.
+ * Each test case must know how to build itself, run, and then clean up after itself.
+ *
+ * It is safe to assume the following
+ * 1) Geronimo validation has taken place
+ * 2) Eclipse is in the J2EE perspective
+ * 3) The server will be installed and started before any test case is run
+ * 4) The server will be stopped and uninstalled after all test cases have finished
+ *
+ * @version $Rev$ $Date$
+ */
+public abstract class AbstractTestCase {
+
+    protected Shell workbenchShell;
+    protected AbbotHelper abbotHelper;
+    protected ServerTasks serverTasks;
+    protected ProjectTasks projectTasks;
+    protected WorkbenchTasks workbenchTasks;
+    
+    public AbstractTestCase () {
+    }
+
+    public void setHelpers (Shell aShell, AbbotHelper aHelper, String serverVersion) {
+        workbenchShell = aShell;
+        abbotHelper = aHelper;
+
+        // instantiate the server and project tasks while we're in here
+        serverTasks = new ServerTasks (workbenchShell, abbotHelper, serverVersion);
+        projectTasks = new ProjectTasks(workbenchShell, abbotHelper);
+        workbenchTasks = new WorkbenchTasks(workbenchShell, abbotHelper);
+    }
+
+    // abstract methods return true if everything was successful 
+    abstract public boolean buildTestCase ();
+    abstract public boolean runTestCase ();
+    abstract public boolean cleanupTestCase ();
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/AbstractTestCase.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/EclipseUITest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/EclipseUITest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/EclipseUITest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/EclipseUITest.java Thu Jan 22 08:36:14 2009
@@ -17,7 +17,12 @@
 package org.apache.geronimo.testsuite.v22.ui;
 
 import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
-import org.eclipse.jface.dialogs.IDialogConstants;
+import org.apache.geronimo.testsuite.common.ui.Constants;
+import org.apache.geronimo.testsuite.common.ui.ServerTasks;
+import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.swt.widgets.Shell;
 
 import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase;
@@ -29,8 +34,10 @@
  * @version $Rev$ $Date$
  */
 public class EclipseUITest extends WorkbenchTestCase {
-    Shell aShell;
-    AbbotHelper aHelper;
+    Shell workbenchShell;
+    AbbotHelper abbotHelper;
+    ServerTasks serverTasks;
+    WorkbenchTasks workbenchTasks;
 
     protected void setUp() throws Exception {
         super.setUp();
@@ -43,26 +50,57 @@
 
     public void testEclipseUI()
     {
-        boolean success = false;
+        workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+        abbotHelper = new AbbotHelper(workbenchShell);
+        serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V22 );
+        workbenchTasks = new WorkbenchTasks(workbenchShell, abbotHelper);
+
+        System.out.println("initial validation and set up");
+        // run simple test case to make sure that Geronimo was intalled
+        // correctly and switch to the JEE Perspective
+        assertTrue (workbenchTasks.checkValidInstallation(Constants.SERVER_V22));
+        assertTrue (workbenchTasks.showJEEPerspective());
+
+        // install and start the server
+        assertTrue (installServer());
+
+        // get the list of extensions and run each test case
         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.org - Geronimo v22 Server Tools Core Plug-in","About Eclipse Platform Features");
-            Shell nextNextShell = aHelper.clickButton(nextShell, "&Plug-in Details", "Feature Plug-ins");
-            aHelper.clickButton(nextNextShell, IDialogConstants.OK_LABEL);
-            aHelper.clickButton(nextShell, IDialogConstants.OK_LABEL);
-            aHelper.clickButton(newShell, IDialogConstants.OK_LABEL);
+            IExtensionRegistry er = Platform.getExtensionRegistry();
+            IConfigurationElement[] ces = er.getConfigurationElementsFor("org.apache.geronimo.testsuite.v22.testCases");
+            for (int j = 0; j < ces.length; j++) {
+                Object o = ces[j].createExecutableExtension("class");
+                if (o instanceof AbstractTestCase) {
+                    System.out.println("running test case: " + ces[j].getAttribute("class"));
+                    AbstractTestCase gst = (AbstractTestCase)o;
+                    gst.setHelpers (workbenchShell, abbotHelper, Constants.SERVER_V22);
+                    assertTrue (gst.buildTestCase());
+                    assertTrue (gst.runTestCase());
+                    assertTrue (gst.cleanupTestCase());
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
 
-            success = true;
+        System.out.println("uninstall the server");
+        // stop and uninstall the server
+        assertTrue (uninstallServer());
+    }
+  
+    private boolean installServer() {
+        boolean success = serverTasks.createServer();
+        if (success == true) {
+            serverTasks.startServer (false);
         }
-        catch(Exception e)
-        {
-            e.printStackTrace();
+        return success;
+    }
+
+    private boolean uninstallServer() {
+        boolean success = serverTasks.stopServer();
+        if (success == true) {
+            success = serverTasks.removeServer();
         }
-        assertTrue (success);
+        return success;
     }
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/RunOnServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/RunOnServerTest.java?rev=736695&r1=736694&r2=736695&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/RunOnServerTest.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/RunOnServerTest.java Thu Jan 22 08:36:14 2009
@@ -19,13 +19,7 @@
 
 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;
-import org.apache.geronimo.testsuite.common.ui.ServerTasks;
-import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IWorkspaceRoot;
@@ -33,74 +27,20 @@
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.widgets.Shell;
 
-import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase;
-import abbot.swt.eclipse.utils.WorkbenchUtilities;
-
 /*
  * @version $Rev$ $Date$
  */
-public class RunOnServerTest extends WorkbenchTestCase {
-
-    Shell workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
-    AbbotHelper abbotHelper = new AbbotHelper(workbenchShell);
-    boolean success = false;
-
-
-    protected void setUp() throws Exception {
-        super.setUp();
-    }
-
-
-    protected void tearDown() throws Exception {
-        super.tearDown();
-        deleteProject();
-        deleteServer();
-    }
-
-
-    public void testRunOnServer() {
-        createServer();
-        startServer();
-        createProject();
-        copyCodeToProject();
-        deployProject();
-    }
-
+public class RunOnServerTest extends AbstractTestCase {
 
-    private void createServer() {
-        success = false;
-        try {
-            WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, abbotHelper);
-            // so we are sure that we are looking in the desired perspective
-            workbenchTasks.showJEEPerspective();
-            ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V22 );
-            serverTasks.createServer();
-            serverTasks.startServer();
-            success = true;
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
+    public RunOnServerTest() {
+        super ();
     }
 
-
-    private void startServer() {
-        success = false;
-        try {
-            ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V22 );
-            success = true;
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
-    }
-
-
-    private void createProject() {
-        success = false;
+    @Override
+    public boolean buildTestCase() {
+        boolean success = true;
         try {
+            // create the project
             Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
                                                            new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
                                                            "New");
@@ -110,77 +50,55 @@
             abbotHelper.setTextField(wizardShell,"", "DynamicWebProject");
             abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
             abbotHelper.waitForDialogDisposal(wizardShell);
-            success = true;
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
-    }
-
 
-    private void copyCodeToProject() {
-        success = false;
-        try {
+            // copy the code to the project
             IWorkspaceRoot aWSRoot = ResourcesPlugin.getWorkspace().getRoot();
             IProject aProject = aWSRoot.getProject ("DynamicWebProject");
             String fileDir = aWSRoot.getLocation().toOSString() + "/src/main/resources/run-on-server";
             IFile aFile = aProject.getFile("WebContent/index.jsp");
             aFile.create(new FileInputStream (fileDir + "/index.jsp"), true, null);
-            abbotHelper.waitTime( 1500 );
-            success = true;
+            abbotHelper.waitTime (AbbotHelper.WAIT_STANDARD);
         }
         catch (Exception e) {
             e.printStackTrace();
+            success = false;
         }
-        assertTrue( success );
+        return success;
     }
 
-
-    private void deployProject() {
-        success = false;
+    @Override
+    public boolean runTestCase() {
+        boolean success = true;
         try {
+            // deploy the project
             Shell deployShell = abbotHelper.rightClickItem(workbenchShell, "DynamicWebProject",
                                                            new String [] {"&Run As", "&1 Run on Server\tAlt+Shift+X, R"}, 
                                                            "Run On Server");
             abbotHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
-            abbotHelper.waitTime( 10000 );
-            abbotHelper.clickCombo( workbenchShell, "http://localhost:8080/DynamicWebProject/");
-            success = true;
+            // sometimes publish takes a while
+            abbotHelper.waitTime (AbbotHelper.WAIT_LONG + AbbotHelper.WAIT_LONG);
+            abbotHelper.clickCombo (workbenchShell, "http://localhost:8080/DynamicWebProject/");
         }
         catch (Exception e) {
             e.printStackTrace();
+            success = false;
         }
-        assertTrue( success );
+        return success;
     }
 
-
-    private void deleteProject() {
-        success = false;
+    @Override
+    public boolean cleanupTestCase() {
+        boolean success = true;
         try {
-            ProjectTasks projectTasks = new ProjectTasks(workbenchShell, abbotHelper, Constants.SERVER_V22 );
-            projectTasks.deleteProject ("DynamicWebProject");
-            success = true;
+            abbotHelper.clickMenuItem (workbenchShell,
+                    new String[] {"&File", "&Close"});
+            success = serverTasks.removeAllProjects();
+            if (success == true) {
+                success = projectTasks.deleteProject ("DynamicWebProject");
+            }
+        } catch (Exception e) {
+            success = false;
         }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
+        return success;
     }
-
-
-    private void deleteServer() {
-        success = false;
-        try {
-            ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V22 );
-            serverTasks.stopServer();
-            serverTasks.removeServer();
-            success = true;
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        assertTrue( success );
-    }
-
 }



Mime
View raw message