Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 12644 invoked from network); 25 Jul 2008 07:10:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2008 07:10:40 -0000 Received: (qmail 52772 invoked by uid 500); 25 Jul 2008 07:10:40 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 52764 invoked by uid 500); 25 Jul 2008 07:10:40 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 52747 invoked by uid 99); 25 Jul 2008 07:10:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2008 00:10:39 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Jul 2008 07:09:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 12E892388A3D; Fri, 25 Jul 2008 00:09:48 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r679683 [2/2] - in /geronimo/devtools/eclipse-plugin/trunk/testsuite: ./ eclipse/ launcher/ plugins/ plugins/org.apache.geronimo.testsuite.common/ plugins/org.apache.geronimo.testsuite.common/META-INF/ plugins/org.apache.geronimo.testsuite.... Date: Fri, 25 Jul 2008 07:09:46 -0000 To: scm@geronimo.apache.org From: yunfengma@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080725070948.12E892388A3D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/LICENSE.txt URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/LICENSE.txt?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/LICENSE.txt (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/LICENSE.txt Fri Jul 25 00:09:44 2008 @@ -0,0 +1,203 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. + Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/META-INF/MANIFEST.MF URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/META-INF/MANIFEST.MF?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/META-INF/MANIFEST.MF (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/META-INF/MANIFEST.MF Fri Jul 25 00:09:44 2008 @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Geronimo v20 Server Tools Testsuite Plug-in +Bundle-SymbolicName: org.apache.geronimo.testsuite.v20;singleton:=true +Bundle-Version: 2.1.2 +Bundle-Activator: org.apache.geronimo.testsuite.v20.Activator +Bundle-Vendor: Apache.org +Bundle-Localization: plugin +Require-Bundle: abbot.swt, + abbot.swt.eclipse, + org.eclipse.core.runtime, + org.eclipse.debug.ui, + org.eclipse.debug.core, + org.eclipse.jdt.core, + org.eclipse.jdt.launching;visibility:=reexport, + org.eclipse.jst.common.frameworks, + org.eclipse.jst.j2ee, + org.eclipse.jst.j2ee.ejb, + org.eclipse.jst.j2ee.jca, + org.eclipse.jst.j2ee.web, + org.eclipse.jst.server.core;visibility:=reexport, + org.eclipse.ui, + org.eclipse.ui.editors, + org.eclipse.ui.forms, + org.eclipse.ui.ide, + org.eclipse.ui.views, + org.apache.geronimo.testsuite.common +Eclipse-LazyStart: true +Export-Package: org.apache.geronimo.testsuite.v20 +Import-Package: junit.framework;version="3.8.2" Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/NOTICE.txt URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/NOTICE.txt?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/NOTICE.txt (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/NOTICE.txt Fri Jul 25 00:09:44 2008 @@ -0,0 +1,7 @@ +Apache Geronimo +Copyright 2003-2008 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + + Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/plugin.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/plugin.xml?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/plugin.xml (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/plugin.xml Fri Jul 25 00:09:44 2008 @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/pom.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/pom.xml?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/pom.xml (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/pom.xml Fri Jul 25 00:09:44 2008 @@ -0,0 +1,170 @@ + + + + + + + + 4.0.0 + + org.apache.geronimo.devtools + org.apache.geronimo.testsuite.v20 + jar + 2.1.2 + ${artifactId} + + + org.apache.geronimo.devtools + testsuite-plugins + 2.1.2 + + + + + + . + + test.xml + plugin.xml + plugin.properties + + + + + META-INF + . + + LICENSE + NOTICE + + + + + + + + org.apache.geronimo.devtools + maven-eclipsepde-plugin + + + + maven-dependency-plugin + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + package + + run + + + + + + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + **/MyServlet.java + **/MyStatelessSessionBean.java + **/RemoteBusinessInterface.java + + + + + + + + + + org.apache.geronimo.devtools + eclipse + ${version} + pom + + + + junit + junit + + + + org.apache.geronimo.devtools + org.apache.geronimo.st.core + ${version} + + + + org.apache.geronimo.devtools + org.apache.geronimo.st.v20.core + ${version} + + + + org.apache.geronimo.devtools + org.apache.geronimo.jee.v21.jaxbmodel + ${version} + + + + org.apache.geronimo.devtools + org.apache.geronimo.runtime.common + ${version} + + + + org.apache.geronimo.devtools + org.apache.geronimo.runtime.v20 + ${version} + + + + abbot + abbot.swt + + + + abbot + abbot.swt.eclipse + + + + org.apache.geronimo.devtools + org.apache.geronimo.testsuite.common + ${version} + + + + Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/Activator.java Fri Jul 25 00:09:44 2008 @@ -0,0 +1,75 @@ +/* + * 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.v20; + +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + * + * @version $Rev: 677978 $ $Date: 2008-07-18 10:34:28 -0700 (Fri, 18 Jul 2008) $ + */ +public class Activator extends Plugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.apache.geronimo.st.v20.core"; + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + public static void log(int severity, String message, Throwable throwable) { + plugin.getLog().log(new Status(severity, PLUGIN_ID, 0, message, throwable)); + } +} Added: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/NewServerTest.java Fri Jul 25 00:09:44 2008 @@ -0,0 +1,79 @@ +/* + * 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.v20.ui; + +import org.apache.geronimo.testsuite.common.ui.AbbotHelper; +import org.apache.geronimo.testsuite.common.ui.Constants; +import org.apache.geronimo.testsuite.common.ui.ServerTasks; +import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks; +import org.eclipse.swt.widgets.Shell; + +import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase; +import abbot.swt.eclipse.utils.Preferences; +import abbot.swt.eclipse.utils.WorkbenchUtilities; +import abbot.swt.eclipse.utils.Preferences.Mode; + +/** + * @version $Rev: 679174 $ $Date: 2008-07-23 12:52:55 -0700 (Wed, 23 Jul 2008) $ + */ +public class NewServerTest extends WorkbenchTestCase { + Shell workbenchShell; + AbbotHelper aHelper; + + protected void setUp() throws Exception { + super.setUp(); + Preferences.setPerspectiveSwitchPrompt(Mode.Always); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + // We only want to install/uninstall the server a single time so + // we will roll all testcases into one large one that is controlled + // in the testAllGeronimoGUI method. + public void testAllGeronimoGUI() { + boolean success = false; + try { + workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell(); + aHelper = new AbbotHelper (workbenchShell); + + ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V20 ); + WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper); + + // so we are sure that we are looking in the desired perspective + workbenchTasks.showJEEPerspective(); + + // create server from an installed instance + serverTasks.createServer(); + + serverTasks.startServer(); + serverTasks.stopServer(); + + // remove the server + serverTasks.removeServer(); + + success = true; + } + catch (Exception e) { + e.printStackTrace(); + } + assertTrue (success); + } + +} Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/java/org/apache/geronimo/testsuite/v20/ui/Tutorial5MinuteTest.java Fri Jul 25 00:09:44 2008 @@ -0,0 +1,95 @@ +/* + * 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.v20.ui; + +import org.apache.geronimo.testsuite.common.ui.AbbotHelper; +import org.apache.geronimo.testsuite.common.ui.Constants; +import org.apache.geronimo.testsuite.common.ui.ProjectTasks; +import org.apache.geronimo.testsuite.common.ui.ServerTasks; +import org.apache.geronimo.testsuite.common.ui.Tutorial5Minute; +import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks; +import org.eclipse.swt.widgets.Shell; + +import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase; +import abbot.swt.eclipse.utils.Preferences; +import abbot.swt.eclipse.utils.WorkbenchUtilities; +import abbot.swt.eclipse.utils.Preferences.Mode; + +/** + * Tutorial5MinuteTest + * + * @version $Rev: 679174 $ $Date: 2008-07-23 12:52:55 -0700 (Wed, 23 Jul 2008) $ + */ +public class Tutorial5MinuteTest extends WorkbenchTestCase { + Shell workbenchShell; + AbbotHelper aHelper; + + protected void setUp() throws Exception { + super.setUp(); + Preferences.setPerspectiveSwitchPrompt(Mode.Always); + } + + protected void tearDown() throws Exception { + super.tearDown(); + } + + // We only want to install/uninstall the server a single time so + // we will roll all testcases into one large one that is controlled + // in the testAllGeronimoGUI method. + public void testAllGeronimoGUI() { + boolean success = false; + try { + workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell(); + aHelper = new AbbotHelper (workbenchShell); + + workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell(); + aHelper = new AbbotHelper (workbenchShell); + + ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V20 ); + WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper); + ProjectTasks projectTasks = new ProjectTasks(workbenchShell, aHelper, Constants.SERVER_V20 ); + + // so we are sure that we are looking in the desired perspective + workbenchTasks.showJEEPerspective(); + + // create server from an installed instance + serverTasks.createServer(); + + serverTasks.startServer(); + Tutorial5Minute tutorial = new Tutorial5Minute (workbenchShell, aHelper); + tutorial.createProjects (); + serverTasks.stopServer(); + + // delete the projects that have been created + // reverse alphabetical is a little smoother + projectTasks.deleteProject ("SampleWAR"); + projectTasks.deleteProject ("SampleEJB"); + projectTasks.deleteProject ("SampleEAR"); + + // remove the server + serverTasks.removeServer(); + + success = true; + } + catch (Exception e) { + e.printStackTrace(); + } + assertTrue (success); + } + +} Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyServlet.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyServlet.java?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyServlet.java (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyServlet.java Fri Jul 25 00:09:44 2008 @@ -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: 679174 $ $Date: 2008-07-23 12:52:55 -0700 (Wed, 23 Jul 2008) $ + */ +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)); + } +} Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyStatelessSessionBean.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyStatelessSessionBean.java?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyStatelessSessionBean.java (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/MyStatelessSessionBean.java Fri Jul 25 00:09:44 2008 @@ -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: 679174 $ $Date: 2008-07-23 12:52:55 -0700 (Wed, 23 Jul 2008) $ + */ +@Stateless +public class MyStatelessSessionBean implements RemoteBusinessInterface { + + public String sayHello(String name) { + return getClass().getName() + " says hello to " + name + "."; + } +} Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/RemoteBusinessInterface.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/RemoteBusinessInterface.java?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/RemoteBusinessInterface.java (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/RemoteBusinessInterface.java Fri Jul 25 00:09:44 2008 @@ -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: 679174 $ $Date: 2008-07-23 12:52:55 -0700 (Wed, 23 Jul 2008) $ + */ +@Remote +public interface RemoteBusinessInterface { + public String sayHello(String name); +} Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/src/main/resources/ui-tutorial/index.jsp Fri Jul 25 00:09:44 2008 @@ -0,0 +1,32 @@ + + + + +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> + + + + + 5-minute Tutorial on Enterprise Application Development with Eclipse and Geronimo + + +
+ +
+ + Added: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml?rev=679683&view=auto ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml (added) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v20/test.xml Fri Jul 25 00:09:44 2008 @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/META-INF/MANIFEST.MF URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/META-INF/MANIFEST.MF?rev=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/META-INF/MANIFEST.MF (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/META-INF/MANIFEST.MF Fri Jul 25 00:09:44 2008 @@ -8,11 +8,6 @@ Bundle-Localization: plugin Require-Bundle: abbot.swt, abbot.swt.eclipse, - org.apache.geronimo.jee.v21.jaxbmodel, - org.apache.geronimo.runtime.v21, - org.apache.geronimo.runtime.common, - org.apache.geronimo.st.core, - org.apache.geronimo.st.v21.core, org.eclipse.core.runtime, org.eclipse.debug.ui, org.eclipse.debug.core, @@ -28,7 +23,8 @@ org.eclipse.ui.editors, org.eclipse.ui.forms, org.eclipse.ui.ide, - org.eclipse.ui.views + org.eclipse.ui.views, + org.apache.geronimo.testsuite.common Eclipse-LazyStart: true Export-Package: org.apache.geronimo.testsuite.v21 Import-Package: junit.framework;version="3.8.2" Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/plugin.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/plugin.xml?rev=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/plugin.xml (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/plugin.xml Fri Jul 25 00:09:44 2008 @@ -45,6 +45,7 @@ + Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/pom.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/pom.xml?rev=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/pom.xml (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/pom.xml Fri Jul 25 00:09:44 2008 @@ -47,7 +47,7 @@ META-INF - .. + . LICENSE NOTICE @@ -159,6 +159,12 @@ abbot abbot.swt.eclipse + + + org.apache.geronimo.devtools + org.apache.geronimo.testsuite.common + ${version} + Modified: geronimo/devtools/eclipse-plugin/trunk/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/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java?rev=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/NewServerTest.java Fri Jul 25 00:09:44 2008 @@ -19,20 +19,19 @@ import java.io.File; +import org.apache.geronimo.testsuite.common.ui.AbbotHelper; +import org.apache.geronimo.testsuite.common.ui.Constants; +import org.apache.geronimo.testsuite.common.ui.ServerTasks; +import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IPerspectiveRegistry; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase; import abbot.swt.eclipse.utils.Preferences; -import abbot.swt.eclipse.utils.Preferences.Mode; import abbot.swt.eclipse.utils.WorkbenchUtilities; +import abbot.swt.eclipse.utils.Preferences.Mode; import abbot.swt.finder.generic.MultipleFoundException; import abbot.swt.finder.generic.NotFoundException; @@ -61,16 +60,20 @@ workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell(); aHelper = new AbbotHelper (workbenchShell); + ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V21 ); + WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper); + // so we are sure that we are looking in the desired perspective - showJEEPerspective(); + workbenchTasks.showJEEPerspective(); // create server from an installed instance - server21Create(); + serverTasks.createServer(); - serverTesting(); + serverTasks.startServer(); + serverTasks.stopServer(); // remove the server - server21Remove(); + serverTasks.removeServer(); success = true; } @@ -80,94 +83,4 @@ assertTrue (success); } - private void showJEEPerspective() throws MultipleFoundException, NotFoundException { - - aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "&Close Perspective"}); - - Shell perspectiveShell = aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "&Open Perspective", "&Other..." }, - "Open Perspective"); - aHelper.clickItem (perspectiveShell, "Java EE (default)"); - aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL); - } - - // just getting through this with no exceptions is success. - private void server21Create() throws MultipleFoundException, NotFoundException { - // Launch the New Project wizard and aHelper.wait for it to open. - Shell wizardShell = aHelper.clickMenuItem (workbenchShell, - new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."}, - "New"); - - // Having 2 tree items with the same name is not very good design - aHelper.clickTreeItem (wizardShell, - new String[] {"Server", "Server"}); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - - // Select the proper Server. why do we have this in there twice? - aHelper.clickItem (wizardShell, "Apache Geronimo v2.1 Server"); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - - //TODO would be nice to install the server instead of have to know where it is in advance - aHelper.setTextField (wizardShell, "", getServerInstallDirectory()); - - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL); - } - - private void serverTesting () throws MultipleFoundException, NotFoundException { - - String serverDisplay = "Apache Geronimo v2.1 Server at localhost"; - aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "Show &View", "Servers"}); - - aHelper.rightClickItem (workbenchShell, serverDisplay, - new String[] {"&Start"}); - aHelper.waitForServerStatus (workbenchShell, serverDisplay, "Started"); - - aHelper.waitTime( 1500 ); - - aHelper.rightClickItem (workbenchShell, serverDisplay, - new String[] {"S&top"}); - aHelper.waitForServerStatus (workbenchShell, serverDisplay, "Stopped"); - - aHelper.waitTime( 1500 ); - - } - - // remove the server so that the test will be reset back to its original state. - private void server21Remove () throws MultipleFoundException, NotFoundException { - Shell preferenceShell = aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "&Preferences"}, - "Preferences"); - - aHelper.clickTreeItem (preferenceShell, - new String[] {"Server", "Runtime Environments"}); - aHelper.clickItem (preferenceShell, "Apache Geronimo v2.1"); - Shell questionShell = aHelper.clickButton (preferenceShell, "&Remove", "Server"); - - aHelper.clickButton (questionShell, IDialogConstants.OK_LABEL); - aHelper.clickButton (preferenceShell, IDialogConstants.OK_LABEL); - } - - private String getServerInstallDirectory() { - IWorkspace ws = ResourcesPlugin.getWorkspace(); - String location = ws.getRoot().getLocation().toOSString(); - int index = location.lastIndexOf(File.separatorChar); - if (index > -1) { - location = location.substring(0,index); - } - index = location.lastIndexOf(File.separatorChar); - if (index > -1) { - location = location.substring(0,index); - } - index = location.lastIndexOf(File.separatorChar); - if (index > -1) { - location = location.substring(0,index); - } - location = location + File.separatorChar + "server" ; - return location; - } } Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java?rev=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/org.apache.geronimo.testsuite.v21/src/main/java/org/apache/geronimo/testsuite/v21/ui/Tutorial5MinuteTest.java Fri Jul 25 00:09:44 2008 @@ -19,20 +19,21 @@ import java.io.File; +import org.apache.geronimo.testsuite.common.ui.AbbotHelper; +import org.apache.geronimo.testsuite.common.ui.Constants; +import org.apache.geronimo.testsuite.common.ui.ProjectTasks; +import org.apache.geronimo.testsuite.common.ui.ServerTasks; +import org.apache.geronimo.testsuite.common.ui.Tutorial5Minute; +import org.apache.geronimo.testsuite.common.ui.WorkbenchTasks; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.jface.dialogs.IDialogConstants; -import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IPerspectiveRegistry; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; import abbot.swt.eclipse.junit.extensions.WorkbenchTestCase; import abbot.swt.eclipse.utils.Preferences; -import abbot.swt.eclipse.utils.Preferences.Mode; import abbot.swt.eclipse.utils.WorkbenchUtilities; +import abbot.swt.eclipse.utils.Preferences.Mode; import abbot.swt.finder.generic.MultipleFoundException; import abbot.swt.finder.generic.NotFoundException; @@ -63,26 +64,32 @@ workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell(); aHelper = new AbbotHelper (workbenchShell); + workbenchShell = WorkbenchUtilities.getWorkbenchWindow().getShell(); + aHelper = new AbbotHelper (workbenchShell); + + ServerTasks serverTasks = new ServerTasks(workbenchShell, aHelper, Constants.SERVER_V21 ); + WorkbenchTasks workbenchTasks = new WorkbenchTasks(workbenchShell, aHelper); + ProjectTasks projectTasks = new ProjectTasks(workbenchShell, aHelper, Constants.SERVER_V21 ); + // so we are sure that we are looking in the desired perspective - showJEEPerspective(); + workbenchTasks.showJEEPerspective(); // create server from an installed instance - server21Create(); + serverTasks.createServer(); - // create some new projects + serverTasks.startServer(); Tutorial5Minute tutorial = new Tutorial5Minute (workbenchShell, aHelper); tutorial.createProjects (); - - serverTesting(); + serverTasks.stopServer(); // delete the projects that have been created // reverse alphabetical is a little smoother - deleteProject ("SampleWAR"); - deleteProject ("SampleEJB"); - deleteProject ("SampleEAR"); + projectTasks.deleteProject ("SampleWAR"); + projectTasks.deleteProject ("SampleEJB"); + projectTasks.deleteProject ("SampleEAR"); // remove the server - server21Remove(); + serverTasks.removeServer(); success = true; } @@ -91,120 +98,4 @@ } assertTrue (success); } - - private void showJEEPerspective() throws MultipleFoundException, NotFoundException { - - aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "&Close Perspective"}); - - Shell perspectiveShell = aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "&Open Perspective", "&Other..." }, - "Open Perspective"); - aHelper.clickItem (perspectiveShell, "Java EE (default)"); - aHelper.clickButton (perspectiveShell, IDialogConstants.OK_LABEL); - } - - // just getting through this with no exceptions is success. - private void server21Create() throws MultipleFoundException, NotFoundException { - // Launch the New Project wizard and aHelper.wait for it to open. - Shell wizardShell = aHelper.clickMenuItem (workbenchShell, - new String[] {"&File", "&New\tAlt+Shift+N", "&Other..."}, - "New"); - - // Having 2 tree items with the same name is not very good design - aHelper.clickTreeItem (wizardShell, - new String[] {"Server", "Server"}); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - - // Select the proper Server. why do we have this in there twice? - aHelper.clickItem (wizardShell, "Apache Geronimo v2.1 Server"); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - - //TODO would be nice to install the server instead of have to know where it is in advance - aHelper.setTextField (wizardShell, "", getServerInstallDirectory()); - - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - aHelper.clickButton (wizardShell, IDialogConstants.NEXT_LABEL); - aHelper.clickButton (wizardShell, IDialogConstants.FINISH_LABEL); - } - - // TODO only want to add the SampleEAR project and then test that - // that will include 3 different types of projects - private void serverTesting () throws MultipleFoundException, NotFoundException { - - String serverDisplay = "Apache Geronimo v2.1 Server at localhost"; - aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "Show &View", "Servers"}); - - Shell deployShell = aHelper.rightClickItem (workbenchShell, serverDisplay, - new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects"); - aHelper.clickButton (deployShell, "Add A&ll >>"); - - aHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL); - aHelper.waitForDialogDisposal (deployShell); - - aHelper.rightClickItem (workbenchShell, serverDisplay, - new String[] {"&Start"}); - aHelper.waitForServerStatus (workbenchShell, serverDisplay, "Started"); - - // Wait for server status to change from publishing -> synchronized - aHelper.waitTime( 5000 ); - - aHelper.rightClickItem (workbenchShell, serverDisplay, - new String[] {"S&top"}); - aHelper.waitForServerStatus (workbenchShell, serverDisplay, "Stopped"); - - aHelper.waitTime( 1500 ); - - deployShell = aHelper.rightClickItem (workbenchShell, serverDisplay, - new String[] {"Add and Remove &Projects..."}, "Add and Remove Projects"); - aHelper.clickButton (deployShell, "<< Re&move All"); - aHelper.clickButton (deployShell, IDialogConstants.FINISH_LABEL); - aHelper.waitForDialogDisposal (deployShell); - } - - // remove the server so that the test will be reset back to its original state. - private void server21Remove () throws MultipleFoundException, NotFoundException { - Shell preferenceShell = aHelper.clickMenuItem (workbenchShell, - new String[] {"&Window", "&Preferences"}, - "Preferences"); - - aHelper.clickTreeItem (preferenceShell, - new String[] {"Server", "Runtime Environments"}); - aHelper.clickItem (preferenceShell, "Apache Geronimo v2.1"); - Shell questionShell = aHelper.clickButton (preferenceShell, "&Remove", "Server"); - - aHelper.clickButton (questionShell, IDialogConstants.OK_LABEL); - aHelper.clickButton (preferenceShell, IDialogConstants.OK_LABEL); - } - - private String getServerInstallDirectory() { - IWorkspace ws = ResourcesPlugin.getWorkspace(); - String location = ws.getRoot().getLocation().toOSString(); - int index = location.lastIndexOf(File.separatorChar); - if (index > -1) { - location = location.substring(0,index); - } - index = location.lastIndexOf(File.separatorChar); - if (index > -1) { - location = location.substring(0,index); - } - index = location.lastIndexOf(File.separatorChar); - if (index > -1) { - location = location.substring(0,index); - } - location = location + File.separatorChar + "server" ; - return location; - } - - private void deleteProject (String projectName) throws MultipleFoundException, NotFoundException { - Shell questionShell = aHelper.rightClickItem (workbenchShell, projectName, - new String[] {"&Delete"}, "Delete Resources"); - - // use .* to signify use of a wildcard - aHelper.clickButton (questionShell, "&Delete project contents.*"); - aHelper.clickButton (questionShell, IDialogConstants.OK_LABEL); - aHelper.waitForDialogDisposal (questionShell); - } } 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=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml Fri Jul 25 00:09:44 2008 @@ -60,6 +60,15 @@ + + + org.apache.maven.plugins + maven-jar-plugin + + + ${basedir}/META-INF/MANIFEST.MF + + org.apache.maven.plugins @@ -101,7 +110,9 @@ org.apache.geronimo.devtools.helloworld + org.apache.geronimo.testsuite.common org.apache.geronimo.testsuite.v21 + org.apache.geronimo.testsuite.v20 Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml?rev=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/pom.xml Fri Jul 25 00:09:44 2008 @@ -46,6 +46,14 @@ pom test + + org.apache.geronimo.assemblies + geronimo-tomcat6-jee5 + 2.0.2 + zip + bin + test + @@ -66,7 +74,8 @@ launcher/eclipse launcher/results - launcher/server + launcher/server_v2.1 + launcher/server_v2.0 launcher/workspace 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=679683&r1=679682&r2=679683&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/testsuite/server/pom.xml (original) +++ geronimo/devtools/eclipse-plugin/trunk/testsuite/server/pom.xml Fri Jul 25 00:09:44 2008 @@ -47,18 +47,34 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + +