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-2007 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.menu.*;
045:
046: import org.netbeans.junit.NbTestSuite;
047:
048: /**
049: * Measure UI-RESPONSIVENES and WINDOW_OPENING.
050: *
051: * @author mmirilovic@netbeans.org
052: */
053: public class MeasureMenus {
054:
055: public static NbTestSuite suite() {
056: NbTestSuite suite = new NbTestSuite();
057:
058: suite.addTest(new MainMenu("testFileMenu", "File main menu"));
059: suite.addTest(new MainMenu("testEditMenu", "Edit main menu"));
060: suite.addTest(new MainMenu("testViewMenu", "View main menu"));
061: suite.addTest(new MainMenu("testNavigateMenu",
062: "Navigate main menu"));
063: suite
064: .addTest(new MainMenu("testSourceMenu",
065: "Source main menu"));
066: suite.addTest(new MainMenu("testBuildMenu", "Build main menu"));
067: suite.addTest(new MainMenu("testRunMenu", "Run main menu"));
068: suite.addTest(new MainMenu("testRefactoringMenu",
069: "Refactor main menu"));
070: suite.addTest(new MainMenu("testVersioningMenu",
071: "Versioning main menu"));
072: suite.addTest(new MainMenu("testProfileMenu",
073: "Profile main menu"));
074: suite
075: .addTest(new MainMenu("testWindowMenu",
076: "Window main menu"));
077: suite.addTest(new MainMenu("testHelpMenu", "Help main menu"));
078:
079: // recent prj menu is empty and disabled
080: // suite.addTest(new MainSubMenus("testFileOpenRecentProjectMenu", "File | Open Recent Project main menu"));
081: suite.addTest(new MainSubMenus("testFileSetMainProjectMenu",
082: "File | Set Main Project main menu"));
083: // suite.addTest(new MainSubMenus("testViewDocumentationIndicesMenu", "View | Documentation Indices main menu"));
084: suite.addTest(new MainSubMenus("testViewCodeFoldsMenu",
085: "View | Code Folds main menu"));
086: suite.addTest(new MainSubMenus("testViewEditorsMenu",
087: "View | Editors main menu"));
088: suite.addTest(new MainSubMenus("testViewToolbarsMenu",
089: "View | Toolbars main menu"));
090: suite.addTest(new MainSubMenus("testRunStackMenu",
091: "Run | Stack main menu"));
092: suite.addTest(new MainSubMenus("testRunRunFileMenu",
093: "Run | Run File main menu"));
094: suite.addTest(new MainSubMenus("testVersLocalHistoryMenu",
095: "Versioning | Local History main menu"));
096: suite.addTest(new MainSubMenus("testVersSubversionMenu",
097: "Versioning | Subversion main menu"));
098: suite.addTest(new MainSubMenus("testToolsI18nMenu",
099: "Tools | Internationalization main menu"));
100: suite.addTest(new MainSubMenus("testToolsPaletteMenu",
101: "Tools | Palette main menu"));
102: suite.addTest(new MainSubMenus("testWinDebuggingMenu",
103: "Window | Debugging main menu"));
104: suite.addTest(new MainSubMenus("testWinVersioningMenu",
105: "Window | Versioning main menu"));
106: suite.addTest(new MainSubMenus("testWinProfilingMenu",
107: "Window | Profiling main menu"));
108: // suite.addTest(new MainSubMenus("testHelpTutorials", "Help | Tutorials main menu"));
109: suite.addTest(new MainSubMenus("testHelpJavadoc",
110: "Help | Javadoc References main menu"));
111:
112: suite.addTest(new ProjectsViewPopupMenu(
113: "testProjectNodePopupMenuProjects",
114: "JSE Project node popup in Projects View"));
115: suite.addTest(new ProjectsViewPopupMenu(
116: "testSourcePackagesPopupMenuProjects",
117: "Source Packages node popup in Projects View"));
118: suite.addTest(new ProjectsViewPopupMenu(
119: "testTestPackagesPopupMenuProjects",
120: "Test Packages node popup in Projects View"));
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: "testTxtFilePopupMenuProjects",
129: "Txt file node popup in Projects View"));
130: suite.addTest(new ProjectsViewPopupMenu(
131: "testPropertiesFilePopupMenuProjects",
132: "Properties file node popup in Projects View"));
133: suite.addTest(new ProjectsViewPopupMenu(
134: "testXmlFilePopupMenuProjects",
135: "Xml file node popup in Projects View"));
136: //TODO no tomcat - see issue 101104 suite.addTest(new ProjectsViewPopupMenu("testJspFilePopupMenuProjects", "Jsp file node popup in Projects View"));
137: suite.addTest(new ProjectsViewPopupMenu(
138: "testNBProjectNodePopupMenuProjects",
139: "NB Project node popup in Projects View"));
140:
141: suite.addTest(new ProjectsViewSubMenus(
142: "testProjectNodeCVSsubmenu",
143: "CVS Submenu over projects node in Projects View"));
144: suite.addTest(new ProjectsViewSubMenus(
145: "testProjectNodeNewSubmenu",
146: "New Submenu over projects node in Projects View"));
147:
148: suite.addTest(new FilesViewPopupMenu(
149: "testProjectNodePopupMenuFiles",
150: "Project node popup in Files View"));
151: suite.addTest(new FilesViewPopupMenu(
152: "testPackagePopupMenuFiles",
153: "Package node popup in Files View"));
154: suite.addTest(new FilesViewPopupMenu(
155: "testbuildXmlFilePopupMenuFiles",
156: "build.xml file node popup in Files View"));
157:
158: suite.addTest(new ToolsMenu("testJavaToolsMenu",
159: "Tools main menu for Java node"));
160: suite.addTest(new ToolsMenu("testXmlToolsMenu",
161: "Tools main menu for XML node"));
162: suite.addTest(new ToolsMenu("testTxtToolsMenu",
163: "Tools main menu for Txt node"));
164:
165: suite.addTest(new SourceEditorPopupMenu("testPopupInTxt",
166: "Plain text Editor popup"));
167: suite.addTest(new SourceEditorPopupMenu("testPopupInXml",
168: "XML Editor popup"));
169: suite.addTest(new SourceEditorPopupMenu("testPopupOnMethod",
170: "Java Editor Method popup"));
171: suite.addTest(new SourceEditorPopupMenu("testPopupOnClassName",
172: "Java Editor Class Name popup"));
173:
174: suite.addTest(new RuntimeViewPopupMenu(
175: "testServerRegistryPopupMenuRuntime",
176: "Servers node popup in Services View"));
177: //TODO no tomcat - see issue 101104 suite.addTest(new RuntimeViewPopupMenu("testTomcatPopupMenuRuntime", "Bundled Tomcat node popup in Runtime View"));
178:
179: suite.addTest(new FormInspectorNodePopupMenu(
180: "testFormNodePopupMenuInspector",
181: "Form Inspector node popup"));
182:
183: /* TEMPORARY commented -> try to solve never finished tests
184: suite.addTest(new EditorDownButtonPopupMenu("testEditorDownButtonPopupMenu", "Editor Down Button popup"));
185: */
186: return suite;
187: }
188:
189: }
|