You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ha...@apache.org on 2010/12/23 03:58:28 UTC
svn commit: r1052158 - in
/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite: ./ launcher/
plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/
plugins/org.apache.geronimo.testsuite.common/src/...
Author: hanhongfang
Date: Thu Dec 23 02:58:27 2010
New Revision: 1052158
URL: http://svn.apache.org/viewvc?rev=1052158&view=rev
Log:
GERONIMODEVTOOLS-685 Can not build GEP2.2.1 testsuit successfully
Modified:
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/launcher/testsuite.xml
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/SharedLibPojoTest.java
geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/pom.xml
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/launcher/testsuite.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/launcher/testsuite.xml?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/launcher/testsuite.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/launcher/testsuite.xml Thu Dec 23 02:58:27 2010
@@ -65,11 +65,9 @@
</target>
<target name="all">
- <!--
<antcall target="testsuite.v22" />
<antcall target="testsuite.v21" />
<antcall target="testsuite.v20" />
- -->
</target>
</project>
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSelenium.java Thu Dec 23 02:58:27 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.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/selenium/EclipseSeleniumServer.java Thu Dec 23 02:58:27 2010
@@ -27,6 +27,7 @@ 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,17 +64,10 @@ public class EclipseSeleniumServer imple
}
public void run() throws Exception {
- try {
- BrowserLauncherFactory.addBrowserLauncher("EclipseBrowser", EclipseBrowserLauncher.class);
- SeleniumServer.setDebugMode (true);
- server = new SeleniumServer();
- server.start();
- } catch (Throwable th) {
- th.printStackTrace();
- Exception e = new Exception("unable to start Selenium server");
- e.initCause(th);
- throw (e);
- }
+ BrowserLauncherFactory.addBrowserLauncher("MockBrowser", MockBrowserLauncher.class);
+ SeleniumServer.setDebugMode( true );
+ server = new SeleniumServer();
+ server.start();
}
}
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/AbbotHelper.java Thu Dec 23 02:58:27 2010
@@ -241,7 +241,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.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/ServerTasks.java Thu Dec 23 02:58:27 2010
@@ -69,9 +69,9 @@ public class ServerTasks {
public boolean showServerOverview() {
boolean success = true;
try {
- String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+ String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
abbotHelper.clickMenuItem (workbenchShell,
- new String[] {"&Window", "Show &View", "Servers"});
+ new String[] {"&Window", "Show View", "Servers"});
abbotHelper.doubleClickItem(workbenchShell, serverDisplay);
} catch (Exception e) {
e.printStackTrace();
@@ -87,9 +87,9 @@ public class ServerTasks {
public boolean startServer (boolean restart) {
boolean success = true;
try {
- String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+ String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
abbotHelper.clickMenuItem (workbenchShell,
- new String[] {"&Window", "Show &View", "Servers"});
+ new String[] {"&Window", "Show View", "Servers"});
if (restart == true) {
abbotHelper.rightClickItem (workbenchShell, serverDisplay,
@@ -102,19 +102,6 @@ public class ServerTasks {
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;
@@ -125,9 +112,9 @@ public class ServerTasks {
public boolean stopServer () {
boolean success = true;
try {
- String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+ String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
abbotHelper.clickMenuItem (workbenchShell,
- new String[] {"&Window", "Show &View", "Servers"});
+ new String[] {"&Window", "Show View", "Servers"});
abbotHelper.rightClickItem (workbenchShell, serverDisplay,
new String[] {"S&top"});
@@ -167,12 +154,12 @@ public class ServerTasks {
public boolean publishAllProjects () {
boolean success = true;
try {
- String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+ String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
abbotHelper.clickMenuItem (workbenchShell,
- new String[] {"&Window", "Show &View", "Servers"});
+ new String[] {"&Window", "Show View", "Servers"});
Shell deployShell = abbotHelper.rightClickItem (workbenchShell, serverDisplay,
- new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects");
+ new String[] {"&Add and Remove..."}, "Add and Remove...");
abbotHelper.clickButton (deployShell, "Add A&ll >>");
abbotHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
@@ -187,12 +174,12 @@ public class ServerTasks {
public boolean removeAllProjects () {
boolean success = true;
try {
- String serverDisplay = Constants.getConstant(serverVersion, Constants.SERVERDISPLAY);
+ String serverDisplay = "/" + Constants.getConstant(serverVersion, Constants.SERVERDISPLAY) + ".*/";
abbotHelper.clickMenuItem (workbenchShell,
- new String[] {"&Window", "Show &View", "Servers"});
+ new String[] {"&Window", "Show View", "Servers"});
Shell deployShell = abbotHelper.rightClickItem (workbenchShell, serverDisplay,
- new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects");
+ new String[] {"&Add and Remove..."}, "Add and Remove...");
abbotHelper.clickButton (deployShell, "<< Re&move All");
abbotHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.common/src/main/java/org/apache/geronimo/testsuite/common/ui/WorkbenchTasks.java Thu Dec 23 02:58:27 2010
@@ -38,7 +38,7 @@ public class WorkbenchTasks {
Shell perspectiveShell = abbotHelper.clickMenuItem (workbenchShell,
new String[] {"&Window", "&Open Perspective", "&Other..." },
"Open Perspective");
- abbotHelper.clickItem (perspectiveShell, "Java EE (default)");
+ abbotHelper.clickItem (perspectiveShell, "Java EE");
abbotHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);
}
catch (Exception e) {
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/EclipseUITest.java Thu Dec 23 02:58:27 2010
@@ -45,6 +45,17 @@ 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.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java Thu Dec 23 02:58:27 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,20 @@ public class NewServerTest extends Workb
serverTasks.startServer();
- 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");
+// 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");
serverTasks.stopServer();
// remove the server
serverTasks.removeServer();
- selenium.stop();
+// selenium.stop();
success = true;
}
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/RunOnServerTest.java Thu Dec 23 02:58:27 2010
@@ -58,7 +58,6 @@ public class RunOnServerTest extends Wor
public void testRunOnServer() {
createServer();
- startServer();
createProject();
copyCodeToProject();
deployProject();
@@ -73,19 +72,6 @@ public class RunOnServerTest extends Wor
workbenchTasks.showJEEPerspective();
ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V20 );
serverTasks.createServer();
- success = true;
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- assertTrue( success );
- }
-
-
- private void startServer() {
- success = false;
- try {
- ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V20 );
serverTasks.startServer();
success = true;
}
@@ -95,7 +81,6 @@ public class RunOnServerTest extends Wor
assertTrue( success );
}
-
private void createProject() {
success = false;
try {
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/SharedLibPojoTest.java Thu Dec 23 02:58:27 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,27 @@ public class SharedLibPojoTest extends W
public void testSharedLib()
{
- createPojoProject();
+ createServer();
+ createPojoProject();
copyCodeToPojoProject();
createHelloWorldProject();
copyCodeToHelloWorldProject();
modifyHelloWorldBuildPath();
- deployHelloWorldProject();
addSharedLibSupport();
+ startServer();
displayApplication();
}
+
+ public void createServer() {
+ aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+ aHelper = new AbbotHelper(aShell);
+ serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20);
+ serverTasks.createServer();
+ }
public void createPojoProject()
{
try {
- aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
- aHelper = new AbbotHelper(aShell);
- ServerTasks serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V20 );
- serverTasks.createServer();
aHelper.clickMenuItem (aShell,new String[] {"&Window", "&Close Perspective"});
Shell perspectiveShell = aHelper.clickMenuItem (aShell,
new String[] {"&Window", "&Open Perspective", "&Other..."},
@@ -128,7 +133,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 +144,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 +199,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();
}
catch (Exception e) {
e.printStackTrace();
@@ -218,15 +217,15 @@ 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();
+ 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) {
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml Thu Dec 23 02:58:27 2010
@@ -138,13 +138,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.v20.ui.Tutorial5MinuteTest"/>
</ant>
-
+ -->
</target>
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/EclipseUITest.java Thu Dec 23 02:58:27 2010
@@ -45,6 +45,17 @@ 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.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java Thu Dec 23 02:58:27 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,19 @@ public class NewServerTest extends Workb
serverTasks.startServer();
- 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");
+// 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");
serverTasks.stopServer();
-
- // remove the server
serverTasks.removeServer();
- selenium.stop();
+// selenium.stop();
success = true;
}
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/RunOnServerTest.java Thu Dec 23 02:58:27 2010
@@ -58,7 +58,6 @@ public class RunOnServerTest extends Wor
public void testRunOnServer() {
createServer();
- startServer();
createProject();
copyCodeToProject();
deployProject();
@@ -73,19 +72,6 @@ public class RunOnServerTest extends Wor
workbenchTasks.showJEEPerspective();
ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V21 );
serverTasks.createServer();
- success = true;
- }
- catch (Exception e) {
- e.printStackTrace();
- }
- assertTrue( success );
- }
-
-
- private void startServer() {
- success = false;
- try {
- ServerTasks serverTasks = new ServerTasks(workbenchShell, abbotHelper, Constants.SERVER_V21 );
serverTasks.startServer();
success = true;
}
@@ -95,7 +81,6 @@ public class RunOnServerTest extends Wor
assertTrue( success );
}
-
private void createProject() {
success = false;
try {
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/SharedLibPojoTest.java Thu Dec 23 02:58:27 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,34 @@ public class SharedLibPojoTest extends W
public void testSharedLib()
{
+ createServer();
createPojoProject();
copyCodeToPojoProject();
createHelloWorldProject();
copyCodeToHelloWorldProject();
modifyHelloWorldBuildPath();
- deployHelloWorldProject();
addSharedLibSupport();
- displayApplication();
- }
-
+ startServer();
+
+ displayApplication();
+
+ }
+
+ public void createServer() {
+ aShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+ aHelper = new AbbotHelper(aShell);
+
+ serverTasks = new ServerTasks(aShell, aHelper, Constants.SERVER_V21);
+ serverTasks.createServer();
+ }
+
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 +140,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 +151,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 +206,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,16 +224,15 @@ 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();
@@ -254,7 +259,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.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v21/test.xml Thu Dec 23 02:58:27 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,9 +126,9 @@
<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 -->
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/plugin.xml Thu Dec 23 02:58:27 2010
@@ -54,10 +54,12 @@
<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>
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/SharedLibPojoTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/SharedLibPojoTest.java?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/SharedLibPojoTest.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/plugins/org.apache.geronimo.testsuite.v22/src/main/java/org/apache/geronimo/testsuite/v22/ui/SharedLibPojoTest.java Thu Dec 23 02:58:27 2010
@@ -146,7 +146,7 @@ public class SharedLibPojoTest extends A
Shell perspectiveShell = abbotHelper.clickMenuItem (workbenchShell,
new String[] {"&Window", "&Open Perspective", "&Other..."},
"Open Perspective");
- abbotHelper.clickItem (perspectiveShell, "Java EE (default)");
+ abbotHelper.clickItem (perspectiveShell, "Java EE");
abbotHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);
Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
@@ -157,6 +157,9 @@ public class SharedLibPojoTest extends A
abbotHelper.setTextField(wizardShell,"", "HelloWorld");
abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.setTextField(wizardShell, "", "helloworld");
+ abbotHelper.setTextField(wizardShell, "car", "war");
abbotHelper.clickButton(wizardShell, "Add a runtime dependency to Geronimo's shared library");
abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
abbotHelper.waitForDialogDisposal(wizardShell);
@@ -237,23 +240,19 @@ public class SharedLibPojoTest extends A
}
public boolean displayApplication() {
- boolean success = true;
+
+ boolean success = false;
try {
- EclipseSelenium selenium = new EclipseSelenium();
- selenium.start();
- selenium.open ("http://localhost:8080/HelloWorld/index.jsp");
- selenium.waitForPageToLoad ("60000");
- success = (selenium.getHtmlSource().indexOf ("Hello World!!") > 0);
- if (success == true) {
- success = (selenium.getHtmlSource().indexOf ("100 USD = 3938.81 INR") > 0);
- }
- abbotHelper.waitTime (AbbotHelper.WAIT_STANDARD);
- selenium.stop();
- }
- catch (Exception e) {
- e.printStackTrace();
- success = false;
+ Shell deployShell = abbotHelper.rightClickItem(workbenchShell, "HelloWorld",
+ new String [] {"&Run As", "&1 Run on Server\tAlt+Shift+X, R"},
+ "Run On Server");
+ abbotHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL);
+ abbotHelper.waitTime( 10000 );
+ success = true;
+ } catch (Exception e) {
+ e.printStackTrace();
}
+
return success;
}
}
Modified: geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/pom.xml?rev=1052158&r1=1052157&r2=1052158&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/testsuite/pom.xml Thu Dec 23 02:58:27 2010
@@ -172,6 +172,26 @@
<groupId>juddi</groupId>
<artifactId>juddi</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-jaxws</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-kernel</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-metadata</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-saaj</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>jasper-el</artifactId>
+ </exclusion>
</exclusions>
</dependency>