KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gui > MeasureEditor


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package gui;
21
22
23 import gui.action.JavaCompletionInJspEditor;
24 import gui.action.PageUpPageDownInJspEditor;
25 import gui.action.ToggleBreakpoint;
26 import org.netbeans.junit.NbTestCase;
27 import org.netbeans.junit.NbTestSuite;
28 import org.netbeans.test.web.performance.WebPerfTestSuite;
29
30 /**
31  * Measure UI-RESPONSIVENES and WINDOW_OPENING.
32  *
33  * @author mmirilovic@netbeans.org
34  */

35 public class MeasureEditor extends NbTestCase {
36     
37     private MeasureEditor(String JavaDoc name) {
38         super(name);
39     }
40     
41     public static void main(java.lang.String JavaDoc[] args) {
42         junit.textui.TestRunner.run(suite());
43     }
44     
45     public static NbTestSuite suite() {
46         WebPerfTestSuite suite = new WebPerfTestSuite();
47         //TODO fix unstable tests
48
//suite.addTest(new PasteInJspEditor("index.jsp", "measureTime",
49
// "Paste in the JSP Editor"));
50
//suite.addTest(new PasteInJspEditor("BigJSP.jsp", "measureTime",
51
// "Paste in the JSP Editor with large file"));
52
suite.addTest(new PageUpPageDownInJspEditor("Test.jsp", "measureTime",
53             "Press Page Up in the JSP Editor", true));
54         suite.addTest(new PageUpPageDownInJspEditor("Test.jsp", "measureTime",
55             "Press Page Down in the JSP Editor", false));
56         //suite.addTest(new PageUpPageDownInJspEditor("BigJSP.jsp", "measureTime",
57
// "Press Page Up in the JSP Editor with large file", true));
58
suite.addTest(new PageUpPageDownInJspEditor("BigJSP.jsp", "measureTime",
59             "Press Page Down in the JSP Editor with large file", false));
60         
61         //suite.addTest(new JavaCompletionInJspEditor("measureTime",
62
// "Invoke Code Completion dialog in JSP Editor"));
63

64         //XXX the painted region is not bigger then cursor region so it is filtered out
65
//XXX see: #68462
66
// suite.addTest(new TypingInJspEditor("Test.jsp", 12, "measureTime",
67
// "Type a character in JSP Editor"));
68
// suite.addTest(new TypingInJspEditor("BigJSP.jsp", 12, "measureTime",
69
// "Type a character in JSP Editor with large file"));
70

71         //suite.addTest(new TypingInJspEditor("BigJSP2.jsp", 12, "measureTime",
72
// "Type a character in JSP Editor at the beginning of another large file"));
73

74         //XXX the painted region is not bigger then cursor region so it is filtered out
75
//XXX see: #68462
76
// suite.addTest(new TypingInJspEditor("BigJSP2.jsp", 250, "measureTime",
77
// "Type a character in JSP Editor at the middle of another large file"));
78
// suite.addTest(new TypingInJspEditor("BigJSP2.jsp", 500, "measureTime",
79
// "Type a character in JSP Editor at the end of another large file"));
80

81         suite.addTest(new ToggleBreakpoint("Test.jsp", "measureTime",
82             "Toggle Breakpoint"));
83         
84         suite.addTest(new JavaCompletionInJspEditor("testScriptletCC",
85             "Invoke Code Completion dialog inside jsp scriptlet"));
86         suite.addTest(new JavaCompletionInJspEditor("testScriptletCC",
87             "Invoke Code Completion dialog inside jsp scriptlet II"));
88         suite.addTest(new JavaCompletionInJspEditor("testExpressionCC",
89             "Invoke Code Completion dialog inside jsp expression"));
90         suite.addTest(new JavaCompletionInJspEditor("testDeclarationCC",
91             "Invoke Code Completion dialog inside jsp declaration"));
92         suite.addTest(new JavaCompletionInJspEditor("testAllTags",
93             "Invoke Code Completion dialog after <"));
94         suite.addTest(new JavaCompletionInJspEditor("testTagAttribute1",
95             "Invoke Code Completion dialog after <%@page"));
96         suite.addTest(new JavaCompletionInJspEditor("testTagAttribute2",
97             "Invoke Code Completion dialog after <jsp:useBean"));
98         suite.addTest(new JavaCompletionInJspEditor("testAttributeValue2",
99             "Invoke Code Completion dialog after <%@include file="));
100         suite.addTest(new JavaCompletionInJspEditor("testAttributeValue3",
101             "Invoke Code Completion dialog after <jsp:useBean scope="));
102         suite.addTest(new JavaCompletionInJspEditor("testAttributeValue5",
103             "Invoke Code Completion dialog after <jsp:getProperty name=bean " +
104             "property="));
105         suite.addUnstableTest(new JavaCompletionInJspEditor("testAttributeValue6",
106             "Invoke Code Completion dialog after <%@taglib tagdir="));
107         suite.addTest(new JavaCompletionInJspEditor("testAttributeValue1",
108             "Invoke Code Completion dialog after <%@page import="));
109         suite.addTest(new JavaCompletionInJspEditor("testAttributeValue4",
110             "Invoke Code Completion dialog after <jsp:useBean class="));
111
112          return suite;
113     }
114     
115 }
116
Popular Tags