Home  ·  Search  ·  A to Z
Developer Platform Group QE - Prague Teams

Search SunWeb
Advanced Search
Developer Platform Group QE
Home Page
QA Test Tools
QE Metrics
 
Prague Teams
+ Platform Tools QE
+ CDP-QE
+ Documents
~ Modules
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
+ Releases
+ Test Tools

DPG QSE > Prague DPG QE > Modules

Editor Test Specification

Author: Roman Strobl
Version: Final
Last update: 24.02.2005
Introduction: This document serves as a test specification for editor module.
Comment:
I have created an archive with all samples used in this document. You can easily unzip it and use it. Please note that some files in this archive cannot be compiled, that is ok, because some tests require special java files.

Links to samples in tables in this document are links to html files, the source files are in the editor_tests.tar.gz.

The sign "->" is used frequently in this document. This means that something is expected, e.g. "-> dialog with title Question" has the same meaning as "Wait for the dialog with the title Question". If this dialog doesn't appeared fill an Issue in Issuezilla.

If you find some differences between results described in this document and your results then please fill an issue or send me an email.

Table of Contents

Test suite 1: Startup Test

Purpose: Test speed and issues appeared by inicialization.
Setup: IDE should be started with new* userdir (first start) for each test from this suite. Start these tests immediately after main window is opened.

#Test caseDescription
1Open Editor After Startup
1. Open file OpenFile.java in IDE. Use main menu File|Open (shortcut Ctrl-o).
RESULT: Editor should be opened within a reasonable time. It should be less than 2.5 sec. on usual workstation.
2Open Editing Options After Startup
1. Start the IDE.
2. Immediatelly after startup try to open Java editor settings options from Tools|Options|Editing|Editor Settings.
RESULT: Options should be opened with reasonable speed.
Teardown: Close IDE.

*How to start IDE with a new userdir? Go to netbeans\bin directory and run the IDE with switch -userdir. Increase the number in name of user_directory.
cd ...\netbeans\bin
.\runide.sh -userdir userdir_directory1
(Change all backslash to slash on unix platforms).



Test suite 2: Opening Editor

Purpose: This suite checks if is possible open files in Editor. There are more possibilities how to open file. All possibilities are described below.
Setup: Started IDE with fresh userdir. Use files from editor_tests.tar.gz archive.

#Test caseDescription
1Open External File
1. Open external file from main menu action File|Open File....
RESULT: File must be opened in editor.
There are a lot of limitations, because the file is not part of any project. (no classpath is set)

These features must work:
- Syntax coloring

- Code Completion (if JDK sources are available - since promo_e)
- Code Folding (since promo_e)
These features won't work:
- Code Completion (when JDK sources are missing)
- Compile/run the class
2Open File from Project (Not Opened)
1. Open OpenFileInProject.java with File|Open File... menu. This class can be found in editor_tests.tar.gz archive under project_test/src/ directory.
RESULT: File must be open in editor and all java-related stuff must work. (Code Completion, Code Folding, compilation, runing, etc.)
This action does not open the project where the class belongs to.
3File Open and Close Actions from Explorer
1. Expand default package in Project view and double click on the OpenFileInProject.java source file.
2. Don't modify this file in editor.
3. Show popup menu over editor and choose the Close All Documents item.
RESULT: The selected file should be opened in editor window and then closed without any dialogs.
4File Open and Close Actions from Main Menu
1. Select main menu File|Open File and find the OpenFileInProject.java file used in previous case.
2. Open it.
3. Don't modify the opened file.
4. Show popup menu over Editor and then choose menu item Close All Documents.
RESULT: The selected file should be opened in Editor window and then closed without any dialogs.
5File Open and Close Actions for a Modified File (Save)
1. Open the same file as in previous cases.
2. Modify it in source editor window. Add some characters into the comment, because the file will be used in next testcases.
3. -> Modify flag - Small star must be displayed next to name of file in tab of editor.
4. Close file with the X on tab of editor -> appears dialog with title "Question".
5. Choose Save.
RESULT: Modify flag must appeared in the second step. File should be saved and editor closed. Check the file on harddisk.
6File Open and Close Actions for a Modified File (Discard)
1. Open the sample file.
2. Modify it in source editor window. Type some characters in comment, because the file will be used in next tests and it should be compilable.
3. Close the sample file.
4. Choose Discard.
RESULT: Editor should be closed. All changes will be lost. Check the file on harddisk.
7File Open and Close Actions for a Modified File (Cancel)
1. Open the sample file.
2. Modify it in source editor window.
3. Close the sample file.
4. Choose Cancel.
RESULT: Nothing happens. File remains opened and it is not saved. A star next to file name must be present in editor tab.
8File Open on Selected Position - Constructor
1. Expand "OpenFileInProject" file node to see all constructors.
2. Double click on the "OpenFileInExplorer()" constructor.
RESULT: File must be opened and caret (cursor) must be moved to the beginning of selected constructor (in front of the public keyword). The selected constructor should be cca. in the middle of editor window (only in a large file where it is possible to scroll).
9File Open on Selected Position - Method
1. Expand Methods node to see all methods.
2. Double click on the main method.
RESULT: File must be opened and caret must be moved to the beginning of selected method. Selected method should be cca. in the middle of editor window (if it is possible).
10File Open on Selected Position - Fields
1. Expand the Fields node to see all fields.
2. Double click on the field title.
RESULT: File must be opened and caret must be moved to the beginning of selected field. The selected field should be cca in the middle of editor window (if it is possible).
Teardown:



Test suite 3: Internationalization

Purpose: Checks editor support for national characters.
Setup: National support in OS set up (fonts, keyboard, etc.), a file opened in editor.

#Test caseDescription
1National Keyboards
1. Create a new java file (File|New File...).
2. Switch to another national keyboard different from English e.g. to Czech or German. It might depend on your OS.
3. Type some non-English characters.
RESULT: All characters in chosen languages should be displayed properly.
2Default Encoding
1. Set the default encoding option in Tools|Options -> Editing|Java Sources -> Expert properties -> Default Encoding to other encoding than UTF-8 (e.g. iso-8859-2, iso-8859-1, etc.).
2. Open a java source file with national characters.
RESULT: All characters in chosen language should be displayed properly.
No Image
3I18N Undo Action
1. Select part of the text with national characters and invoke Cut action (Ctrl+X).
2. Try to invoke the Undo action (Ctrl+Z).
RESULT: All changes should be correctly undone.
4Clipboard with localized characters
1. Copy any localized string from other application.
2. Paste this string into IDE's editor.
3. Copy the localized string in the IDE.
4. Paste it back to the other application.
RESULT: Text should be propertly copied and displayed.
Teardown:

How to determine the encoding on your system?
Steps:
1. You must run the IDE from system console (cmd on windows)
2. Look at the output from IDE, there are a lot of information. The encoding is underlined in the begining of the output. You can see that I use UTF-8. no image

Test suite 4: Keyboard & Shortcuts

Purpose: Tests editor shortcuts (global related to editor and local in editor)
Info:
There are three type of keyboard shortcuts in the IDE:
1. Shortcuts from the Tools|Keyboard shortcuts menu. These are global IDE shortcuts.They should be used in any part of the IDE (explorer, editor, output window, etc.).
2. Shortcuts from editor options Tools|Options -> Editing|Editor Settings -> Global Key Bindings. These are global editor shorcuts. It is possible use they only in editor window.
3. Shortcuts for each type of editable file Tools|Options -> Editing|Editor Settings|Java Editor -> Key Bindings (Settings are in CSS, HTML, Plain, Java, JSP, Properties, XML and DTD editors). It's possible to use these shortcuts only in adequate types of editor.
Setup: Opened the KeyboardSmall.java or KeyboardBig.java file in editor.

#Test caseDescription
1Basic Keyboard Actions
1. Caret (Cursor) moves - move focus to editor and push these keys:
- up, down, left, right arrows - while moving the caret right then at EOL the caret jumps to the beginning of next row, it works backwards too. While moving up/down if the previous/next row is shorter then the caret jumps to EOL.
- move caret to the beginning of a row :
  • before the first char in current line (Home key),
  • to begin of the current line (once more Home key)
  • and again ... The Home key move the caret between these two (above mentioned) possitions
- end of current line (End),
- begin of previous/next word Ctrl-Left/Right Arrow
- to begin/end of file Ctrl-Home and Ctrl-End
2. Scrolling
Small files have no scrollbar -> it is not possible to scroll them. Big files with more lines or/and more columns have scrollbar(s).
- Scroll with Ctrl-Up/Down arrow -> The caret stay on the same row and page is scrolled.
- Scroll with PgUp/PgDown -> caret is moved to first/last row in editor's visible area and next hit of PgUp/PgDown scroll one page, Ctrl-Home/End -> Caret is moved to the beginning/end of the file and the content is scrolled.
3. Select text - Shift-Arrows (char by char), Ctrl-Shift-Arrows (words), Shift-PgUp/Down (pages), Ctrl-A entire content of file
4. Insertion mode - move caret in front of any word and type some charackters. -> characters are inserted (this mode is activated by default).
5. Rewrite mode - move caret in front of any word, change mode to rewrite (Insert key) and type some characters -> characters are rewritten.
RESULT: Results are clear from steps.
2Undo Redo Actions
1. Try to use Undo/Redo Ctrl-Z/Ctrl-Y. It should not be possible to do it because no changes were done previously. Check if these menu items are disabled, too.
2. Perform any changes in the file.
3. Use the Undo action once (Ctrl+Z).
4. Use the Redo action once (use icon in toolbar).
5. Type another characters.
6. Use Undo action as long as possible - so that opened file has the same content as previously saved version.
RESULT: Changes file flag (small star next to name of the file in tabs) disappeared and undo properly clear all typed changes (characters).
3General Keyboard Shortcuts
1. Try clipboard actions Copy Ctrl+C, Cut Ctrl+X, Paste Ctrl+V, Delete Delete.
2. Try actions Find Ctrl+F , Go to line Ctrl+G, Replace Ctrl+H and Close Ctrl+F4.
RESULT: Actions must be performed succesfully.
4Editor's Global Key Bindings
1. Go to Tools|Options -> Editing|Editor Settings -> Key Bindings -> ... and test all keybinding from this dialog.
RESULT: All key bindings should execute associated actions and do what is expected.
5Changing Editor's Global Keybinding
1. Open editor's global shortcuts e.g. for java editor from the Tools|Options menu.
2. In Options window select node Editing|Editor Settings
3. Choose Key Bindings (...).
4. Try to add some new keybindings for actions and test them in editor.
5. Try to remove some keybindings and test them in editor.
6. Restart the IDE.
7. Perform the same tests after IDE restart.
RESULT: The keybindings should work if they were added. They should not work if they were removed.
6Editor's Local Key Bindings
1. Go to Tools|Options -> Editing|Editor Settings|(Plain Text, HTML, Java) Editor -> Key Bindings -> ... and test all keybindings from this dialog.
RESULT: All key bindings should be properly executed and do what is expected.
7Changing Editor's Local Keybinding
1. Open editor's local shortcuts e.g. for Java editor from the Tools|Options menu.
2. Expand node Editing|Editor Settings.
3. Choose Java Editor.
4. Press Key Bindings (...) in the dialog.
5. Try to add some shortcuts for individual actions and test them in editor.
6. Try to remove some of the shortcuts and test them in editor.
7. Restart the IDE.
8. Perform the same tests after IDE restart.
RESULT: The keybindings should work if they were added. They should not work if they were removed.
Teardown:



Test suite 5: Mouse Test

Purpose: Tests basic mouse functionality.
Setup: Opened file MouseSmall.java or MouseBig.java in editor

#Test caseDescription
1Mouse Click
1. Change focus to another window different from editor window.
2. Click to editor window at any position.
3. Try to click to different places in editor.
RESULT: Focus is changed to editor and cursor should be positioned at the clicked place or at end of line you've clicked.
2Mouse Click after EOF
1. Click on the first row in a file -> caret should move to this place.
2. Click behind the end of file to an empty area of editor.
RESULT: Caret must move to last line in editor. Caret is placed at EOL or at the column you've clicked (if it exists).
3Mouse Double Click
1. Move mouse over any word in editor window.
2. Double click quickly.
3. Double click in front of the first character of the word.
4. Double click behind last char of the word.
RESULT: Words must be selected (highlighted) and cursor positioned at end of selected words. If you double click between words and separator, the the first positioned (word or separator) will be selected.
4Mouse Triple Click
1. Quickly triple click on any line in editor.
RESULT: Whole line you've clicked on should be selected.
5Mouse Wheel (JDK Version >= 1.4.0)
1. Try to use the mouse wheel in editor (focus should be in editor window).
RESULT: Document in editor should scroll up or down.
Teardown:



Test suite 6: Java Editor During Actions

Purpose: Checks actions on the source file.
Setup: Opened any java file without errors in source (compilable).

#Test caseDescription
1Compile Source
1. Make changes in editor - type commands to aprropriate places, e.g. System.out.println("xx") to any method in source.
2. Compile source by pressing F9 or from menu.
RESULT: Source should be saved and compiled with changes made.
2Compile Source With Error
1. Make changes in editor - e.g. write "xx" to any place in the source file.
2. Compile source by pressing F9 or from menu.
RESULT: Source should be saved and error(s) should be displayed in the output window.
3Execute Action
1. Make some changes in editor.
2. Call Execute action by pressing F6 or from menu.
RESULT: Source code should be saved, compiled and then executed.
4Debugging
1. Make changes in editor - type any commands to appropriate places.
2. Call debugging action by pressing Alt+F5 or from menu.
RESULT: Source should be saved, compiled and debbugged.
Teardown:



Test suite 7: Find Test

Purpose: This suite tests the find dialog.
Setup: Opened any file in editor and focus should be on editor window.

#Test caseDescription
1Find Dialog Open Close
1. Open find dialog from main menu (Alt+E|F or with mouse).
2. Press the Esc key.
3. Open find dialog (Ctrl+F).
4. Click on the Help button and wait till help is opened.
5. Close help (use small cross on window).
6. Click on the Close button.
RESULT: Dialog must be opened and then closed. The Help window must by closed, too.
2Find Selection Repeated
1. Select a piece of text, and invoke find dialog (Ctrl+F).
2. Immediately press "Find" button.
3. Select another piece of text, invoke find dialog (Ctrl+F).
4. Immediately press "Find" button.
RESULT: When find dialog is opened, the "Find What" input line should contain selected piece of code. After pressing "Find" button, appropriate text should be found.
3Find Dialog Combo Box
1. Perform three searches (for three different words/texts).
2. Invoke the find dialog (Ctrl+F).
3. The line "Find What:" is a combo box. Try to use it.
4. When you select a word from combo box, perform "Find" on it.
RESULT: The combo box should contain all texts you were searching for. These texts should be fully functional, including searching for these texts.
4Find - Unselected All Options
1. Open find dialog.
2. Unselect all checkboxes in the dialog.
3. Type any word which editor contained.
4. Press the Find button.
RESULT: First occurrence of the word should be found and highlighted. Status bar should contain target coordinates and cursor should be positioned on the end of found word.
5No Find - Unselected All Options
1. Open find dialog.
2. Unselect all checkboxes in the dialog.
3. Type some word which is not contained in editor (e.g. foo).
4. Press the Find button.
RESULT: Status line of editor should have red background and should contain text 'foo' not found.
6Find - Option Match Case
1. Open find dialog (in the same file as previous case).
2. Select only Match Case.
3. Type a word which editor contains, but change case in the searched word e.g. use Private (we are serching for "private" modifier in source file) -> message "Private" not found in status bar.
4. Open the dialog anyway and type precisly the word private.
5. Press the Find button.
RESULT: Word "private" should be found.
7Find - Option Match Whole Words Only
1. Open find dialog.
2. Unselect all checkboxes.
3. Select Match Whole Words Only.
4. Type word which editor contained (this word should be typed 1. from begining of a row and separated witch space or 2. separated witch space character on both sides or 3. space in front of word and ended with end of row).
5. Press the Find button.
RESULT: First occurance of the word should be found so that it fullfills all three conditions from action 4.
8Find - Option Highlight Search
1. Open find dialog.
2. Unselect all checkboxes.
3. Select only Highlight Search.
4. Type any word which exists in editor.
5. Press the Find button.
RESULT: All occurrences of searched word should be highlighted.
9Find - Option Incremental Search
1. Open find dialog.
2. Unselect all checkboxes.
3. Select only Incremental Search.
4. Type any word which exists in editor - durring typing editor tries to find strings (it is jumping to strings) and highlights them.
5. Press the Find button.
RESULT: Editor should jump to string which you wrote to the dialog and such strings should be highlighted.
10Find - Option Backward Search
1. Open find dialog.
2. Unselect all checkboxes.
3. Select only Backward Search.
4. Type any word which contained editor, the word should be positioned in front of the cursor.
5. Press the Find button.
RESULT: The first occurrence in backward direction should be found.
11Find - Option Wrap Search
1. Open find dialog.
2. Unselect all checkboxes.
3. Select Wrap Search only.
4. Type any word which exists in editor, all matched words should be in front of the cursor.
5. Press the Find button.
RESULT: First occurrence of the searched work should be found in editor. The following messages should be displayed: "End of document reached, continuing search from beginning.".
12Find - Next/Previous
1. Open the find dialog.
2. Unselect all checkboxes.
3. Type a word (the word should occur in the editor 2-3 times).
4. Press the Find button.
5. Try pressing "Find Next" (F3) and "Find Previous" (Shift+F3).
RESULT: The searched word should be found forwards and backwards from current position.
13Find - Selection Without Dialog
1. Select a word in editor (the word should occur in the editor 2-3 times).
2. Use "Find Selection" (only shortcut Ctrl-F3, no menu).
Caution: this shortcuts are mapped to system in Linux/KDE. You must change the shortcut in IDE or in OS if this is your case.
3. Find Next (F3).
4. Try search for a different word (Ctrl-F3 on different word).
RESULT: Each selected word must be searched.(without dialog)
14Find - Search Selected Text
1. Select several lines of text in which you will perform search.
2. Open find dialog, check "search in selection" and search for some word which can be found in the selection.
3. Repeat the search to find all occurences of the word in selected text.
RESULT: All occurrences of the word are found inside of the selected text. All words which are found are highlighted and status bar contains a message about successfull search. If the word exists outside selection too, it is not found.
15Find - Search Selected Text Negative
1. Select several lines of text in which you will perform search.
2. Open find dialog, check "find in selection" and try to search for several words which are not inside of the selection but exist somewhere in the source code.
RESULT: None of the words outside selection should be found.
16Find - Regular Expressions - Simple
1. Open file testRegexpSimple.java from samples.
2. Open find dialog, select regexp search and search for expression: [aA][hH][oO][jJ][0-9]{1,3}
RESULT: There are lines in the file with "ok" on the right side. Strings on these lines should be found. Lines with "not ok" on right side should be skipped.
17Find - Regular Expressions - Complex
1. Open file testRegexpComplex.java from samples.
2. Open find dialog, select regexp search and search for expression: a?B*c{2}[dD]e{1,}\.F{1,2}\s[^g]
RESULT: There are lines in the file with "ok" on the right side. Strings on these lines should be found. Lines with "not ok" on right side should be skipped.
18Find - Text Transfer Between Projects And Editor
1. Try to search for a string which surely exists in your project in the project tab.
2. Click on one of the files which were found in results.
3. Try to perform find in editor.
RESULT: The field "find what" in find dialog should contain the string which was searched during step 1 - among project files. Check that history of search dialogs is shared.
Teardown:



Test suite 8: Replace Test

Purpose: This suite tests the replace dialog.
Setup: Opened any file in editor

#Test caseDescription
1Replace Dialog Open
1. Open replace dialog (Ctrl+H, Alt+E|E or with mouse).
2. Click on the Help button and wait till help is opened.
3. Close help (use small cross on window).
4. Click on the Close button.
RESULT: Replace dialog and it's help should be opened and closed.
2Replace Selection Repeated
1. Select a piece of text, and invoke replace dialog (Ctrl+H).
2. Immediately press "Find" or "Replace" button.
3. Select another piece of text, invoke replace dialog (Ctrl+H).
4. Immediately press "Find" or "Replace" button.
RESULT: When replace dialog is opened, the "Find What" input line should contain selected piece of code. After pressing "Find" (resp. "Replace") button, approriate text should be found (resp. replaced).
3Replace Dialog Combo Box
1. Perform three replacements (for three different words/texts).
2. Invoke the replace dialog (Ctrl+H).
3. The lines "Find What:" and "Replace With:" are combo boxes. Try to use them.
4. When you select words from combo boxes, perform "Replace" on it.
RESULT: The combo box in line "Find What:" should contain all texts you were searching for. The combo box in line "Replace With:" should contain all texts by which you were replacing found texts. These texts should be fully functional, including searching for and replacing these texts.
4Replace - Options
1. Open the replace dialog.
2. Use the find - options cases (Find suite) to test replace dialog options (Match Case, Section Only, etc.).
RESULT: Results should be the same, in case of Replace action the defined word should be or should not be replaced (depends on selected options).
5Replace All
1. Select a word in editor. This word should occur in the editor 2-3 times.
2. Open Replace dialog (Ctrl+H).
3. Type some word to Replace With line.
4. Press Replace All button.
5. Close Replace dialog.
RESULT: All strings equal to selected word should be replaced by word typed in Replace With line (depends on options setting - case sensitivity, etc.) .
6Replace in Selection Only
1. Select several lines of text in which you will perform replace.
2. Open replace dialog, check "search in selection" and replace some word which can be found in the selection.
3. Repeat the action to replace all occurences of the word in selected text.
RESULT: All occurrences of the word are found inside of the selected text. All words which are found are replaced and status bar contains a message about successfull search. If the word exists outside selection too, it is not found and thus it is not replaced.
Teardown:



Test suite 9: Print Test

Purpose: Test printing from the IDE.
Setup: Printing in your OS should work properly. A file is opened in editor.

#Test caseDescription
1Print From Editor
1. Switch focus to editor (click to editor window).
2. Print the opened file. Use the keyboard shortcut Ctrl+P.
RESULT: Printing dialog should be opened. This dialog is system dependent. Confirm the dialog and check that your file is printed properly.
2Print From Explorer
1. Select more files in explorer (use Ctrl+mouse click to appropriate files).
2. Call printing from main menu (Alt+F P or with mouse pointer).
RESULT: Printing dialog should be opened. This dialog is system dependent. Confirm the dialog and check that your files are printed properly.
3Print Java File Change Option Fonts And Colors
1. Change font and color for some java items in options (From main menu Tools|Options - IDE Configurations|System|Print Settings|Java Editor -> in property sheet item "Print Fonts and Colors").
2. Open any java file in editor.
3. Invoke print action - use Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
4Print Java File Change Option Show Line Numbers
1. Change "Show line numbers" option to false in options window (main menu Tools|Options - IDE Configurations|System|Print Settings|Java Editor -> in property sheet item "Print Line Numbers").
2. Open any java file in editor.
3. Invoke print action - use Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
5Change Property Line Ascent Correction
1. Open any file in editor.
2. Change property "Line Ascent Correction" (From main menu Tools|Options - IDE Configurations|System|Print Settings -> in property sheet change item "Line Ascent Correction").
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
6Change Property Page Footer Aligment
1. Open any file in editor.
2. Change the "Page Footer Aligment" property.
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
7Change Property Page Footer Font
1. Open any file in editor.
2. Change the "Page Footer Font" property.
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
8Change Property Page Footer Format
1. Open any file in editor
2. Change property "Page Footer Format"
3. Print edited file (Ctrl+P)
4. Confirm print dialog
RESULT: The page is printed. All changes in options should be visible on printed page.
9Change Property Page Header Aligment
1. Open any file in editor.
2. Change the "Page Header Aligment" property.
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
10Change Property Page Header Font
1. Open any file in editor.
2. Change "Page Header Font" property.
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
11Change Property Page Header Format
1. Open any file in editor.
2. Change the "Page Header Format" property.
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
12Change Property Wrap Lines
1. Open any file in editor.
2. Change the "Wrap Lines" property.
3. Print edited file by Ctrl+P.
4. Confirm the print dialog.
RESULT: The page is printed. All changes in options should be visible on printed page.
Teardown:



Test suite 10: Performance

Purpose: Tests speed of windows redrawing and speed of typing characters in editor.
Setup: Prepared bigger files for each file type (text, html, java 350kB).

#Test caseDescription
1Open Long Java File
1. Open big java file in editor (e.g. from main menu : File|Open File), file should be without syntax errors.
2. Wait for the file to open.
3. Close the file.
4. Open it again and keep it open.
RESULT: Time of opening/closing file should be less than 10 sec (from action open to last reactions of all IDE components).
2Working With Long Java File - No comments
1. Use the same file from previous case. Open it.
2. Try scroll the file with scrollbars sliders.
3. Add Javadoc comment before the method "newMethod". Type e.g. /** My first javadoc comment */.
RESULT: All actions should be done in acceptable time.
3Working With Long Java File - No Errors
1. Switch to the big java file (should be opened in editor from previous case).
2. Type some new java elements to class, e.g. type "Integer myInt = new Interger(" and wait to completion is appeared (type without quotes).
3. Type "10);" and press enter.
4. Go to the end of document (Ctrl+End).
5. Go to the beginning of document (Ctrl+Home).
6. Scroll the editor window - press Ctrl+down arrow longer then 4 seconds.
RESULT: All actions should be completed in short time (less than 4 sec.)
4Working With Long Java File - Errors
1. Switch to the java file (should be opened in editor from previous case).
2. Do some changes, corrupt some fields and methods.
3. Go to the end of document (Ctrl+End).
4. Go to the beginning of document (Ctrl+Home).
5. Scroll to the editor window - press Ctrl+down arrow longer then 4 seconds.
6. Type new field to body of a class - type "Integer myInt2 = new Integer(10);".
RESULT: All actions should be completed in short time (less than 4 seconds)
5Windows Redrawing
1. Switch to Html, Java and Text files (they should be opened in editor from previous case) and with each of them:
2. Iconize editor and wait for iconize.
3. Deiconize editor window and wait till all componets of NetBeans are corectly redrawed.
4. Maximize editor window and wait till all componets of NetBeans are corectly redrawn.
5. Demaximize editor window and wait till all componets of NetBeans are corectly redrawn.
6. Drag editor title bar with mouse and move the editor window to another place.
RESULT: All actions should be completed in short time (less than 4 seconds). All other windows should be redrawn in very short time (less then 1 second) while the editor is moved. All NetBeans windows should be during all actions on the same position as before without flashing.
6Multiple Cloned Windows
1. Switch to Html, Java and Text files (should be opened in editor from previous case) and with each of them do:
2. Show popup menu over editor content and choose "Clone View" item.
3. Type some characters into original editor window.
4. Save file (Ctrl+S).
5. Type some characters into cloned editor window.
6. Save file (Ctrl+S).
RESULT: All cloned windows should have the same content as the original editor window. When typing the characters should appear in both original and cloned windows.
Teardown:



Test suite 11: Clipboard

Purpose: Tests storing and restoring from clipboard.
Setup: Two files opened in editor.

#Test caseDescription
1Mouse Middle button insertion from IDE (Unix only)
1. Open two files in editor.
2. Select some text in editor (this automatically add the selected text in clipboard ).
3. Select another text in this file.
4. Switch to next opened file.
5. Press the middle mouse button.
RESULT: Selected text should be inserted to current cursor position for JDK version 1.4.0 and higher. For older JDKs it should paste text from clipboard.
2Mouse Middle button insertion from system (Unix only)
1. Open a file in editor.
2. Put some text to system clipboard from another application (e.g. Mozzila).
3. Select another text from another application (e.g. System Terminal).
4. Go back to IDE and set focus to editor.
5. Press middle mouse button.
RESULT: Text should be inserted to current cursor position - for JDK version 1.4.0 and higher - selected text (e.g. System Terminal), for older JDKs - text from clipboard (e.g. Mozilla).
3Copy&Cut Data Inside Java File
1. Open any java file in editor.
2. Select any area of text in edited file and then copy it to the clipboard (Ctrl+Ins).
3. Move blinking cusor to another place of editor and paste data from clipboard to the source file (Shift+Ins).
4. Select another area of text in edited file and then cut it to the clipboard (Shift-Del).
5. Move blinking cusor to another place of editor and paste data from clipboard to the source file (Shift+Ins).
RESULT: Copied text is duplicated in editor, cut text is removed, texts are placed in cursor position and cursor should re-appear behind added data.
4Copy&Cut Data Between Two Edited Files
1. Switch to an HTML file.
2. Select any area of text in edited HTML file and then copy (cut) it to the clipboard (Ctrl+C, resp. Ctrl+X).
3. Switch to the text file.
4. Put the data from clipboard to the text file (Ctrl+V).
RESULT: Selected text is copied (cut) from the html file to the text file.
5Copy&Cut Data To Cloned View
1. Swith to a java file.
2. Select any area of text in edited file and then copy (cut) it to the clipboard (Ctrl+C, resp. Ctrl+X).
3. Clone view (display poup menu over editor pane and then choose "clone view" item).
4. There should be auto focus on the cloned view, if no then get focus to the cloned view (click to cloned view).
5. Put data from clipboard to source file in cloned view (Ctrl+v).
RESULT: Copied (cut) text is placed in editor in cursor position and both editor windows (cloned and original) contain the same data.
6Copy&Cut Data From OS To Netbeans
1. Open any file in native editor which use system clipboard
2. Select any text and put it to the system clipboard (depents of native editor)
3. Select focus to some netbeans Java editor.
4. Put text from clipboard to the edited file (Ctrl+V).
RESULT: Selected text is copied from native editor to netbeans editor
7Copy&Cut Data From Netbeans To OS
1. Switch to focus to text file in IDE editor
2. Select text in edited file and copy (cut) it to clipboard (Ctrl+C, resp. Ctrl+X)
3. Open any file in native editor which use system clipboard
4. Put text from clipboard to the text file in native editor (it's depending to native editor)
RESULT: Selected text is copied from Netbeans to native editor
Teardown:



Test suite 12: Colorizing

Purpose: Tests colors
Setup:

#Test caseDescription
1Default Java Fonts And Colors
1. Open Colorizing.java file with all keywords, and Colorizing2.java (not in samples xxx) file with some Java elements, method calls, special characters and unicode characters or you can go throught actions mentioned below)
2. Type all Java keywords to editor, they must be marked by blue by default:
abstractdefaultintstrinctfp
assertelseinterfacesuper
booleanextendslongswitch
breakfalsenativesynchronized
bytefinalnewthis
casefinalynullthrow
catchfloatpackagethrows
charforprivatetransient
classgotoprotectedtrue
constifpublictry
continueimplementsreturnvoid
doimportshortvolatile
doubleinstanceofstaticwhile

3. Type any comments, type without quotes e.g.: "// first comment ", "/* second commnent */" and documentary comment "/** @author aaa */"), comments should by marked by light gray by default
4. Type string e.g. type with quotes ! "abcdef01234567890"
5. Type double, char, int use decimal, octal and hexadecimal numbers e.g. type without quotes "1234567890","01234567","0x12345678890ABCDEF","0.1234567890"
6. Type Operators + - * / etc.
7. Type class declaration and method call e.g. "class X { X(){} A(){} }"
8. Type unicode characters e.g. "\0124"
RESULT: Check text color for each group of characters when typing Java element to editor. Default colors.
2Changing Fonts And Colors Settings Java
1. Java file from previous case should be opened in editor.
2. Open Fonts and colors dialog for Java files (From main window Tools|Options->Editing|Editor Settings|Java Editor->Fonts Colors).
3. In appeared dialog change for each item font and color.
RESULT: Check if all changes are propagated correctly into editor.
Teardown:



Test suite 13: Focus Test

Purpose:
Setup:

#Test caseDescription
1Open File Focus Test
1. Select any class in Filesystems in Explorer.
2. Open it -> focus is moved on opened Editor window.
3. Double click to the same class (you could click to method node or field node in Explorer) -> focus is moved on opened Editor window
4. Select more files in Explorer and open they from popup menu.
RESULT: The last opened Editor window should have focus (blinking cursor).
2New From Template Focus Test
1. Open some Java source file in editor and focus it (move mouse cursor to editor pane and click).
2. Invoke action New (Ctrl+N).
3. In displayed wizard select for example Java Classes|Java Class.
4. Press Next, write some class name and press Finish.
RESULT: New opened Editor Window should have focus (blinking cursor).
3Find (Replace) Focus Test
1. Open some Java source file in editor and focus it (move mouse cursor to editor pane and click).
2. Repeatedly invoke Find action (Ctrl+F) write some string (existing in opened file) and press Find button.
RESULT: Editor window should have focus after each find action invocation.
4Go To Line Focus Test
1. Open some Java source file in editor and focus it (move mouse cursor to editor pane and click).
2. Repeatedly invoke Go to line action (Ctrl+G), to invoked dialog write some line number and press Goto button.
RESULT: Editor window should have focus after each Go to line action invocation.
5Editor Tabs Switching Focus Test
1. Open two Java source files in editor and focus one of them (move mouse cursor to editor pane and click).
2. Repeatedly switch to next file and return to actual file by clicking on editor tabs.
3. Use nex tab action (Alt+left arrows) to switch to next file.
RESULT: After each switch between the editor tabs focus should stay in actual editor window.
6Close Tab Focus Test
1. Open at least two java files into Editor Window.
2. Close one of them (Ctrl+F4).
RESULT: Focus should move to another opened Editor tab.
Teardown:



Test suite 14: Indentation Engines

Purpose:
Setup:

#Test caseDescription
1Default Engines For All Supported Types
1. Open settings for HTML file and check its value for item Indentation (From Main Window menu Tools|Options->Editing|Editor Settings|HTML Editor->Indentation Engine)
2. Open settings for Java file and check its value for item Indentation (From Main Window menu Tools|Options->Editing|Editor Settings|Java Editor->Indentation Engine)
3. Open settings for Text file and check its value for item Indentation (From Main Window menu Tools|Options->Editing|Editor Settings->Indentation Engine
RESULT: HTML should have "HTML Indentation Engine"
Text files (Plain Editor) should have "Simple Indentation Engine"
Java files (Java Editor) should have "Java Indentation Engine"
2No Indetation Engine
1. Switch off indentaion engine for HTML (Java, text) editor
2. Open any HTML (Java, text) file in editor
3. Type some spaces
4. Type any word
5. Press Enter
RESULT: Didn't used any Identation.
3Simple Indentation Engine Default Settings
1. Open any file with simple indentation engine, e.g. plain text file or html file
2. Type any word from begin of row, e.g. "ABC"
3. Type some spaces e.g. 4x
4. Move cursor back (use 2x left arrow)
5. Press Enter
RESULT: Cursor should be on firts column next row.
4Simple Indentation Engine Default Settings - tabs
1. Type tab key
RESULT: Instead of tab should be 4 spaces, check spaces with arrow key - cursor must jump (4x), if you are moving back
5Changed Number of Spaces per Tab
1. Type any word to the same file from previous case
2. Change space per tab for Simple indentation engine, e.g. to the 6 (from main window menu Tools|Options->Editing|Indentation Engines|Simple Indentaion Engine->... change property Number of Spaces Per Tab)
3. Go before typed word
4. Press Tab
RESULT: Before word is inserted 6 spaces, check if there are spaces or tab (as in previous case)
6Simple Indentation Engine Expand Tab
1. Change Expand Tabs to Spaces Setting to False (From main window Tools|Option->Editing|Editor Settings->Indentation Engine->... ->Change property Expand Tabs to Spaces to false
2. Switch focus to editor (use the same file as in previous case)
3. Press Tab
4. Switch back 'Expand Tabs to Spaces' to true
RESULT: Check if tab is added, press onetime left arrow and check if cursor jump 4 spaces back
7Simple Indentation Engine Delete Tab
1. Use the same file from previous case (Expand Tabs to Spaces are disabled)
2. Press Tab
3. Press Backspace
RESULT: Should be deleted tab
8Java Indentation Engine Add Leading Star in Comment 1
1. Open any java file
2. Type comment to any row from begin e.g. "/*"
3. Type Enter
RESULT: There is added leading star before cursor. Engine add the star below to the star in previous row
9Java Indentation Engine Add Leading Star in Comment 2
1. Use the same file from previous case
2. Type any word e.g."/** this is comment"
3. Type Enter
RESULT: There is added leading star before cursor. Engine add the star below to the first star in begin of comment
10Java Indentation Engine Add Leading Star in Comment 3
1. Switch 'Add Leading Star in Comment' to false (from main window Tools|Options->Editing|Indentation Engines|Java Indentation Engine->Add Leading Star in Comment)
2. Type "/*"
3. Press Enter
RESULT: Engine didn't add leadding star and cursor is positioned below star ! (no below slash)
11Java Indentation Engine Add Newline Before Brace 1
1. Use the same file from previous case
2. Swhitch 'Add NewlLine Before Brace' to True (from main window Tools|Options->Editing|Indentation Engines|Java Indentation Engine->Add Newline Before Brace)
3. Reformat code (from popup over editor choose 'Reformat code' item)
RESULT: There is added newline character before each brace, only in guardage blocks are not added
12Java Indentation Engine Add NewLine Before Brace 2
1. Use the same file from previous case
2. Swhitch 'Add NewlLine Before Brace' to Fasle (from main window Tools|Options->Editing|Indentation Engines|Java Indentation Engine->Add Newline Before Brace)
3. Reformat code (Use shortcut from editor Ctrl+Shift+F)
RESULT: Before braces didn't added newline character. If there are, engine should remove them.
13Java Indentation Engine Add Space Before Parenthesis 1
1. Use the same file from previous case
2. Reformat Code (use shortcutr Ctrl+Shift+F)
RESULT: Engine didn't add before parenthesis any space
14Java Indentation Engine Add Space Before Parenthesis 2
1. Switch 'Add Space Before Parenthesis' to true (from main window Tools|Options->Editing|Indentation Engines|Java Indentation Engine->Add Space Before Parenthesis)
2. In the same file from previous case use Reformat Code
RESULT: There is added one space before each opening parethese
15Java Indentation Engine Expand Tab To Spaces
1. Type tab key
RESULT: Instead of tab should be 4 spaces, check spaces with arrow key - cursor must jump (4x), if you are moving back
16Java Indentation Engine Expand Tab
1. Switch 'Expand Tabs to Spaces' to False (from main window Tools|Options->Editing|Indetation Engines|Java Indentation Engine->Expand Tabs to Spaces)
2. Press Tab in java editor
RESULT: Check if tab is added, press onetime left arrow and check if cursor jump 4 spaces back
17Java Indentation Engine Number of Spaces Per Tab
1. Type any word to the same file from previous case
2. Change space per tab for simple indentation engine, e.g. to the 6 (from main window menu Tools|Options->Editing|Indentation Engines|Java Indentaion Engine->... change property Number of Spaces Per Tab)
3. Go before typed word
4. Press Tab
5. Switch back space per tab to 4 (prepare to next case)
RESULT: Before word is inserted 6 spaces, check if there are spaces or tab (as in previous case)
Teardown:



Test suite 15: HTML Dynamic Code Completion

Purpose:
Setup:

#Test caseDescription
1Activate Deactivate
1. Press character "<"
2. Press Ctrl+Space
3. Esc
RESULT: Code completion dialog appeared
2Usage of DCC
1. Type "<" and wait to code completion are apeared
2. Choose any tag from completion dialog (to navigate through the dialog use up and down arrows)
3. Press Enter or Shift+Enter
RESULT: If you pressed Enter should be selected item added to editor and cursor should be moved after tag, if you pressed Shift+Enter then is cursor moved before character > and completion dialog should stay up and should show taf's attributes
3Tags Attributes
1. Put HTML tag to editor with Shift+Enter from completion dialog
2. Put attribute to editor
3. Repeat it for all attributes
RESULT: All html attributes should be added properly to editor
4Character Reference
1. Type "&" character and wait
RESULT: Should be given all character references
Teardown:



Test suite 16: Java Dynamic Code Completion

Purpose: To test Java Code Completion functionality. The first tail of suite is used to test opening the CC dialog on more places in editor, the second tail perform tests to control keyboard shortcuts and the last tail tests the options.
Setup: I used the "|" character to show where is the caret in tails of source code.

#Test caseDescription
1Activate - Deactivate
1. Open CodeCompletion.java file
2. Open and close CC dialog outside the comment
    |/** Javadoc comment */

     /** Javadoc comment */|

3. Open and close CC dialog in comment (in begin, middle and end of comment)
    /|** Javadoc ...
This first case is designed to show the CC dialog, because is not recognized as a comment. The parser recognize the comment after the "/*".
    /*|* Javadoc ...

    /** | Javadoc ...
   
    ... coment *|/

RESULT: Code completion dialog appeared in entire editor, only in comments are not appeared.
2Keyboard Behaviour
1. Open DCC dialog
2. Move down to end of dialog (use Down Arrow, Page Down or End button)
3. Move up to begin of dialog (use Up Arrow, Page Up or Home button)
RESULT: Content of CC dialog is scrolling up (resp. down) and appropriate items are hilighted.
3Enter
1. Open DCC dialog
2. Add highlighted item from dialog to the editor (press Enter)
RESULT: Enter puts selected item to code
4Shift+Enter
1. Open DCC dialog
2. Add highlighted item from dialog to the editor (use Shift+Enter)
RESULT: Enter puts selected item to code. The DCC view should stay visible and should have correct content.
5Tab
1. Type "Integ"
2. Open DCC dialog (Ctrl+Space)
3. Use substring completion (tab)
RESULT: The common prefix of all DCC results should be inserted ("Integer" in this case).
6Empty editor
1. Open epmty Java editor
2. Open DCC dialog (press Ctrl+Space)
3. Close DCC dialog (click outside of this dialog)
RESULT: Should be showed packages
7Keyword package
1. Type "package " to editor (read this carefully, after package is one space!)
2. Open DCC dialog, here is not auto opened (Ctrl+Space)
RESULT: DCC dialog appeared and show packages of all active parser databases.
8Keyword import
1. Type "import " to editor
2. Wait to DCC dialog appeared
RESULT: DCC dialog appeared and show packages.
9Keyword new
1. Type "new " to editor
2. Wait to DCC dialog appeared
RESULT: DCC dialog appeared and shows all classes and interfaces from all parser databases.
10Show Packages 1
1. Type "java." to somewhere in editor
2. wait to completion dialog with packages appeared
RESULT: Should be completion dialog appeared with java. packages.
11Show Packages 2
1. Invoke CC outside class definition.
2. wait to completion dialog appeared
RESULT: Should be shown packages in DCC dialog
12Show Classes 1
1. Type "java.lang."
2. Wait to completion dialog appeared
RESULT: Should be completion dialog appeared (java.lang. packages and classes are shown)
13Show Classes 2
1. Open DCC dialog (Press Ctrl+Space)
2. Wait to completion dialog appeared
3. Type first char of any class, e.g. "S"
RESULT: Should be completion dialog appeared and dialog is showing classes and packages begun by "S".
14Show Methods 1
1. In any methods type "this."
2. Wait to DCC dialog appeared
RESULT: DCC Dialog appeared and show methods behaves to the class you have opened.
15Show Methods 2
1. In any methods type "new java.lang.String[] {"aaa"}[0]."
2. Wait to code completion appeared
RESULT: The results for "String" instance should be shown.
16Class Search
1. Create any java file named 'String' (from main window File|New->Classes|Class, press next get as name 'String' and press Finish)
2. Type to editor "String"
3. Press Ctrl+Space
RESULT: There should be at least two items for 'String' in appeared dialog (java.lang.String and just created String)
17Class and arrays
1. Try to write "int[] a; a." and invoke CC (press Ctrl+Space).
2. Try to write "String." and invoke CC (press Ctrl+Space).
RESULT: For the array variable CC should contain item "int length" and for classes CC should contains item "Class class".
Teardown:



Test suite 17: Java Code Completion Properties

Purpose: Tests special features/properties of Java Code Completion
Setup:

#Test caseDescription
1Case insensitive code completion
1. In a Java editor write: "str" and invoke code completion (Ctrl+Space). (Wait for a while.)
2. Change the setting: "Tools/Options/Editing/Editor Settings/Java Editor/<Expert tab>/Case Sensitive Code Completion" from "true" (the default) to "false".
3. In a Java editor write: "str" and invoke code completion (Ctrl+Space). (Wait for a while.)
RESULT: In the first case, the code completion should offer only results starting with "str" (with the same case). After changing "Case Sensitive Code Completion" (sensitive) setting to "false", all possible results starting with (case insensitive) string "str" should be offered.
2Instant Substitution Code Completion
1. Open java source file in editor and in some method's body write "String.cl"
2. Inoke CC (Press Ctrl+Space)
3. Change the setting: "Tools/Options/Editing/Editor Settings/Java Editor/<Expert tab>/Code Completion Instant Substitution" from "true" (the default) to "false".
4. Try to write another "String.cl" and invoke CC (press Ctrl+Space)
RESULT: The code completion should find just one result. In the first case, this one result should be immediately accepted from code completion, same way as whan confirmed by <Enter> key. The Code completion view should not be visible. In the second case, the Code completion view should get visible as usual.
3Natural Sort
1. Open some java source file in editor.
2. Create in some class two methods (or fields) for example setSize2() and setsize1().
3. In some method's body write "this.set" and invoke CC (Ctrl+Space). Check order of displayed items.
4. Change the setting: "Tools/Options/Editing/Editor Settings/Java Editor/<Expert tab>/Code Completion Natural Sort" from "false" (the default) to "true".
5. Return to "this.set" and invoke CC once more. Check order of displayed items.
RESULT: In first case (disabled Natural Sort) should CC contains items sorted as is usual in Java - "upper case first" - setSize2() and than setsize1(). In second case (enebled Natural Sort) should CC contains items sorted as is usual for users - "case independent" - setsize1() and than setSize2().
4Deprecated Items
1. Open some Java source file in editor and in some method try to write "new java.util.Date(" and invoke CC (Press Ctrl+Space).
2. Change the setting: "Tools/Options/Editing/Editor Settings/Java Editor/<Expert tab>/Show Deprecated Member in Code Completion" from "true" (the default) to "false".
3. Return to "new java.util.Date(" string and invoke code completion as before. (Press Ctrl+Space)
RESULT: In the first case the code completion dialog contains all constructors of java.util.Date, deprecated are signed (scratched off) in second case CC dialog contains only non-deprecated constructors.
Teardown:



Test suite 18: Java Code Completion Javadoc view

Purpose: Test Java code completion's javadoc view and it's properties.
Setup:

#Test caseDescription
1Auto Mount JDK Sources
1. Write "String" (in body of a class) and invoke Code completion.
RESULT: The Javadoc view should occur after a while, and should show Javadoc for java.lang.String class.
2Code Completion Java Doc View Content
1. Invoke javadoc view for "String" and for "sun.io.ByteToCharConverter".(Use Ctrl+Shift+Space
RESULT: For "String", javadoc should be shown. For "sun.io.ByteToCharConverter", should be shown javadoc dialog with "Javadoc not found" text and its reason.
3Code Completion Java Doc View Hypertext Content
1. Open Java file and write for example String and invoke Java Doc View.
2. Press mouse on a blue hyperlink e.g. "java.lang.StringBuffer"
RESULT: Content of Java Doc View should be changed to Java Doc of java.lang.Class.
4Code Completion Java Doc View for Arrays
1. Invoke code completion for "int[] a; a.".
2. Browse JavaDoc view content for each item of CC dialog.
RESULT: All methods of Object should have Java Doc.
5Code Completion Java Doc View Toolbar
1. Invoke javadoc view for "JFrame"
2. Try to perform some actions using the Javadoc view toolbar (Open source in editor, Go to previous page etc.)
RESULT: All the actions should be performed correctly, including correct layout of all components (the HTML text, toolbar, scrollbars, Open source in editor etc).
6Auto Popup Java Doc View
1. In any Java editor write: "StringBuffer" and invoke code completion (Ctrl+Space). (Wait for a while.)
2. Change the setting: "Tools/Options/Editing/Editor Settings/Java Editor/<Expert tab>/Autopopup Javadoc Window" from "true" (the default) to "false".
3. In any Java editor, write: "StringBuffer" and invoke code completion (Ctrl+Space). (Wait for a while.)
RESULT: While the "Autopopup Javadoc Window" setting is "true", the javadoc view should be automaticaly shown when code completion dialog is shown. Once the setting is "false", it should not, and should be only invokable by "javadoc-show-action".
Teardown:



Test suite 19: Java Protected Blocks

Purpose:
Setup:

#Test caseDescription
1New Protected Block
1. Open file with protected blocks, e.g. from main window choose File|New -> GUI Forms|JFrame->next->Finish
2. Wait to form and source of template is created
3. Change focus to sourse editor
4. Try type to the guarded blocks (blue areas)
RESULT: Verify that it is not possible to type into the guarded block.
2Hand Created Protected Block
1. Create empty Java file in any editor (outside IDE)
2. Type "//GEN-BEGIN:nameOfBlock1" (Note there should be nothing after comment, any space, tabs or characters)
3. Type some rows of text
4. Type "//GEN-END:nameOfBlock1" (Note there should be nothing after comment, any space, tabs or characters)
5. Type some text
6. Type "//GEN-FIRST:nameOfBlock2" (Note there should be nothing after comment, any space, tabs or characters)
7. Type some text
8. Type "//GEN-LAST:nameOfBlock2" (Note there should be nothing after comment, any space, tabs or characters)
9. Save file to disk e.g. as "Test.java"
10. Open file "Test.java" in IDE (from main window File|Open File-> select file you created in step before)
11. Try type to proctected block
RESULT: Should be changed background colour under typed text between begin - end marks (//GEN-BEGIN //GEN-END and //GEN-FIRST //GEN-LAST). These marks should be unvisible.
Figure before :

Figure after :
3Hand Created Protected Block With Errors
1. There should be opened file from previous case
2. Edit this file outside from IDE
3. Change a tail of guarded block comment e.g. change "GEN-BEGIN" to "GEN-EE"
RESULT: Guarded block disappear without exceptions.
4Changing Contents of Guarded Block 1
1. Open any GUI file with form e.g. from main window choose File|New -> GUI Forms|JFrame->next->Finish
2. Change some property in appeared form editor
RESULT: There should be made some changes in guarded block
5Changing Contents of Guarded Block 2
1. Open any GUI file with form e.g. from main window choose File|New -> GUI Forms|JFrame->next->Finish
2. Open Explorer window and try to delete some fields or methods in guarded block (e.g. initComponents).
RESULT: Delete action should be disabled and thus no deletion should be possible.
Teardown:



Test suite 20: Java Macros

Purpose:
Setup:

#Test caseDescription
1Create Macro
1. Start macro recording (Ctrl+J S or from editor toolbar)
2. Write some text in editor, move cursor and try to invoke some formatting actions (Shift Line, Comment etc.)
3. Finish recording macro (Ctrl+J E or in editor toolbar)
4. To appeared dialog write new macro name and choose some keybindings for it.
5. Open java source file into editor and try to use new macro's keybinding.
RESULT: Macro should be added to the list and properly works.
2Create Macro With Already Used Name
1. Try to create another macro with same name as in case "Create Macro"
RESULT: It should not be possible to create two macros wit same name.
Teardown:



Test suite 21: Java Abbreviations

Purpose:
Setup:

#Test caseDescription
1
1. Check if all abbreviation works properly (you can see all abb. in main window Tools|Editing|Editor Settings|Java Editor->Abbreviations->...)
RESULT: All abbreviations works properly and cursor is added to appropriate place (its depended to the definition in macro check '|' character)
2Abbreviation Inside Comment
1. Try abbreviation works in comments
RESULT: Abbreviation should works in comments too
3Abbreviation Without expansion
1. Type any shortcut for abbreviation text
2. Press Shift+space
RESULT: Text is not abbreviated
4Adding Abbreviation
1. Add abbreviation form main window choose Tools|Option->Editing|Editor Settings|Java Editor->Abbreviations ,press ..., press Add in appeared dialog
2. Type to textfield "Abbreviation:" "myabb", press Tab, and type "System.out.println("myAbbreviation");" to text area "Expansion:"
3. Press OK and go to java editor.
4. Use the added abbreviation (type "myabb ")
RESULT: Should be switched text 'myabb' <-> 'System.out.println("myAbbreviation");'
5Change Abbreviation
1. Change name of abbreviaions
2. Change text for abbreviation
3. Use this changed abbreviation
RESULT: There should be changed abb. name and abb. text
6Remove Abbreviation
1. Remove all abbreviations from abbreviations list
2. Try use they
RESULT: Should be deleted all abbreviations properly
7Abbreviation With Cursor
1. Add abbreviation with cursor position (in "Expansion:" part use char '|' to set cursor position)
RESULT: Cursor should be added to approriate place
8Abbreviation - Negative cases
1. Add abbreviation with existing name
RESULT: Should appear dialog with title "Warning" with Question replace with new one ?
Teardown:



Test suite 22: Java Fast Class Import

Purpose:
Setup:

#Test caseDescription
1Fast Import Help
1. Open any java file in editor
2. Type " StringTokenizer"
3. Use fast import (press Alt+Shift+I)
4. Press 'Help' button
5. Wait to Help windows appeared
6. Close the Help
7. Press 'Cancel' buttom in import dialog
RESULT: There is help opened - closed and nothing happened in editor
2Fast Import Class
1. Use file from previous case
2. Move cursor inside (or in front or back of string) string 'StringTokenizer'
3. Use fast import (Alt+Shift+I)
4. Press 'Import' in appeared dialog
RESULT: There should be imported name of package for selected class
3Fast Import Package
1. Use file from previous case
2. Write any java class name (for example "File")
3. Move cursor inside (or in front or back of string) string "File"
4. Use fast import (Alt+Shift+I)
5. Choose "Import Package" radio button in appeared dialog and press OK
RESULT: After choosing radio button, import dialog should change its content to "java.io.*". To source text should be appended import line "import java.io.*;".
4Fast Import Name
1. Use file from previous case
2. Write any java class name (for example "File")
3. Move cursor inside (or in front or back of string) string "File"
4. Use fast import (Alt+Shift+I)
5. Choose "Fully Quallified Name" radio button in appeared dialog and press OK
6. Invoke Undo action (Ctrl+U)
RESULT: "File" string should be replaced by "java.io.File". After Undo action there should be "File" again.
5Import the same class again
1. Use the same file from previous case
2. Type " StringTokenizer"
3. Use fast import (press Alt+Shift+I)
4. Press import in appeared dialog
RESULT: Nothing happened in editor, there should be imported this class from previous test case
6Add Different
1. Use the same file from previous case
2. Type " InputStream"
3. Use fast import(Alt+Shift+I)
4. Select first item in appeared dialog
5. Press 'Import'
6. Use fast import(Alt+Shift+I)
7. Select second item in appeared dialog
8. Press 'Import'
RESULT: There should be imported selected item from Import dialog
7Add Current
1. Open some java file in to editor.
2. Go to class definition in this source file.
3. Move cursor to class name and invoke Fast Import action (press Alt+Shift+I)
4. In appeared dialog press OK button
RESULT: There should not be possible to add import item of current class.
Teardown:



Test suite 23: Java Fast Class Open

Purpose:
Setup:

#Test caseDescription
1Java Fast Class Open
1. Go to java source and write for example "String" text
2. Move cursor to text and invoke Go To Class action (Alt+Shift+O)
3. Choose java.lang.String and press Open button
RESULT: The selected source file should be opened in editor and the cursor should be on first line
2Java Fast Class Open Opened Class
1. Use same source file as in previous case
2. Move cursor to text "String" and invoke Go To Class action (Alt+Shift+O)
3. Choose java.lang.String and press Open button
RESULT: The selected source file should be choosed as first in editor
3Java Fast Class Open Unaccessible class
1. Open class (Alt+Shift+O) (use class for which is source unaccessbile ie. "ByteToCharCp1252").
RESULT: You should get an information dialog explaining why this is not possible.
4Java Fast Class Open Not Parsed Class
1. Open class (Alt+Shift+O) (not in completion database)
RESULT: You should not get any results in the dialog (empty fields), and should not be able to use "Open" button.
Teardown:



Test suite 24: Word Matching

Purpose:
Setup:

#Test caseDescription
1Word Matching
1. Type some words to any type of file to the editor.
2. Use the word matchig (Ctrl+K, Ctrl+L).
RESULT: Should be possible to use w.m. between any type of files and in any place of file.
Teardown:



Test suite 25: Toolbar and Gutter

Purpose:
Setup: Look at Gutter and Toolbar in my IDE.

#Test caseDescription
1Customize Toolbar
1. Open Java file in editor.
2. Check if toolbar is present in editor window (above the editor pane).
3. Try to hide toolbar panel (show popup dialog and switch off Margin|Show Toolbar checkbox in editor pane).
4. Try to create and test a keybinding for action 'Toggle toolbar' and test it (Tools|Options|Editing|Editor settings|Key Binding action Toggle Toolbar).
RESULT: Toolbar should be displayed and hide according to invoked action.
2Customize Gutter
1. Open a file in editor.
2. Check if the gutter is in its position (left edge of editor window).
3. Go to gutter and invoke popup menu by mouse right click.
4. Check checkboxes "Show Line Numbers" and "Show Toolbar".
5. Try to show and hide line numbers and toolbar by them.
6. Try to create and test a keybinding for action 'Toggle Line Numbers' and test it (Tools|Options|Editing|Editor settings|Key Binding action Toggle Line Numbers).
RESULT: Glyph Gutter should be displayed on the left side of the Editor Window. The Line numbers should be shown and hidden by appropriate actions.
3Toolbar Action
1. Check if all action icons have tooltip and are enabled.
2. Try to invoke all action in toolbar.
RESULT:
4Navigate Combobox
1. Open java source file in editor.
2. Check if the Navigate combobox is enabled and check content of Navigate combobox (it should contains all fields, methods, constructors and inner classes).
3. Select some item of combo box and check position where cursor jumped.
4. Clone view of editor and check if the combo box is not disabled.
RESULT: All checks shoudl be positive.
Teardown:



Test suite 26: Code Folding

Purpose:
Setup: If you doesn't know what is Code Folding then look at UI Specification.

#Test caseDescription
1Code Folding Open File
1. Open CodeFolding.java file.
RESULT: All folds are identified and expanded by default, so the user can see the whole source code. Folds must be painted as well as in image.
Fold marks must be presented by :
  • initial comments
  • import statemets
  • javadoc comments (only for javadoc comments)
  • inner class
  • methods
2Disable/Enable CF
1. Open CF options dialog in Tools|Options -> Editing|Editor Settings|Java Editor -> Code Folding -> ...
2. Uncheck Use Code Folding checkbox and confirm it by Ok button.
RESULT: All fold marks must be removed from Editor. All collapsed code must be expanded.
(Fold marks must be showed in the same way like in Test case 1 after enabling it back.)
3Add/Remove Java Code
1.
a) Add this code into class body:
    public void myMethodX() {
        System.out.println();
     }

     public void myMethodY() {
     }
b) Add javadoc comment before the method :
    /** My javadoc for myMethodY */
c) Add imort statement in adequate place in source file.
import java.lang.String;
d) Add inner class in class body
    class MyInnerClass {
    }
e) Add method into inner class
   class MyInnerClass {
       void myInnerClassMehod() {
       }
    }

2. Remove source code you typed in sequence e-a.
RESULT: First part of test case - Fold hiearchy must be updated immediately in steps a-e (max. delay is cca 2 sec.).
Second part of test case (remove) - Fold must be removed immediately with the removed code.
4CF Actions from Menu
1. Check names of menu items, mnemonics, shortcuts, separators and menu layout. The Code Folding menu has been under View|Code Folds menu.
Image of code folding menu
2. Collapse Fold
This action is context sensitive. You must have the caret on row where the tail of folded code has been presented. You need not have the cursor in the method body ( or in inner class body, or in the name of import statement, or in the javadoc comment). You can have it somewhere else in the row. E.g. If you want collapse a method, the cursor can be before the "{" or after "}" braces (see image) :
  1. Move the cursor into row with import statement and use action "Collpse Fold" from main menu View|Code Folds|Collapse Fold (Use mnenonics).
  2. Move cursor into mehod body and collapse it (use the same menu like in previous step View|Code Folds|Collapse Fold ). -> The caret is moved after the fold mark ! (after 3 dots)
  3. Move cursor before the method declaration (at begin of the same row where is the method declaration) and collapse it (from menu).
  4. Move cursor after end of method body (after closing brace "}", see previous image) and collapse it (from menu).
  5. Move cursor into row with javadoc comment and collapse it (from menu).
  6. Move cursor into method of inner class and collapse it (from menu).
  7. Move curosr into inner class and collapse it (from menu).

3. Expand Fold
This action is context sensitive. You must have the caret on the row where the mark of folded code is presented. (Where is the mark with 3 dots).

Expand all collapsed code in previous steps (2.1-2.7). Use action from main menu View|Code Folds|Expand Fold (Use mnenonics).

4. Collapse All - Call action View|Code Folds|Collapse All from main menu.
5. Expand All - ... | Expand All (from main menu).
6. Collapse All javadoc - ... | Collapse All Javadoc (from main menu).
7. Expand All javadoc - ... | Expand All Javadoc (from main menu).
8. Collapse All Java Code - ... | Collapse All Java Code (from main menu).
9. Expand All Java Code - ... | Expand All Java Code (from main menu).
10. Try some of previsous action in popupmenu over editor (from popup menu).
RESULT: Folds must be collapsed and expanded in adequate form for each action.(It is unambiguous)
If the caret is in body of fold and the fold is collapsed then the caret is moved behind the end of fold. The state of caret is remembered if immediately after collapse action is called the expand action.
5CF Shortcut Actions
1. Collapse/Expand Fold: Ctrl -/Ctrl + (from numpad)
2. Collapse All/Expand All: Ctrl Shift -/Ctrl Shift +
RESULT: These actions must collapse/expand folds.
6CF Mouse Actions
1. Collapse fold - Click to (green) minus mark on any fold. (the green color is only for illustration). See image:
2. Expand fold - Click to (red) minus on any fold. (The red color is only for illustration)
3. Doble click on any (yellow) collapsed code mark -> The fold is expanded. (The yellow color is only for illustration)
RESULT: Fold is collapsed/expanded.
7Options - Collapse by Default
1. Open dialog Tools | Options -> Editing - Editor Settings - Java Editor -> Code Folding -> ... and check names, mnemonics and default states of components :
2. Change all default states in this dialog ( The option "Use Code Folding" must stay enabled!)
3. Confirm the dialog with Ok button.
4. Open any java file.
RESULT: Check the states of all types folds in opened file.
8Show Collapsed Code in Tooltip
1. Move mouse pointer over the collapsed code (over the 3 dots). This only works over the 3 dots mark, the plus sign or other tails of code folding haven't any tooltip functionality.
RESULT: Collpased code is showed in tooltip. (Colored and indented like in editor)
9Interaction with Surrounding Features (Basic)
1. Move caret before collapsed code fold mark (the 3 dots mark).
2. Move the caret with arrows on keyboard over the mark and back.
3. Select collapsed code fold mark (3 dots) by keyboard.
4. Press Delete -> the content of fold must be deleted and the fold mark must disapper.
5. Undo - Ctrl-Z -> The content of fold must be restored.
RESULT: The caret must moved over the mark like the mark would be a character.
The mark is not highlighted now when is selected! It is bug ? Yes
10Interactions with Surrounding Features
1. Show/Hide line numbers -> this has no affect to CF
2. Set "Highlight care row" and move over collapsed/expanded folds -> The highlighting must be from begin of row to end of editor window. There is a bug now ! Issue 40257.
3. Annotations:
  1. Bookmark in collapsed fold and reach it by "Next Bookmark" action -> Fold must be expanded and caret on bookmark
  2. Breakpoint in collapsed fold and reach it by debugger session -> The fold must be expanded
  3. Breakpoint at end of method body and collapse it -> The br. is not visible


4. Find & Replace in collapsed code: If search reach the string in collapsed fold -> fold is expanded
5. Change Font & Colors for CF marks. ..../Font & Colors -> Code Folding -> Color must be properly changed
6. Next/previous error jumps (Shortcut F12) -> concrete fold must be expanded
7. Generation of code from wizards -> concrete fold must be expanded
RESULT: Results are inlined.
11Add/Remove Custom Folds
1. Add custom opening mark to begin of file (first row, first column) and the end mark place before the last closing brace:
// <editor-fold>
...
    public class CodeFolding {
...
    // </editor-fold>
  }

2. Close & Open the file -> The user fold must be in expanded state.
3. Add to custom fold property "default" : <editor-fold default="collapsed">
4. Close & Open the file -> The user fold must be in collapsed state.
5. Remove the end mark and place it before body of any method. -> The fold lines must be repainted.
6. Remove user fold (remove both marks, the opening & the closing marks).
RESULT: Line must be added from begin mark to end mark in fold gutter. The line is pained over the other java fold lines.
12Actions in Custom Folds
1. Create and collapse user defined fold (Ctrl -) (inside the user def. fold should be a method, for step 3.)
2. Expand user defined fold (Ctrl +)
3. Collapse/Expand java fold inside the user defined fold.
RESULT: Folds must be properly collapsed/expanded.
13Overlap folds
1. Create custom fold that overlap the method fold :
...
     // <editor-fold>
   /** Creates a new instance of CodeFolding */
    public CodeFolding() {
       // </editor-fold>
    }
 ...

RESULT: The fold for method should disappear while custom fold is created. (Try remove the custom fold -> the method fold must be recognized and created.)
14Corrupt Custom Folds
1. Insert closing mark (// </editor-fold>) in editor. -> Nothing happened
2. Insert the opening mark behind the closing one. (on the same row)
3. Cut the opening mark and move it before the closing one. (On the same row) -> Nothing is happened
4. Hit enter between the opening and closing fold -> User fold is recognized and painted in fold gutter
5. Insert character 'a' in closing mark : // </aeditor-fold> -> Fold line disappear from fold gutter
6. Remove the 'a' from the mark -> fold is recreated.
7. Add more closing marks :

// </editor-fold>
// </editor-fold>
// </editor-fold>
// </editor-fold>

and add before them the opening marks:
(Copy it and paste they in editor)

// <editor-fold desc="aaa">
// < editor-fold desc="bbb" >
// <editor-fold desc="ccc">
// <editor-fold desc="ddd">


8. Add user fold with the same name at end of file :
...
 }
// <editor-fold desc="aaa">
// </editor-fold>

RESULT: All folds must be recognized and collapsable. It is possible have more user defined folds with the same description (desc).
15Break the Code Folding
1. Add commet after method body (on the same row), e.g. "... } // my commet" and collapse the method. -> The comment should be visible (Java folds) Custom folds doens't show the comment after the mark, it works in different way.
2. Add two methods on the same row, e.g. "void aaa() {} void bbb() {}" and try to collapse it. -> Only the first method must be collapsed. The second method is not possible collapse. Move the method to other row if you can to collapse it. There is no possibility to have two folds on one row. (Absurdity)
3. Move cursor after first character of comment ( after the '/' character ) and remove the * from begining of the javadoc. This makes the javadoc comment as the normal comment. -> Fold disapper
4. Try remove begin and end of comment. ( I meant the /** and */ )
5. Try move the caret before the collapsed fold and hit Delete key -> Fold must be expanded and the first char from code inside the fold must be removed (The same for backspace key behind the end of collapsed fold)
6. Try copy text and paste it in to some method or comment. -> This doesn't have affect to CF, only the vertical lines in gutter are enlarged.
RESULT: Results are inlined.
16Open No Parsable File
1. Open file CodeFoldingWrong.java.
RESULT: The fold sign must be painted on part of correct code.
17Empty File
1. Create file "Java main file" from temples
2. Select all in editor (Shortcut Ctrl-A)
3. Hit the Delete button
RESULT: Editor must be empty and no fold mark is visible. There is a bug now.
Teardown:



Test suite 27: Erroneous Code Tooltips

Purpose:
Setup:

#Test caseDescription
1Show tooltip
1. Open prepared Tooltips.java file.
2. Move mouse pointer over the line xx and column yy
RESULT: Tooltip with error should be displaed.
Teardown:



Test suite 28: Select Document Node in Explorer

Purpose:
Setup:

#Test caseDescription
1Menu
1. Check main menu Window|Select Document Node in

RESULT: Name of menu is "Select Document Node in".
Mnemonic is 'N'
Always is Enabled.
2Menu items
1. Check submenu Filesystems [Ctrl+Shift-2]
2. Check submenu Project [Ctrl+Shift-3]
3. Check submenu Show Versions [Ctrl-Shift-8]
RESULT: Names and shortcuts must assent. See above.
3Select Filesystem node action
1. Open second Test.java file from Filesystems. You must select the second one, because you test if the adequate file will be selected.
2. Try shortcut Ctrl+Shift+2 for Selecting node in Explorer
RESULT: The second node "Test" in Explorer should be selected.
4Select Project node action
1. Open Test_1 file from Project tab
2. Select menu Windows|Select Node in Explorer|Project (use mnemonics)
3. Click to Editor and try the same action, but use shortcut Ctrl+Shift-3.
RESULT: Node Test_1 should be selected in Projects in Explorer.
5Select Show Versions action
1. Open file from VCS Filesystem
2. Try shortcut Ctrl+Shift+8
3. Go back to Editor and try menu Window|Select Node in|Show Versions.
RESULT: Node should be selected in VCS filesystem.
Teardown:



Test suite 29: Print to HTML

Purpose: Test all options in Printing to Html file.
Setup: Look at a screenshot of the printing dialog and check mnemonics and component layout.

#Test caseDescription
1Menu Print to HTML
1. Check main menu File|Print to HTML.

RESULT: Name of menu is "Print to HTML", mnemonic is on 'H'. If is selected file in Explorer or in Editor menu is enabled.
2Default values
1. Open Test.java file.
2. Open Print to HTML dialog.
RESULT: Default file location is in your home directory. ( e.g. /home/pf120623/Test.java )
Colors uesd by printing are the same as in Editor. It is not possible to have different colors for html printing and editor.
Option "Print only selected text" is enabled* if some piece of code is selected in editor and it is selected** by default if is selected text in Editor.
Option "Show line numbers" is enabled for all time and selected if line numbers is present in Editor.
Option "Open generated HTML in browser" is enabled for all time and not selected by default.
3Select Location
1. Open Print to HTML dialog
2. Type a path of file to text field. E.g. /tmp/test.html
3. Click to "..." button -> File chooser dialog
4. Click Cancel in file chooser dialog
5. Click to "..." button anyway -> File chooser dialog
6. Change path. E.g. /var/tmp/test2.html and confirm file chooser dialog by Open.
7. Confirm Print to HTML dialog by Ok button.
RESULT: The path shouldn't be changed after step 4. (must be /tmp/test.html)
The path should be changed in step 6. There should be created new file /var/tmp/test2.html
4Select Only selected text
1. Select some piece of code in Editor
2. Open Print to HTML dialog and confirm
RESULT: The checkbox "Print only selected text" should be enabled and selected. There should be created html file which contains only selected text. Check it in HTML browser.
5Select Open generated HTML in browser
1. Open Print to HTML dialog
2. Select option "Open generated HTML in browser"
3. Confirm the dialog with Ok button
RESULT: File should be generated and opened in default* HTML browser.
6Select show line numbers
1. Show line numbers in editor from Options* dialog or from popup menu over gutter**
2. Open Print to HTML dialog and confirm it by Ok button.
RESULT: Check gegenrated HTML file in web browser. Line numbers must be presented.
Teardown:



Test suite 30: Shortcut for Implementing /Overriding Methods

Purpose:
Setup:

#Test caseDescription
1Overrriding and implementing methods menu
1. Check main menu Tools|Override Methods ...

RESULT: Name of menu is "Override Methods ...", shortcut is Ctrl-I and mnemonic is not defined. Menu is presented in Tools menu and it is visible if java file is selected.
2Open Overriding and implement methods dialog
1. Open Override methods dialog by the shortcut Ctrl-I
RESULT: Dialog should appeared.
Teardown:



Test suite 31: Smart Paste

Purpose:
Setup:

#Test caseDescription
1Ctrl-V
1. Copy some piece of code to clipboard in editor (Select block and press Ctrl-C)
2. Use Paste Ctrl-V
RESULT: This must only put the selected block without any change. No shift, no reformat !
2Ctrl-Shift-V
1. Copy unformated text to clipboard.
2. Paste it to editor by Ctrl+Shift+V.
RESULT: Text should be indented (shifted). The begining of first line should be at the same position as at the last line before pasted text.
Teardown:



Test suite 32: Smart Brackets

Purpose:
Setup:

#Test caseDescription
1Smart Pairs
1. Move Caret to Contstructor in java file and type String[
RESULT: The closing square bracket should be automaticly inseted.
2Smart Pairs - Delete
1. Type in body of class private String[ -> Closing Bracket is inserted
2. Push Backspace key
RESULT: Both brackets should be deleted.
3Enter after Smart Brackets
1. Move caret to method testBrace()
2. Type if (true) {
3. Push Enter key
RESULT: Look at pictures :
Before enter

After enter
4Undo with Smart Brackets
1. Try Undo to actions from previsou cases.
RESULT: Undo is working exactly in the opposite direction for all of these actions.
Teardown:



Test suite 33: Smart Enter

Purpose:
Setup:

#Test caseDescription
1Smart Enter inside String
1. Type to body of method String str = "abcde 123456";
2. Move caret after abcde
3. Push Enter key.
RESULT: If Enter is pressed inside a string, the line is splitted as normally, but some additional characters are added automatically onto two places:
- a closing quote with + sign at the end of the splitted line
- an opening quote at the beginning of the second line
Other info:
- indetation works as usualy
- all white characters are preserved
- caret is moved after the opening quote
2Undo with smart enter
1. Try Undo
RESULT: Undo is working in the opposite direction.
Teardown:



Test suite 34: Start New Line & Split Line actions

Purpose:
Setup:

#Test caseDescription
1Start new line
1. Move caret after abcde in line str = "abcde 123456";
2. Push Shift+Enter
RESULT:
- add new line and moves carer on that; ( it means move the caret to end of line and insert new line then.)
- original line isnot affected at all
- indetation works as usually
Look at pictures:
before Shift+Enter

after Shift+Enter
2Undo start new line
1. Try Undo
RESULT: Undo is working exactly in opposite direction.
3Split line
1. Move caret after abcde in line str = "abcde 123456";
2. Push Ctrl+Enter
RESULT:
- splits the line on a position of the caret, i.e. it behaves like normal Enter, but without moving of the caret
- indentation works as usually
Look at pictures:
before Ctrl+Enter

after Ctrl+Enter
4Undo split line
1. Try Undo
RESULT: Undo is working exactly in opposite direction.
Teardown:



Test suite 35: Annotations

Purpose:
Setup:

#Test caseDescription
1Adding Breakpoins to Java file
1. Add breakpoint use shortcut Shift+F8
2. Add breakpoint use main menu Debug|Add Breakpoint...
RESULT: There should be added red line to the place you selected
2Annotation on code folding sign
1. Add breakpoint on method declaration
2. Colapse this method (Ctrl--)
3. Expand this method (Ctrl-+)
RESULT: The annotation must be painted from begining to end of editor pane. See the image.
3Java Debugging With Breakpoints
1. Start debugger to the cursor
2. Step debugger
3. Stop debugger
4. Start debuger to the breakpoint
5. Step debugger
6. Continue debbegging to the next breakpoint
7. Stop debugger
RESULT: There should be highlighted active debugger lines, breakpoints and stacks content lines
4Java Syntax Error Indication
1. Type some errors to the file
2. Compile code
3. Select any error from Output Window [Compiler]
RESULT: Selected error line should be highlighted
5Adding Bookmarks
1. Add bookmark to the editor
RESULT: There should be marked bookmarked line in glyphs gutter.
6Removing Bookmarks
1. Remove bookmark
RESULT: The bookmark should disappear.
7Result of Highlight Search
1. Use highlight search
RESULT: There should be highlighted all matched strings
8Parser annotations
1. Write some error into editor
2. Wait a while to parser reparse source text
RESULT: Error code should be underlined and glyphs gutter should contains error annotation icon - (has error message tooltip)
9Annotation after ext. change 1
1. Open java file Annotations.java in editor.
2. Add breakpoints to 1st and last line and to lines in middle of file. These lines are marked with charecter # at end of adequate line in file.

3. Add bookmarks to 1st line and to line marked with $.
4. Open the edited file in external editor. Editors should be opened at the same time.
5. Remove 2nd line from external editor ( and save the external editor of cours)
RESULT: Each annotation (except the annotation on first line) should be moved one row up.
There should be the same behaviour by adding row to external editor, but annotation should be moved to the contrary direction.
10Annotation after ext. change 2
1. Use Test.java file from previous case with added bokkmarks and breakpoints.
2. Make an error in external editor.
3. Click to IDE to auto reloud file. Error should be underlined.
4. Fix the error in external editor.
5. Click to IDE to auto reloud file.
6. Do steps 2,3 and 4 a few times subsequently.
RESULT: Editor should be refreshed. Annotations should be on the adequate positiions.
11Annotation after ext. change 3
1. Use Test.java file from previsous case.
2. Delete in external editor rows market with "(r)" in comments. These rows are in middle of Test file.
RESULT: Annotations should be collapsed in one row.
12Annotation with undo and redo actions
1. Continue after do a steps from previous case.
2. Click to Undo icon in toolbar
3. Click to Redo icon in Toolbar.
RESULT: Annotations should be on the same positions as before 2nd and 3th steps.
13Annotation after discard
1. Open Test.java file
2. Uncomment row marked with ***.
3. Wait to line is underlined with wave annotation.
4. Call Close from popup menu in editor.
5. Click Discard to appeared dialog.
RESULT: Open the Test file and check it. There should be nothing underlined.
Teardown:



Test suite 36: Smart Selection

Purpose:
Setup:

#Test caseDescription
1Select Next Element
1. Place caret in to body of method, into "System.out.|println()" statement (Character "|" is the caret).
2. Select the statement with Ctrl-Alt-A
3. Select the body of method (use the shortcut above)
4. Select the class
5. Select the entire file
RESULT: The selection is extended from statement throught the body of block,method, class to the entire file. (The selection jumps over AST leves)
2Select Previous Element
1. Use the selection from previous case and try shorter the selection with Ctrl-Alt-Shift-A.
2. Try it more times.
RESULT: This should work in opposite the previous case.
Teardown:



Test suite 37: Line Endings

Purpose:
Setup: Default line endings :
1) if you create new file, then is used EOL from your OS
2) if you open existed file, then the default EOL is readed from first line of this file.
The Linux line endings is \n, the Win is \r\n and the Mac is \r.

#Test caseDescription
1Line Endings New Files
1. Create new files for each type
RESULT: Check line endings in any binary editor
2Line Endings For Java Files
1. Open file with unix end of lines characters
2. type some new lines
3. Open file with windows end of lines characters
4. type some new lines
RESULT: Check line endings in any binary editor for both files
3Mixed Line Endings
1. Open file with mixed EOL.
2. Edit it and add some rows to it.
3. Save it.
RESULT: File should be displayed with same count of lines like file with one type of EOL marks.
Teardown:



Test suite 38: Backup Files

Purpose:
Setup:

#Test caseDescription
1Backup Java Files
1. Create some new java file
2. Check if the option Tools|Options IDE Configurations|System|Filesystems Settings-> <current-filesystem-name> property "Files To Back Up By Extension" contains "java" text
3. Type some charactears to the file
4. Save File
RESULT: Check in system if backup file is created.
Teardown:



Test suite 39: Read Only Files

Purpose:
Setup:

#Test caseDescription
1Open Read Only File
1. Open read only file -> info "it is read-only" in status bar
2. Try type some characters
RESULT: It is not possible to make any change in read only file.
2Make File Read Only
1. Open any read/write file.
2. Make file read only (use command from your OS).
3. Type some characters to the editor.
4. Save file.
RESULT: There should appeared information dialog.
Teardown:



Test suite 40: JDK 1.5 Code Completion

Purpose: This test suite tests overall editing support of Java files.
Setup: Download this project. Start the IDE with a clean userdir and mount project "CCTest".

#Test caseDescription
1CC - Generics
1. Open test files "test1.CCTest1", "test2.CCTest2", "test11.CCTest11", "test12.CCTest12", "test13.CCTest13", "test14.CCTest14" and perform all instructions written in these files.
RESULT: The code completion results should match the correct results. Check syntax coloring in all files.
2CC - For Each
1. Open test file "test3.CCTest3" perform all instructions written in this file.
RESULT: The code completion results should match the correct results. Check syntax coloring in all files.
3CC - Static Import
1. Open test files "test4.CCTest4b", "test5.CCTest5b", "test7.CCTest7b" and perform all instructions written in these files.
RESULT: The code completion results should match the correct results. Check syntax coloring in all files.
4CC - Varargs
1. Open test files "test6.CCTest6", "test7.CCTest7a", "test7.CCTest7b" and perform all instructions written in these files.
RESULT: The code completion results should match the correct results. Check syntax coloring in all files.
5CC - Enums
1. Open test files "test8.CCTest8", "test9.CCTest9b", "test10.CCTest10b" and perform all instructions written in these files.
RESULT: The code completion results should match the correct results. Check syntax coloring in all files.
6CC - Annotations
1. Open test file "test15.CCTest15" and perform all instructions written in these files.
RESULT: The code completion results should match the correct results. Check syntax coloring in all files.
Teardown:



Test suite 41: Editor Settings

Purpose: This suite tests the editor settings.
Setup: Open any java source file in editor.

#Test caseDescription
1Font Size
1. Try to change font size from 11 (default) to 13. To achieve this go to Options->Tools->Editor Settings->Java Editor and change parameter font size. Setting in other tests will be changed in this tab unless specified differently.
RESULT: Font size should increase from 11 to 13. All text should be visible and clearly readable.
2Code Completion Delay
1. Try to change code completion delay from 500 (default) to 200 - parameter Delay of Completion Window Auto Popup.
RESULT: Check if code completion window appears faster.
3Code Completion Javadoc
1. Try to turn off javadoc for code completion - parameter Auto Popup Javadoc Window.
RESULT: Javadoc window should stop to appear when Code completion is invoked.
4Line Numbers
1. Try to activate/deactivate line numbers - parameter Line Numbers.
RESULT: Line numbers should appear/disappear in editor.
5Text Limit Count
1. Try to change the text limit count from 80 (default) to 120.
RESULT: The red line in editor which marks the text limit should be moved to 120 characters.
6Tab Size
1. Try to change the tab size from default 8 to 4.
2. Create a new file, which contains tabs, outside the editor. Try to open this file afterwards.
RESULT: Check if all tabs are converted to spaces and if the number of spaces is 4 per each tab.
7Highlight Caret Row
1. Try to activate/deactivate caret row highlighting - parameter Highlight Row Caret.
RESULT: The row with caret should be highlighted/not highlighted with light white background colour.
8Other Java Settings
RESULT: Observe if all changes are propagated into the editor and if all changes are reverted successfully.
9Text Antialiasing
1. Try to activate/deactivate text antialiasing in general editor settings.
RESULT: Text should become antialiased and then changed back to normal.
10Editor Toolbar
1. Try to disable/enable editor toolbar.
RESULT: Editor toolbar should dissapear and appear without side effects.
11Java Editor Key Bindings
1. Try to change keybindings in Java editor.
2. Open several java source files as well as non-java files and test the keybindings.
RESULT: The newly defined keybindings should work only in java files. They should not work in non-java files.
12Settings of Other File Types
1. Go through all settings of other file types (css, html, plain, jsp, properties, xml, dtd) and make a sanity check if all settings work. Choose from each tab several settings and try if they work for the currently opened file.
RESULT: All settings should work properly.
13Annotation Types
1. Test several of the annotation types settings for several of annotation types. Try to revert all changes aftwards.
RESULT: The changes should be propagated successfully to the editor without side effects. It should be possible to revert all changes.
14Editor Setting Help
1. Go through all editor settings tabs and invoke help in each tab (the questionmark at the bottom).
RESULT: Check if help for current tab is displayed for each of the tabs.
Teardown:



Test suite 42: Context Menu

Purpose: This suite tests the editor context menu.
Setup: Opened any file in editor and focus should be on editor window.

#Test caseDescription
1UI Test
1. Open context menu in editor.
RESULT: Check if the menu looks as it is designed in the new solution in this document: http://ui.netbeans.org/docs/hi/promoD/editorMenus.html
2Actions Test
1. Try to execute all available actions from context menu if they are provided by the editor module (some of them are provided by the refactoring module).
2. Test also actions which need a selection (copy, cut and paste).
RESULT: All menu items should perform expected actions, no exceptions should be thrown.
Teardown:



Test suite 43: Jump List

Purpose:
Setup:

#Test caseDescription
1Basic Jump List Functionality
1. Open several java files and perform several searches.
2. Try to jump through the jump list by pressing ALT+k for previous entry and ALT+l for next entry.
RESULT: Editor should navigate through all positions in successfull searches. Watch out for performance and for side effects.
2Jump List - Other Files
1. Open several java files and perform several searches.
2. Try to jump through the jump list by pressing ALT+SHIFT-k for previous entry in other file and ALT+SHIFT-l for next entry in other file.
RESULT: Editor should navigate through search occurrences but always in different files. Watch out for performance and side effects.
Teardown:



Test suite 44: Editor Navigation

Purpose:
Setup:

#Test caseDescription
1Go To Source
1. Create a java class with a String.
2. Move the caret to String and press ALT+O.
RESULT: You should be transferred to the java.lang.String source codes. They should be opened as read-only (in JDK 5).
2Go To Source - Missing Source
1. Create a java class with a class for which you don't have sources opened in projects. (e.g. open editor module, functional tests with jellytools).
2. Try to click on one of the class names for which you don't have sources opened in projects (e.g. org.netbeans.jemmy.EventTool).
RESULT: The go to class action cannot be performed. Verify the error message in status bar. The IDE should beep as well.
3Go To Declaration
1. Create a java class with the following code:
String s = "test";
System.out.println(s.charAt(0));
2. Go to the second line to the element "s" and press ALT-G.
RESULT: You should be transferred one line up - to the declaration of the s String.
Teardown:



Test suite 45: Miscellaneous Tests

Purpose:
Setup:

#Test caseDescription
1Show Javadoc
1. Create a java source file with a String. Press ALT-F1 on String.
RESULT: Javadoc window for java.lang.String should appear.
2Missing Javadoc
1. Create a java class and don't generate Javadoc for it.
2. Go to class name and press ALT-F1.
RESULT: A message in status bar explaining that javadoc is missing should appear.
3Comment Line
1. Open any java file. Try to comment several lines by pressing CTRL+SHIFT+T.
RESULT: The selected lines should be commented by //. No text should be displaced. Text colour should change to comments.
4Uncomment Line
1. Try to uncomment lines commented in previous test by pressing CTRL+SHIFT+D. Try to execute this action from toolbar, too.
RESULT: Comments in all selected lines should be removed. No side effect should appear.
5Editor Split
1. Open a java class.
2. Right click on it's Title tab and choose Clone document.
3. Moved the cloned document to the bottom of the screen.
4. Try to open several more files and move them from the top window to the bottom one and vice versa.
5. Try to close all documents one by one.
RESULT: Editor should be splitted into two during step 3. It should be possible to drag & drop editor tabs from top editor to the bottom one. During closing the documents the split should disappear when all documents are in the top or bottom part.
Teardown:



Test suite 46: Hyperlinking

Purpose: This suite tests the hyperlinking feature.
Setup: Opened any file in editor and focus should be on editor window.

#Test caseDescription
1Simple Hyperlinking
1. Add into your source code:
String s = "test";
s.charAt(1);
2. Try to perform hyperlinking on s. Move the mouse cursor over the s character, press Ctrl and click on the left mouse button.
RESULT: You should be moved one line up - to the beginning of the string's declaration.
2Simple Hyperlinking 2
1. Add into your source code:
String s = "test";
s.charAt(1);
2. Try to perform hyperlinking on String - on the first line. Move the mouse cursor over the String, press Ctrl and click on the left mouse button.
RESULT: You should be transferred to the class String.java. This will only happen if you have source codes of JDK mounted (available with JDK5). The opened file should be read only.
3Hyperlinking Negative Test
1. Add to your source code: import java.util.List;
2. Try to perform hyperlink jump on java and util words.
RESULT: Hyperlinking should fail with the following errors on status bar: "Cannot open element java." and "Cannot open element java.util.".
4Hyperlinking UI
1. Try to perform several hyperlinking actions and observe the UI.
2. Compare the underlining with the picture:

RESULT: Check that only reasonable elements are underlined on hovering (fields and classes). Check that underline always disappears. Check that the wait cursor disappears one hyperlink jump is done. Check that hyperlinking is reasonably fast and doesn't freeze. Check the changes of the cursor - it should change to a hand on hover, can change to wait cursor but at the end normal cursor should always appear.
5Multiple Hyperlink Actions
1. Add into your code String s = "test";
2. Perform hyperlink action on the String word.
3. Invoke other hyperlinking actions as long as it is possible. Click on various classes to navigate through the source codes.
RESULT: Verify that you are always transferred to the correct class. Check that no freezes or performance issues occur. Check the changes of the cursor. Check error messages in status bar.
Teardown:



Test suite 47: Error Stripe

Purpose: This suite tests the error stripe feature. This feature is currently available only through auto update, it is not a fixed part of editor yet.
Setup: Install error stripe module from autoupdate. Open any file in editor and focus should be on editor window.

#Test caseDescription
1Error Stripe Without Errors
1. Open any java source file without errors.
RESULT: The error stripe should be empty - there should be no red lines. The square on the top of the stripe should have green color. The tooltip on mouseover on the square should be "No errors".
2Simple Error
1. Add into your source code a line with an error (e.g. change public to pub lic).
RESULT: As soon as the error is detected the errornous line should be underlined. At that moment there should appear a red line in error stripe. It's position should correspond to the position of error in the source code. So if the error occurs in 30% of the whole file it should appear in 30% of the error stripe. The top square should change to red. Tooltips with error should be available on mouseover on the red line and red square should have a tooltip with number of errors. Red line should be clickable and should transport user to the respective error.
3More Errors
1. Open any java source file and make prolong it to at least 100 lines by inserting arbitrary code.
2. Make 5 errors right next to each other so that they appear very close in the error stripe.
RESULT: Check the visualization of individual errors - the red lines should not merge. Try to hover over individual lines and check if the mouse cursor changes properly to a link. Try to click on all the links. Check the red top square's colour and tooltip.
4Performance
1. Create a source file with 20000 lines by cut & paste with many errors. Try to introduce one error separately at the end of the file.
RESULT: Check the performance of error stripe. Check if errors are spread correctly inside the error stripe and if the first and last error.
Teardown:



Test suite 48: Sanity Test Suite

Purpose: This is a sanity test. It should be used to check if basic editor functionality works correctly (e.g. for a q-build test). For better verification use all the tests, this suite is just for the most commonly used functionality.
Setup: As described in individual test suites.

#Test caseDescription
1Warm Up Test
1. Perform tests according to 1. Warm Up Test.
RESULT: Expected result should be as described in individual test results.
2Opening Editor
1. Perform tests according to 2. Opening Editor.
RESULT: Expected result should be as described in individual test results.
3Keyboard & Shortcuts
1. Perform tests according to 4. Keyboard & Shortcuts.
RESULT: Expected result should be as described in individual test results.
4Mouse Test
1. Perform tests according to 5. Mouse Test.
RESULT: Expected result should be as described in individual test results.
5Find Test
1. Perform tests according to 7. Find Test.
RESULT: Expected result should be as described in individual test results.
6Replace Test
1. Perform tests according to 8. Find Test.
RESULT: Expected result should be as described in individual test results.
7Clipboard Test
1. Perform tests according to 11. Clipboard.
RESULT: Expected result should be as described in individual test results.
8Indentation Engines
1. Perform tests according to 14. Indentation Engines.
RESULT: Expected result should be as described in individual test results.
9Colorizing
1. Perform tests according to 12. Colorizing.
RESULT: Expected result should be as described in individual test results.
10Java Code Completion
1. Perform tests according to 16. Java Dynamic Code Completion.
RESULT: Expected result should be as described in individual test results.
11Toolbar And Gutter
1. Perform tests according to 25. Toolbar And Gutter.
RESULT: Expected result should be as described in individual test results.
12Editor Settings
1. Perform tests according to 41. Editor Settings.
RESULT: Expected result should be as described in individual test results.
13Context Menu
1. Perform tests according to 42. Context Menu.
RESULT: Expected result should be as described in individual test results.
Teardown:




Generated: 2005 03 11 02:21

[ Sun Proprietary/Confidential : Internal Use Only ] [Feedback to Webmaster ]
Updated June 5, 2003 3:44 PM