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.action.ExpandNodesWebProjectsView;
045: import gui.action.JavaCompletionInJspEditor;
046: import gui.action.PageUpPageDownInJspEditor;
047: import gui.action.PasteInJspEditor;
048: import gui.action.ToggleBreakpoint;
049: import gui.action.TypingInJspEditor;
050: import org.netbeans.junit.NbTestCase;
051: import org.netbeans.junit.NbTestSuite;
052:
053: /**
054: * Measure UI-RESPONSIVENES and WINDOW_OPENING.
055: *
056: * @author mmirilovic@netbeans.org
057: */
058: public class MeasureWebActions extends NbTestCase {
059:
060: private MeasureWebActions(String name) {
061: super (name);
062: }
063:
064: public static void main(java.lang.String[] args) {
065: junit.textui.TestRunner.run(suite());
066: }
067:
068: public static NbTestSuite suite() {
069: NbTestSuite suite = new NbTestSuite();
070: suite.addTest(new PasteInJspEditor("index.jsp", "measureTime",
071: "Paste in the JSP Editor"));
072: suite.addTest(new PasteInJspEditor("BigJSP.jsp", "measureTime",
073: "Paste in the JSP Editor with large file"));
074: suite
075: .addTest(new PageUpPageDownInJspEditor("Test.jsp",
076: "measureTime",
077: "Press Page Up in the JSP Editor", true));
078: suite.addTest(new PageUpPageDownInJspEditor("Test.jsp",
079: "measureTime", "Press Page Down in the JSP Editor",
080: false));
081: suite
082: .addTest(new PageUpPageDownInJspEditor(
083: "BigJSP.jsp",
084: "measureTime",
085: "Press Page Up in the JSP Editor with large file",
086: true));
087: suite.addTest(new PageUpPageDownInJspEditor("BigJSP.jsp",
088: "measureTime",
089: "Press Page Down in the JSP Editor with large file",
090: false));
091: suite.addTest(new TypingInJspEditor("Test.jsp", 12,
092: "measureTime", "Type a character in JSP Editor"));
093: suite.addTest(new TypingInJspEditor("BigJSP.jsp", 12,
094: "measureTime",
095: "Type a character in JSP Editor with large file"));
096: suite
097: .addTest(new TypingInJspEditor("BigJSP2.jsp", 12,
098: "measureTime",
099: "Type a character in JSP Editor at the beginning of another large file"));
100: suite
101: .addTest(new TypingInJspEditor("BigJSP2.jsp", 250,
102: "measureTime",
103: "Type a character in JSP Editor at the middle of another large file"));
104: suite
105: .addTest(new TypingInJspEditor("BigJSP2.jsp", 500,
106: "measureTime",
107: "Type a character in JSP Editor at the end of another large file"));
108: suite.addTest(new ToggleBreakpoint("Test.jsp", "measureTime",
109: "Toggle Breakpoint"));
110: suite.addTest(new JavaCompletionInJspEditor("testScriptletCC",
111: "Invoke Code Completion dialog inside jsp scriptlet"));
112: suite
113: .addTest(new JavaCompletionInJspEditor(
114: "testScriptletCC",
115: "Invoke Code Completion dialog inside jsp scriptlet II"));
116: suite.addTest(new JavaCompletionInJspEditor("testExpressionCC",
117: "Invoke Code Completion dialog inside jsp expression"));
118: suite
119: .addTest(new JavaCompletionInJspEditor(
120: "testDeclarationCC",
121: "Invoke Code Completion dialog inside jsp declaration"));
122: suite.addTest(new JavaCompletionInJspEditor("testAllTags",
123: "Invoke Code Completion dialog after <"));
124: suite.addTest(new JavaCompletionInJspEditor(
125: "testTagAttribute1",
126: "Invoke Code Completion dialog after <%@page"));
127: suite.addTest(new JavaCompletionInJspEditor(
128: "testTagAttribute2",
129: "Invoke Code Completion dialog after <jsp:useBean"));
130: suite
131: .addTest(new JavaCompletionInJspEditor(
132: "testAttributeValue2",
133: "Invoke Code Completion dialog after <%@include file="));
134: suite
135: .addTest(new JavaCompletionInJspEditor(
136: "testAttributeValue3",
137: "Invoke Code Completion dialog after <jsp:useBean scope="));
138: suite.addTest(new JavaCompletionInJspEditor(
139: "testAttributeValue5",
140: "Invoke Code Completion dialog after <jsp:getProperty name=bean "
141: + "property="));
142: suite
143: .addTest(new JavaCompletionInJspEditor(
144: "testAttributeValue6",
145: "Invoke Code Completion dialog after <%@taglib tagdir="));
146: suite.addTest(new JavaCompletionInJspEditor(
147: "testAttributeValue1",
148: "Invoke Code Completion dialog after <%@page import="));
149: suite
150: .addTest(new JavaCompletionInJspEditor(
151: "testAttributeValue4",
152: "Invoke Code Completion dialog after <jsp:useBean class="));
153: suite.addTest(new ExpandNodesWebProjectsView(
154: "testExpandProjectNode", "Expand Project node"));
155: suite.addTest(new ExpandNodesWebProjectsView(
156: "testExpandSourcePackagesNode",
157: "Expand Source Packages node"));
158: suite.addTest(new ExpandNodesWebProjectsView(
159: "testExpandFolderWith50JspFiles",
160: "Expand folder with 50 JSP files"));
161: suite.addTest(new ExpandNodesWebProjectsView(
162: "testExpandFolderWith100JspFiles",
163: "Expand folder with 100 JSP files"));
164:
165: return suite;
166: }
167:
168: }
|