You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by mc...@apache.org on 2010/04/20 07:15:58 UTC
svn commit: r935803 [3/3] - in /geronimo/devtools/eclipse-plugin/trunk: ./
assembly/ assembly/src/main/assembly/ eclipse/ features/
features/org.apache.geronimo.v30.feature/ plugins/
plugins/org.apache.geronimo.j2ee.v11.jaxbmodel/ plugins/org.apache.ge...
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/RunOnServerTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/RunOnServerTest.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/RunOnServerTest.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/RunOnServerTest.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,104 @@
+/*
+ * 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.v30.ui;
+
+import java.io.FileInputStream;
+
+import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.Shell;
+
+/*
+ * @version $Rev$ $Date$
+ */
+public class RunOnServerTest extends AbstractTestCase {
+
+ public RunOnServerTest() {
+ super ();
+ }
+
+ @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");
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"Web", "Dynamic Web Project"});
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.setTextField(wizardShell,"", "DynamicWebProject");
+ abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+ abbotHelper.waitForDialogDisposal(wizardShell);
+
+ // 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 (AbbotHelper.WAIT_STANDARD);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ @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);
+ // 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;
+ }
+ return success;
+ }
+
+ @Override
+ public boolean cleanupTestCase() {
+ boolean success = true;
+ try {
+ abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&Close"});
+ success = serverTasks.removeAllProjects();
+ if (success == true) {
+ success = projectTasks.deleteProject ("DynamicWebProject");
+ }
+ } catch (Exception e) {
+ success = false;
+ }
+ return success;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/RunOnServerTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/SharedLibPojoTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/SharedLibPojoTest.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/SharedLibPojoTest.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/SharedLibPojoTest.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,259 @@
+/*
+ * 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.v30.ui;
+
+import java.io.FileInputStream;
+
+import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
+import org.apache.geronimo.testsuite.common.ui.AbbotHelper;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.Shell;
+
+import abbot.swt.eclipse.utils.WorkbenchUtilities;
+
+/*
+ * @version $Rev$ $Date$
+ */
+public class SharedLibPojoTest extends AbstractTestCase {
+
+ @Override
+ public boolean buildTestCase() {
+ boolean success = createPojoProject();
+ if (success == true) {
+ success = copyCodeToPojoProject();
+ }
+ if (success == true) {
+ success = createHelloWorldProject();
+ }
+ if (success == true) {
+ success = copyCodeToHelloWorldProject();
+ }
+ if (success == true) {
+ success = modifyHelloWorldBuildPath();
+ }
+ return success;
+ }
+
+ @Override
+ public boolean runTestCase() {
+ boolean success = deployHelloWorldProject();
+ if (success == true) {
+ success = toggleSharedLibSupport();
+ }
+ if (success == true) {
+ success = displayApplication();
+ }
+ return success;
+ }
+
+ @Override
+ public boolean cleanupTestCase() {
+ boolean success = serverTasks.removeAllProjects();
+ if (success == true) {
+ success = projectTasks.deleteProject ("HelloWorld");
+ }
+ if (success == true) {
+ success = projectTasks.deleteProject ("CurrencyConverterPojo");
+ }
+ if (success == true) {
+ success = toggleSharedLibSupport();
+ }
+
+ return success;
+ }
+
+ public boolean createPojoProject() {
+ boolean success = true;
+ try {
+ workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell();
+ abbotHelper = new AbbotHelper(workbenchShell);
+
+ abbotHelper.clickMenuItem (workbenchShell,new String[] {"&Window", "&Close Perspective"});
+ Shell perspectiveShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&Window", "&Open Perspective", "&Other..."},
+ "Open Perspective");
+ abbotHelper.clickItem (perspectiveShell, "Java");
+ abbotHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL);
+
+ Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+ "New");
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"Java", "Java Project"});
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.setTextField(wizardShell,"", "CurrencyConverterPojo");
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+ abbotHelper.doubleClickItem(workbenchShell, "CurrencyConverterPojo");
+
+ wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+ "New");
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"Java", "Package"});
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.setTextField(wizardShell,"", "myPackage");
+ abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean copyCodeToPojoProject() {
+ boolean success = true;
+ try {
+ IWorkspaceRoot aWSRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IProject aProject = aWSRoot.getProject ("CurrencyConverterPojo");
+ String fileDir = aWSRoot.getLocation().toOSString()+ "/src/main/resources/sharedlib";
+ IFile aFile = aProject.getFile("src/myPackage/CurrencyConverter.java");
+ aFile.create(new FileInputStream (fileDir + "/CurrencyConverter.java"), true, null);
+ abbotHelper.waitTime(AbbotHelper.WAIT_STANDARD);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean createHelloWorldProject() {
+ boolean success = true;
+ try {
+ abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&Window", "&Close Perspective"});
+ 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);
+ Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+ "New");
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"Web", "Dynamic Web Project"});
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.setTextField(wizardShell,"", "HelloWorld");
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL);
+ abbotHelper.clickButton(wizardShell, "Add a runtime dependency to Geronimo's shared library");
+ abbotHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL);
+ abbotHelper.waitForDialogDisposal(wizardShell);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean copyCodeToHelloWorldProject() {
+ boolean success = true;
+ try {
+ IWorkspaceRoot aWSRoot = ResourcesPlugin.getWorkspace().getRoot();
+ IProject aProject = aWSRoot.getProject ("HelloWorld");
+ String fileDir =aWSRoot.getLocation().toOSString()+"/src/main/resources/sharedlib";
+ IFile aFile = aProject.getFile("WebContent/index.jsp");
+ aFile.create(new FileInputStream (fileDir + "/index.jsp"), true, null);
+ abbotHelper.waitTime(AbbotHelper.WAIT_STANDARD);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean modifyHelloWorldBuildPath() {
+ boolean success = true;
+ try {
+ Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&Project","&Properties"},
+ "Properties for HelloWorld");
+ abbotHelper.clickItem(wizardShell,"Java Build Path");
+ abbotHelper.selectTabItem(wizardShell,"&Projects");
+ Shell newShell=abbotHelper.clickButton(wizardShell, "&Add...","Required Project Selection");
+ abbotHelper.clickButton(newShell, "&Select All");
+ abbotHelper.clickButton(newShell, IDialogConstants.OK_LABEL);
+ abbotHelper.clickButton(wizardShell, IDialogConstants.OK_LABEL);
+ newShell = abbotHelper.clickMenuItem(workbenchShell, new String[]{"&Project","Clea&n..."}, "Clean");
+ abbotHelper.clickButton(newShell, IDialogConstants.OK_LABEL);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean toggleSharedLibSupport() {
+ boolean success = true;
+ try {
+ serverTasks.showServerOverview();
+ abbotHelper.clickButton(workbenchShell, "Enable in-place shared library support.");
+ abbotHelper.clickMenuItem(workbenchShell,new String[]{"&File","&Save"});
+ abbotHelper.clickMenuItem(workbenchShell, new String[]{"&File","C&lose All"});
+ // restart the server to pick up the change
+ serverTasks.startServer (true);
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean deployHelloWorldProject() {
+ boolean success = true;
+ try {
+ serverTasks.publishAllProjects();
+ }
+ catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ public boolean displayApplication() {
+ boolean success = true;
+ 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;
+ }
+ return success;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/SharedLibPojoTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/Tutorial5MinuteTest.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/Tutorial5MinuteTest.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/Tutorial5MinuteTest.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/Tutorial5MinuteTest.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,247 @@
+/*
+ * 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.v30.ui;
+
+import java.io.FileInputStream;
+
+import org.apache.geronimo.testsuite.common.selenium.EclipseSelenium;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * Tutorial5MinuteTest
+ *
+ * @version $Rev$ $Date$
+ */
+public class Tutorial5MinuteTest extends AbstractTestCase {
+
+ @Override
+ public boolean buildTestCase() {
+ boolean success = createProjects ();
+ if (success == true) {
+ success = copyCode();
+ }
+
+ return success;
+ }
+
+ @Override
+ public boolean runTestCase() {
+ boolean success = serverTasks.publishAllProjects();
+ if (success == true) {
+ success = webTesting();
+ }
+
+ return success;
+ }
+
+ @Override
+ public boolean cleanupTestCase() {
+ boolean success = serverTasks.removeAllProjects();
+ if (success == true) {
+ success = projectTasks.deleteProject ("SampleWAR");
+ }
+ if (success == true) {
+ success = projectTasks.deleteProject ("SampleEJB");
+ }
+ if (success == true) {
+ success = projectTasks.deleteProject ("SampleEAR");
+ }
+
+ return success;
+ }
+
+ public boolean createProjects() {
+ boolean success = createEARProject ();
+ if (success == true) {
+ success = createEJBProject ();
+ }
+ if (success == true) {
+ success = createWARProject ();
+ }
+
+ return success;
+ }
+
+ private boolean createEARProject() {
+ boolean success = true;
+ try {
+ Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+ "New");
+
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"Java EE", "Enterprise Application Project"});
+ 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);
+
+ abbotHelper.waitForDialogDisposal (wizardShell);
+ } catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ private boolean createEJBProject() {
+ boolean success = true;
+ try {
+ Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+ "New");
+
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"EJB", "EJB Project"});
+ 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);
+
+ abbotHelper.waitForDialogDisposal (wizardShell);
+
+ 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");
+ abbotHelper.clickButton (questionShell, IDialogConstants.OK_LABEL);
+ abbotHelper.waitForDialogDisposal (questionShell);
+ } catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ private boolean createWARProject() {
+ boolean success = true;
+ try {
+ Shell wizardShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."},
+ "New");
+
+ abbotHelper.clickTreeItem (wizardShell,
+ new String[] {"Web", "Dynamic Web Project"});
+ 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);
+
+ abbotHelper.waitForDialogDisposal (wizardShell);
+ } catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ private boolean copyCode () {
+ boolean success = true;
+ try {
+ abbotHelper.clickItem (workbenchShell, "SampleWAR");
+ Shell propShell = abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&Project", "&Properties"},
+ "Properties for SampleWAR");
+ 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");
+ IFolder aFolder = aProject.getFolder("ejbModule/sampleear");
+ aFolder.create (false, true, null);
+ String fileDir = aWSRoot.getLocation().toOSString() + "/src/main/resources/ui-tutorial";
+ IFile aFile = aProject.getFile("ejbModule/sampleear/RemoteBusinessInterface.java");
+ aFile.create(new FileInputStream (fileDir + "/RemoteBusinessInterface.java"), true, null);
+ aFile = aProject.getFile("ejbModule/sampleear/MyStatelessSessionBean.java");
+ aFile.create(new FileInputStream (fileDir + "/MyStatelessSessionBean.java"), true, null);
+
+ aProject = aWSRoot.getProject ("SampleWAR");
+ aFolder = aProject.getFolder("src/sampleear");
+ aFolder.create (false, true, null);
+ 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 = abbotHelper.rightClickItem(workbenchShell, "SampleWAR",
+ new String [] {"&New", "Servlet"}, "Create Servlet");
+ 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
+ abbotHelper.clickMenuItem (workbenchShell,
+ new String[] {"&File", "&Close"});
+ } catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+
+ private boolean webTesting () {
+ boolean success = true;
+ try {
+ EclipseSelenium selenium = new EclipseSelenium();
+ selenium.start();
+ selenium.open ("http://localhost:8080/SampleWAR/");
+ selenium.type ("name", "Tom");
+ selenium.click ("submit");
+ selenium.waitForPageToLoad ("3000");
+ success = (selenium.getHtmlSource().indexOf ("says hello to") > 0);
+
+ selenium.stop();
+ } catch (Exception e) {
+ e.printStackTrace();
+ success = false;
+ }
+ return success;
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/java/org/apache/geronimo/testsuite/v30/ui/Tutorial5MinuteTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/run-on-server/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/run-on-server/index.jsp?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/run-on-server/index.jsp (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/run-on-server/index.jsp Tue Apr 20 05:15:55 2010
@@ -0,0 +1,31 @@
+<!--
+ 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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>Run on Server</title>
+</head>
+<body>
+Run on Server Testcase !!!
+</body>
+</html>
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/run-on-server/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/CurrencyConverter.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/CurrencyConverter.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/CurrencyConverter.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/CurrencyConverter.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,39 @@
+/*
+ * 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 myPackage;
+
+import java.math.BigDecimal;
+
+/*
+ * @version $Rev$ $Date$
+ */
+public class CurrencyConverter {
+
+ private static BigDecimal rupeeRate = new BigDecimal("39.3881");
+ private static BigDecimal euroRate = new BigDecimal("0.0170853");
+
+ public static BigDecimal dollarToRupees(BigDecimal dollars) {
+ BigDecimal result = dollars.multiply(rupeeRate);
+ return result.setScale(2, BigDecimal.ROUND_UP);
+ }
+
+ public static BigDecimal rupeesToEuro(BigDecimal rupees) {
+ BigDecimal result = rupees.multiply(euroRate);
+ return result.setScale(2, BigDecimal.ROUND_UP);
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/CurrencyConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/index.jsp?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/index.jsp (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/index.jsp Tue Apr 20 05:15:55 2010
@@ -0,0 +1,32 @@
+<!--
+ 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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Insert title here</title>
+</head>
+<body>
+Hello World!!
+100 USD = <%= myPackage.CurrencyConverter.dollarToRupees(new java.math.BigDecimal(100.0)) %> INR
+</body>
+</html>
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/sharedlib/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyServlet.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyServlet.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyServlet.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyServlet.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,45 @@
+/*
+ * 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 sampleear;
+
+import java.io.IOException;
+
+import javax.ejb.EJB;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * MyServlet
+ *
+ * @version $Rev$ $Date$
+ */
+public class MyServlet extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
+ static final long serialVersionUID = 1L;
+
+ @EJB
+ RemoteBusinessInterface remoteBusinessIntf;
+
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ String name = request.getParameter("name");
+ if (name == null || name.length() == 0) {
+ name = "anonymous";
+ }
+ response.getWriter().write(remoteBusinessIntf.sayHello(name));
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyServlet.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyStatelessSessionBean.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyStatelessSessionBean.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyStatelessSessionBean.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyStatelessSessionBean.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,33 @@
+/*
+ * 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 sampleear;
+
+import javax.ejb.Stateless;
+
+/**
+ * MyStatelessSessionBean
+ *
+ * @version $Rev$ $Date$
+ */
+@Stateless
+public class MyStatelessSessionBean implements RemoteBusinessInterface {
+
+ public String sayHello(String name) {
+ return getClass().getName() + " says hello to " + name + ".";
+ }
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/MyStatelessSessionBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/RemoteBusinessInterface.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/RemoteBusinessInterface.java?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/RemoteBusinessInterface.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/RemoteBusinessInterface.java Tue Apr 20 05:15:55 2010
@@ -0,0 +1,30 @@
+/*
+ * 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 sampleear;
+
+import javax.ejb.Remote;
+
+/**
+ * RemoteBusinessInterface
+ *
+ * @version $Rev$ $Date$
+ */
+@Remote
+public interface RemoteBusinessInterface {
+ public String sayHello(String name);
+}
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/RemoteBusinessInterface.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/index.jsp
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/index.jsp?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/index.jsp (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/index.jsp Tue Apr 20 05:15:55 2010
@@ -0,0 +1,32 @@
+<!--
+ 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.
+-->
+
+<!-- @version $Rev$ $Date$ -->
+
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+ <title>5-minute Tutorial on Enterprise Application Development with Eclipse and Geronimo</title>
+ </head>
+ <body>
+ <form action="${pageContext.request.contextPath}/sayHello">
+ <input type="text" name="name" /><input type="submit" name="submit" value="Press me!" />
+ </form>
+ </body>
+</html>
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/src/main/resources/ui-tutorial/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/test.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/test.xml?rev=935803&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/test.xml (added)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/test.xml Tue Apr 20 05:15:55 2010
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+<!--
+ ~ 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.
+ -->
+
+<!-- @version $Rev$ $Date$ -->
+
+<project name="testsuite" default="run" basedir=".">
+
+ <!-- sets the properties eclipse-home, and library-file -->
+ <!-- The property ${eclipse-home} should be passed into this script -->
+ <!-- Set a meaningful default value for when it is not. -->
+ <property name="eclipse-home" value="${basedir}\..\.."/>
+ <property name="plugin-name" value="org.apache.geronimo.testsuite.v30"/>
+ <property name="library-file"
+ value="${eclipse-home}/../../../plugins/org.apache.geronimo.testsuite.common/library.xml"/>
+
+ <!-- This target holds all initialization code that needs to be done for -->
+ <!-- all tests that are to be run. Initialization for individual tests -->
+ <!-- should be done within the body of the suite target. -->
+ <target name="init">
+ <tstamp/>
+ <delete>
+ <fileset dir="${eclipse-home}" includes="org*.xml"/>
+ </delete>
+ </target>
+
+ <!-- This target defines the tests that need to be run. -->
+ <target name="suite">
+ <property name="jdt-folder"
+ value="${eclipse-home}/jdt_folder"/>
+ <delete dir="${jdt-folder}" quiet="true"/>
+
+
+ <!--
+ #########################################################################
+ ## ##
+ ## Extra permgen memory required for this testsuite ##
+ ## ##
+ #########################################################################
+ -->
+ <property name="extraVMargs" value="-XX:MaxPermSize=128m" />
+
+
+ <!--
+ #########################################################################
+ ## ##
+ ## Copy the resources required for this testsuite ##
+ ## ##
+ #########################################################################
+ -->
+ <mkdir dir="${jdt-folder}/src"/>
+ <copy todir="${jdt-folder}/src">
+ <fileset dir="${eclipse-home}/../../../plugins/org.apache.geronimo.testsuite.v30/src">
+ <include name="**/*.java"/>
+ <include name="**/*.jsp"/>
+ </fileset>
+ </copy>
+
+
+ <!--
+ #########################################################################
+ ## ##
+ ## Run all test case plugins ##
+ ## ##
+ #########################################################################
+ -->
+ <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.v30.ui.EclipseUITest"/>
+ </ant>
+
+ </target>
+
+ <!-- This target holds code to cleanup the testing environment after -->
+ <!-- after all of the tests have been run. You can use this target to -->
+ <!-- delete temporary files that have been created. -->
+ <target name="cleanup">
+ </target>
+
+ <!-- This target runs the test suite. Any actions that need to happen -->
+ <!-- after all the tests have been run should go here. -->
+ <target name="run" depends="init,suite,cleanup">
+ <ant target="collect" antfile="${library-file}" dir="${eclipse-home}">
+ <property name="includes" value="org*.xml"/>
+ <property name="output-file" value="${plugin-name}.xml"/>
+ </ant>
+ </target>
+
+</project>
Propchange: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v30/test.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml?rev=935803&r1=935802&r2=935803&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml Tue Apr 20 05:15:55 2010
@@ -24,14 +24,14 @@
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>testsuite-plugins</artifactId>
+ <version>3.0.0</version>
<packaging>pom</packaging>
- <version>3.0</version>
- <name>Geronimo Eclipse Plugin :: Testsuite :: Plugins</name>
+ <name>${artifactId}</name>
<parent>
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>geronimo-eclipse-plugin</artifactId>
- <version>3.0</version>
+ <version>3.0.0</version>
</parent>
<build>
@@ -110,6 +110,7 @@
<modules>
<module>org.apache.geronimo.testsuite.common</module>
+ <module>org.apache.geronimo.testsuite.v30</module>
<module>org.apache.geronimo.testsuite.v22</module>
<module>org.apache.geronimo.testsuite.v21</module>
<module>org.apache.geronimo.testsuite.v20</module>
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml?rev=935803&r1=935802&r2=935803&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml Tue Apr 20 05:15:55 2010
@@ -24,8 +24,8 @@
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>testsuite</artifactId>
- <packaging>pom</packaging>
<version>3.0.0</version>
+ <packaging>pom</packaging>
<name>Geronimo Eclipse Plugin :: Testsuite</name>
<parent>
@@ -39,21 +39,87 @@
</description>
<properties>
- <geronimoVersion_1>2.2-SNAPSHOT</geronimoVersion_1>
- <geronimoVersion_2>2.1.4</geronimoVersion_2>
- <geronimoVersion_3>2.0.2</geronimoVersion_3>
+ <geronimoVersion_1>3.0-SNAPSHOT</geronimoVersion_1>
+ <geronimoVersion_2>2.2.1-SNAPSHOT</geronimoVersion_2>
+ <geronimoVersion_3>2.1.4</geronimoVersion_3>
+ <geronimoVersion_4>2.0.2</geronimoVersion_4>
</properties>
<dependencies>
<!--
|
+ | Geronimo server v3.0
+ |
+ -->
+ <dependency>
+ <groupId>org.apache.geronimo.assemblies</groupId>
+ <artifactId>geronimo-tomcat7-javaee6</artifactId>
+ <version>${geronimoVersion_1}</version>
+ <type>zip</type>
+ <classifier>bin</classifier>
+ <scope>test</scope>
+ <!--
+ |
+ | Exclude server dependencies not used by the GEP
+ |
+ -->
+ <exclusions>
+ <exclusion>
+ <groupId>com.sun.xml.ws</groupId>
+ <artifactId>jaxws-tools</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.xml.ws</groupId>
+ <artifactId>jaxws-rt</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>catalina</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>jasper</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-portal-driver</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-portal-driver-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-container</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-taglib</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-descriptor-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.pluto</groupId>
+ <artifactId>pluto-descriptor-impl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>juddi</groupId>
+ <artifactId>juddi</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!--
+ |
| Geronimo server v2.2
|
-->
<dependency>
<groupId>org.apache.geronimo.assemblies</groupId>
<artifactId>geronimo-tomcat6-javaee5</artifactId>
- <version>${geronimoVersion_1}</version>
+ <version>${geronimoVersion_2}</version>
<type>zip</type>
<classifier>bin</classifier>
<scope>test</scope>
@@ -118,7 +184,7 @@
<dependency>
<groupId>org.apache.geronimo.assemblies</groupId>
<artifactId>geronimo-tomcat6-javaee5</artifactId>
- <version>${geronimoVersion_2}</version>
+ <version>${geronimoVersion_3}</version>
<type>zip</type>
<classifier>bin</classifier>
<scope>test</scope>
@@ -183,7 +249,7 @@
<dependency>
<groupId>org.apache.geronimo.assemblies</groupId>
<artifactId>geronimo-tomcat6-jee5</artifactId>
- <version>${geronimoVersion_3}</version>
+ <version>${geronimoVersion_4}</version>
<type>zip</type>
<classifier>bin</classifier>
<scope>test</scope>
@@ -233,15 +299,45 @@
<failOnError>false</failOnError>
<filesets>
<fileset>
- <directory>${pom.basedir}</directory>
+ <directory>${pom.basedir}/launcher/server_v3.0</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>${pom.basedir}/launcher/server_v2.2</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>${pom.basedir}/launcher/server_v2.1</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>${pom.basedir}/launcher/server_v2.0</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>${pom.basedir}/launcher/eclipse</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>${pom.basedir}/launcher/results</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </fileset>
+ <fileset>
+ <directory>${pom.basedir}/launcher/workspace</directory>
<includes>
- <include>launcher/.metadata</include>
- <include>launcher/eclipse</include>
- <include>launcher/results</include>
- <include>launcher/server_v2.2</include>
- <include>launcher/server_v2.1</include>
- <include>launcher/server_v2.0</include>
- <include>launcher/workspace</include>
+ <include>**</include>
</includes>
</fileset>
</filesets>
Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/server/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/server/pom.xml?rev=935803&r1=935802&r2=935803&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/server/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/server/pom.xml Tue Apr 20 05:15:55 2010
@@ -24,14 +24,14 @@
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>testsuite-server</artifactId>
+ <version>3.0.0</version>
<packaging>pom</packaging>
- <version>3.0</version>
<name>Geronimo Eclipse Plugin :: Testsuite :: Server(s)</name>
<parent>
<groupId>org.apache.geronimo.devtools</groupId>
<artifactId>testsuite</artifactId>
- <version>3.0</version>
+ <version>3.0.0</version>
</parent>
<build>
@@ -47,18 +47,34 @@
<tasks>
<!--
|
+ | Unzip and rename the testsuite Geronimo server v3.0.0
+ |
+ -->
+ <property name="geronimoVersion_1" value="3.0-SNAPSHOT"/>
+ <property name="geronimoVersion_1_install" value="${basedir}/../launcher/"/>
+ <property name="geronimoVersion_1_assembly" value="org/apache/geronimo/assemblies"/>
+ <property name="geronimoVersion_1_name" value="geronimo-tomcat7-javaee6"/>
+ <mkdir dir="${geronimoVersion_1_install}"/>
+ <unzip src="${settings.localRepository}/${geronimoVersion_1_assembly}/${geronimoVersion_1_name}/${geronimoVersion_1}/${geronimoVersion_1_name}-${geronimoVersion_1}-bin.zip"
+ dest="${geronimoVersion_1_install}"/>
+ <move todir="${geronimoVersion_1_install}server_v3.0">
+ <fileset dir="${geronimoVersion_1_install}/${geronimoVersion_1_name}-${geronimoVersion_1}"/>
+ </move>
+
+ <!--
+ |
| Unzip and rename the testsuite Geronimo server v2.2.0
|
-->
- <property name="geronimo_install1" value="${basedir}/../launcher/"/>
- <property name="geronimo_assembly1" value="org/apache/geronimo/assemblies"/>
- <property name="geronimo_name1" value="geronimo-tomcat6-javaee5"/>
- <property name="geronimoVersion_1" value="2.2-SNAPSHOT"/>
- <mkdir dir="${geronimo_install1}"/>
- <unzip src="${settings.localRepository}/${geronimo_assembly1}/${geronimo_name1}/${geronimoVersion_1}/${geronimo_name1}-${geronimoVersion_1}-bin.zip"
- dest="${geronimo_install1}"/>
- <move todir="${geronimo_install1}server_v2.2">
- <fileset dir="${geronimo_install1}/${geronimo_name1}-${geronimoVersion_1}"/>
+ <property name="geronimoVersion_2" value="2.2.1-SNAPSHOT"/>
+ <property name="geronimoVersion_2_install" value="${basedir}/../launcher/"/>
+ <property name="geronimoVersion_2_assembly" value="org/apache/geronimo/assemblies"/>
+ <property name="geronimoVersion_2_name" value="geronimo-tomcat6-javaee5"/>
+ <mkdir dir="${geronimoVersion_2_install}"/>
+ <unzip src="${settings.localRepository}/${geronimoVersion_2_assembly}/${geronimoVersion_2_name}/${geronimoVersion_2}/${geronimoVersion_2_name}-${geronimoVersion_2}-bin.zip"
+ dest="${geronimoVersion_2_install}"/>
+ <move todir="${geronimoVersion_2_install}server_v2.2">
+ <fileset dir="${geronimoVersion_2_install}/${geronimoVersion_2_name}-${geronimoVersion_2}"/>
</move>
<!--
@@ -66,15 +82,15 @@
| Unzip and rename the testsuite Geronimo server v2.1.4
|
-->
- <property name="geronimo_install2" value="${basedir}/../launcher/"/>
- <property name="geronimo_assembly2" value="org/apache/geronimo/assemblies"/>
- <property name="geronimo_name2" value="geronimo-tomcat6-javaee5"/>
- <property name="geronimoVersion_2" value="2.1.4"/>
- <mkdir dir="${geronimo_install2}"/>
- <unzip src="${settings.localRepository}/${geronimo_assembly2}/${geronimo_name2}/${geronimoVersion_2}/${geronimo_name2}-${geronimoVersion_2}-bin.zip"
- dest="${geronimo_install2}"/>
- <move todir="${geronimo_install2}server_v2.1">
- <fileset dir="${geronimo_install2}/${geronimo_name2}-${geronimoVersion_2}"/>
+ <property name="geronimoVersion_3" value="2.1.4"/>
+ <property name="geronimoVersion_3_install" value="${basedir}/../launcher/"/>
+ <property name="geronimoVersion_3_assembly" value="org/apache/geronimo/assemblies"/>
+ <property name="geronimoVersion_3_name" value="geronimo-tomcat6-javaee5"/>
+ <mkdir dir="${geronimoVersion_3_install}"/>
+ <unzip src="${settings.localRepository}/${geronimoVersion_3_assembly}/${geronimoVersion_3_name}/${geronimoVersion_3}/${geronimoVersion_3_name}-${geronimoVersion_3}-bin.zip"
+ dest="${geronimoVersion_3_install}"/>
+ <move todir="${geronimoVersion_3_install}server_v2.1">
+ <fileset dir="${geronimoVersion_3_install}/${geronimoVersion_3_name}-${geronimoVersion_3}"/>
</move>
<!--
@@ -82,15 +98,15 @@
| Unzip and rename the testsuite Geronimo server v2.0.2
|
-->
- <property name="geronimo_install3" value="${basedir}/../launcher/"/>
- <property name="geronimo_assembly3" value="org/apache/geronimo/assemblies"/>
- <property name="geronimo_name3" value="geronimo-tomcat6-jee5"/>
- <property name="geronimoVersion_3" value="2.0.2"/>
- <mkdir dir="${geronimo_install3}"/>
- <unzip src="${settings.localRepository}/${geronimo_assembly3}/${geronimo_name3}/${geronimoVersion_3}/${geronimo_name3}-${geronimoVersion_3}-bin.zip"
- dest="${geronimo_install3}"/>
- <move todir="${geronimo_install3}server_v2.0">
- <fileset dir="${geronimo_install3}/${geronimo_name3}-${geronimoVersion_3}"/>
+ <property name="geronimoVersion_4" value="2.0.2"/>
+ <property name="geronimoVersion_4_install" value="${basedir}/../launcher/"/>
+ <property name="geronimoVersion_4_assembly" value="org/apache/geronimo/assemblies"/>
+ <property name="geronimoVersion_4_name" value="geronimo-tomcat6-jee5"/>
+ <mkdir dir="${geronimoVersion_4_install}"/>
+ <unzip src="${settings.localRepository}/${geronimoVersion_4_assembly}/${geronimoVersion_4_name}/${geronimoVersion_4}/${geronimoVersion_4_name}-${geronimoVersion_4}-bin.zip"
+ dest="${geronimoVersion_4_install}"/>
+ <move todir="${geronimoVersion_4_install}server_v2.0">
+ <fileset dir="${geronimoVersion_4_install}/${geronimoVersion_4_name}-${geronimoVersion_4}"/>
</move>
</tasks>
</configuration>