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 org.netbeans.junit.NbTestSuite;
045: import gui.action.*;
046: import gui.menu.*;
047: import gui.window.*;
048:
049: /**
050: * Measure UI-RESPONSIVENES and WINDOW_OPENING.
051: *
052: * @author mmirilovic@netbeans.org
053: */
054: public class MeasureJava {
055:
056: public static NbTestSuite suite() {
057: NbTestSuite suite = new NbTestSuite();
058:
059: suite.addTest(new ExpandNodesProjectsView(
060: "testExpandProjectNode", "Expand Project node"));
061: suite.addTest(new ExpandNodesProjectsView(
062: "testExpandSourcePackagesNode",
063: "Expand Source Packages node"));
064: suite.addTest(new ExpandNodesProjectsView(
065: "testExpandFolderWith50JavaFiles",
066: "Expand folder with 50 java files"));
067: suite.addTest(new ExpandNodesProjectsView(
068: "testExpandFolderWith100JavaFiles",
069: "Expand folder with 100 java files"));
070:
071: suite.addTest(new OpenFiles("testOpening20kBJavaFile",
072: "Open Java file (20kB)"));
073: suite.addTest(new OpenFilesWithOpenedEditor(
074: "testOpening20kBJavaFile",
075: "Open Java file (20kB) if Editor opened"));
076:
077: suite.addTest(new OpenJspFile("testOpening20kBJSPFile",
078: "Open JSP file"));
079: suite.addTest(new OpenJspFileWithOpenedEditor(
080: "testOpening20kBJSPFile",
081: "Open JSP file if Editor opened"));
082:
083: suite.addTest(new PasteInEditor("measureTime",
084: "Paste in the editor"));
085: suite.addTest(new PageUpPageDownInEditor("testPageUp",
086: "Press Page Up in the editor"));
087: suite.addTest(new PageUpPageDownInEditor("testPageDown",
088: "Press Page Down in the editor"));
089:
090: suite.addTest(new JavaCompletionInEditor("measureTime",
091: "Invoke Code Completion dialog in Editor"));
092: suite.addTest(new TypingInEditor("measureTime",
093: "Type a character in Editor"));
094:
095: suite.addTest(new CloseEditor("testClosing20kBJavaFile",
096: "Close Java file (20kB)"));
097:
098: suite.addTest(new CloseEditorModified(
099: "testClosingModifiedJavaFile",
100: "Close modified Java file"));
101:
102: suite.addTest(new SaveModifiedFile("testSaveModifiedJavaFile",
103: "Save modified Java file"));
104:
105: suite.addTest(new DeleteFolder(
106: "testDeleteFolderWith50JavaFiles",
107: "Delete folder with 50 java files"));
108: suite.addTest(new DeleteFolder(
109: "testDeleteFolderWith100JavaFiles",
110: "Delete folder with 100 java files"));
111:
112: suite.addTest(new CreateProject(
113: "testCreateJavaApplicationProject",
114: "Create Java Application project"));
115: suite.addTest(new CreateProject("testCreateJavaLibraryProject",
116: "Create Java Library project"));
117: suite.addTest(new CreateProject(
118: "testCreateWebApplicationProject",
119: "Create Web Application project"));
120:
121: suite.addTest(new ProjectsViewPopupMenu(
122: "testPackagePopupMenuProjects",
123: "Package node popup in Projects View"));
124: suite.addTest(new ProjectsViewPopupMenu(
125: "testJavaFilePopupMenuProjects",
126: "Java file node popup in Projects View"));
127: suite.addTest(new ProjectsViewPopupMenu(
128: "testJspFilePopupMenuProjects",
129: "Jsp file node popup in Projects View"));
130:
131: suite.addTest(new FilesViewPopupMenu(
132: "testProjectNodePopupMenuFiles",
133: "Project node popup in Files View"));
134: suite.addTest(new FilesViewPopupMenu(
135: "testPackagePopupMenuFiles",
136: "Package node popup in Files View"));
137:
138: suite.addTest(new ToolsMenu("testJavaToolsMenu",
139: "Tools main menu for Java node"));
140:
141: suite.addTest(new SourceEditorPopupMenu("testPopupOnMethod",
142: "Java Editor Method popup"));
143: suite.addTest(new SourceEditorPopupMenu("testPopupOnClassName",
144: "Java Editor Class Name popup"));
145:
146: suite
147: .addTest(new ToDoWindow("measureTime",
148: "To Do window open"));
149:
150: suite.addTest(new OverrideMethods("measureTime",
151: "Override and Implement Methods dialog open"));
152:
153: suite.addTest(new AutoCommentWindow("measureTime",
154: "Auto Comment Tool open"));
155:
156: suite.addTest(new RefactorFindUsagesDialog("measureTime",
157: "Refactor find usages dialog open"));
158: suite.addTest(new RefactorRenameDialog("measureTime",
159: "Refactor rename dialog open"));
160: suite.addTest(new RefactorMoveClassDialog("measureTime",
161: "Refactor move class dialog open"));
162:
163: suite.addTest(new RefactorFindUsages("measureTime",
164: "Refactor find usages"));
165:
166: return suite;
167: }
168:
169: }
|