Author: Roman Strobl & Max Sauer &
Petr Dvorak &
Jiri Prox
Version: 6.5
Introduction: This document serves as a test specification for editor module. It is focused on issues concerning editor's performance and on performance of related features.
Setup: Download and unzip a
sample project. Use a command line switch: "netbeans --userdir NewUserdirFolderXX" (where XX is a number) before each test case to start IDE with a fresh userdir.
Purpose: Test speed and issues caused by IDE initialization.
Setup: Start these tests
immediately after main window is opened
- Open File After Startup
- Start the IDE
- Open file (just a file, not a project) OpenFile.java from the sample project in IDE (use "File|Open File" from the main menu)
- Close the file
- EXPECTED RESULT: Editor should be opened within a reasonable time. It should be less than 3 sec. on usual workstation.
- Open Project
- Start IDE with a fresh userdir
- Open sample project
- Open file OpenFile.java
- Wait until file is opened, wait until scanning is finished (you can see the progress in right-bottom corner of IDE)
- EXPECTED RESULT:
- The selected project is opened in reasonable time.
- Scanning is started immediately after opening the project and should be performed in reasonable time.
- If IDE was installed from zip the JDK classes are scanned as well.
- The file can be edited when opened, syntax coloring for all elements is shown in reasonable time.
- Open Editing Options After Startup
- Start the IDE
- Try to open Java editor options from Tools|Options|Editor|Formatting immediately after startup
- Switch tabs in Editor's options
- EXPECTED RESULT: Options should be opened in reasonable time. Tabs should be switched in acceptable time.
Purpose: Tests speed of editing long files in editor
Setup: Prepare bigger file (PerformanceBigJava.java from sample project).
- Open Long Java File
- Open big java file in editor (e.g. from main menu : File|Open File)
- Wait for the file to be opened
- Close the file
- Open it again and keep it opened
- EXPECTED RESULT: Time of opening/closing file should be acceptable
- Working With Long Java File - No comments
- Use the same file from previous case, open it if it is not opened
- Try to scroll the file with scrollbars sliders
- Add Javadoc comment before the method "newMethod" - type e.g. /** My first javadoc comment */
- Test the speed of Enter key inside JavaDoc - press Enter when caret is just after "/**" that you typed in the previous step
- EXPECTED RESULT: All actions should be done in acceptable time.
- Working With Long Java File - No Errors
- Switch to the big java file (should be opened in editor from previous case)
- Type some new java elements to class, e.g. type Integer myInt = new Integer( and wait for completion
- Go through the code completion list
- Type 10); and press enter
- Go to the end of document (Ctrl+End)
- Go to the beginning of document (Ctrl+Home)
- Scroll the editor window - hold Ctrl+Up/Down longer then 4 seconds
- EXPECTED RESULT: All actions should be completed in a very short time
- Working With Long Java File - Errors
- Switch to the java file (should be opened in editor from previous case)
- Do some changes that corrupts the file - corrupt some fields and methods, for example
- Go to the end of document (Ctrl+End)
- Go to the beginning of document (Ctrl+Home)
- Scroll to the editor window - press Ctrl+Up/Down longer then 4 seconds
- Type new field to body of a class - type "Integer myInt2 = new Integer(10);"
- EXPECTED RESULT: All actions should be completed in a short time, errors should show up in editor almost instantly.
- Multiple Cloned Windows
- Switch to the big java file (should be opened in editor from previous case)
- Show popup menu over editor's tab and choose Clone Document item
- Undock the cloned document and dock it to the bottom of IDE, so that you create a "fake split view"
- Type some characters into original editor window
- Save file (Ctrl+S)
- Type some characters into cloned editor window
- Save file (Ctrl+S)
- EXPECTED RESULT:
- All cloned windows should have the same content as the original editor window.
- Characters should appear in both original and cloned windows when typing
- A flag indicating modified file is present in both tabs.
Purpose: Test speed of collapsing/expanding code folds.
Setup: Open file
performanceFolds.java
- Collapse and expand single fold
- Place the caret above the "myMethod" (like this: public void my|Method...)
- Press Ctrl+'-' to collapse a single code fold
- Press Ctrl+'+' to expand a single code fold
- EXPECTED RESULT: A single fold should be expanded and collapsed in acceptable time
- Collapse and expand all folds
- Collapse the code fold by method myMethod by pressing Ctrl+Shift+'-'
- Expand the fold using Ctrl+Shift+'+' shortcut
- EXPECTED RESULT: All code folds should be expanded and collapsed in acceptable time