001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package gui;
043:
044: import gui.action.*;
045: import org.netbeans.junit.NbTestSuite;
046:
047: /**
048: * Measure UI-RESPONSIVENES and WINDOW_OPENING.
049: *
050: * @author lmartinek@netbeans.org
051: */
052: public class MeasureJ2EEActions {
053:
054: public static void main(java.lang.String[] args) {
055: junit.textui.TestRunner.run(suite());
056: }
057:
058: public static NbTestSuite suite() {
059: NbTestSuite suite = new NbTestSuite();
060:
061: if (System.getProperty("onlyDeployment") != null
062: && System.getProperty("onlyDeployment").equals("true")) {
063: suite.addTest(new Deploy("measureTime",
064: "Deploy Enterprise Application"));
065: } else {
066:
067: suite.addTest(new ExpandEJBNodesProjectsView(
068: "testExpandEjbProjectNode",
069: "Expand EJB Project node"));
070: suite
071: .addTest(new ExpandEJBNodesProjectsView(
072: "testExpandEjbNode",
073: "Expand Enterprise Beans node"));
074:
075: suite.addTest(new OpenJ2EEFiles("testOpeningJava",
076: "Open Java file"));
077: suite.addTest(new OpenJ2EEFiles("testOpeningSessionBean",
078: "Open Session Bean file"));
079: suite.addTest(new OpenJ2EEFiles("testOpeningEntityBean",
080: "Open Entity Bean file"));
081: suite.addTest(new OpenJ2EEFiles("testOpeningEjbJarXml",
082: "Open ejb-jar.xml file"));
083: suite.addTest(new OpenJ2EEFiles("testOpeningSunEjbJarXml",
084: "Open sun-ejb-jar.xml file"));
085: suite.addTest(new OpenJ2EEFiles(
086: "testOpeningApplicationXml",
087: "Open application.xml file"));
088: suite.addTest(new OpenJ2EEFiles(
089: "testOpeningSunApplicationXml",
090: "Open sun-application.xml file"));
091:
092: suite.addTest(new OpenJ2EEFilesWithOpenedEditor(
093: "testOpeningSessionBean",
094: "Open Session Bean file if Editor opened"));
095: suite.addTest(new OpenJ2EEFilesWithOpenedEditor(
096: "testOpeningEntityBean",
097: "Open Entity Bean file if Editor opened"));
098: suite.addTest(new OpenJ2EEFilesWithOpenedEditor(
099: "testOpeningEjbJarXml",
100: "Open ejb-jar.xml file if Editor opened"));
101: suite.addTest(new OpenJ2EEFilesWithOpenedEditor(
102: "testOpeningSunEjbJarXml",
103: "Open sun-ejb-jar.xml file if Editor opened"));
104: suite.addTest(new OpenJ2EEFilesWithOpenedEditor(
105: "testOpeningApplicationXml",
106: "Open application.xml file if Editor opened"));
107: suite.addTest(new OpenJ2EEFilesWithOpenedEditor(
108: "testOpeningSunApplicationXml",
109: "Open sun-application.xml file if Editor opened"));
110:
111: /* Wrong tests results, disabled util further investigation
112: suite.addTest(new MeasureSessionBeanAction("testAddBusinessMethod", "Add business method to SB"));
113: suite.addTest(new MeasureEntityBeanAction("testAddBusinessMethod", "Add business method to EB"));
114: suite.addTest(new MeasureEntityBeanAction("testAddFinderMethod", "Add finder method to EB"));
115: suite.addTest(new MeasureEntityBeanAction("testAddSelectMethod", "Add select method to EB"));
116: suite.addTest(new MeasureWebServiceAction("testAddOperation", "Add operation to WS"));
117:
118:
119: suite.addTest(new MeasureCallEjbAction("measureTime", "Call EJB in session bean"));
120: */
121: //suite.addTest(new Deploy("measureTime", "Deploy Enterprise Application"));
122: suite.addTest(new CreateNewFile("testCreateNewSessionBean",
123: "Create new session bean"));
124: suite.addTest(new CreateNewFile("testCreateNewEntityBean",
125: "Create new entity bean"));
126:
127: /* Unstable
128: suite.addTest(new CreateNewFile("testCreateNewWebService", "Create new web service"));
129: */
130: suite.addTest(new CreateJ2EEProject(
131: "testCreateEnterpriseApplicationProject",
132: "Create Enterprise Application projects"));
133: suite
134: .addTest(new CreateJ2EEProject(
135: "testCreateStandaloneEnterpriseApplicationProject",
136: "Create standalone Enterprise Application project"));
137: suite.addTest(new CreateJ2EEProject(
138: "testCreateEJBModuleProject",
139: "Create EJB Module project"));
140: }
141:
142: return suite;
143: }
144:
145: }
|