FeaturesPluginsDocs & SupportCommunityPartners

Test Specification for

Author: Tomas Musil
Last update: 16.09.2005
Introduction: Theese tests verify built in file manager (former Explorer), some basic actions like Cut/Copy/Paste, Rename, Delete and Popup search.

Table of Contents

Test suite: Copy/Cut/Paste, Delete and Rename

Purpose: This test intends to verify cut/copy/paste operations in one project and Rename, delete actions. All these actions can be invoked via popup on item (file or package), or from menu Edit, or via shortcuts. Try all posibilities. Check also if refactoring is properly launched when moving classes.
Setup: Start with clear userdir. Create sample java application (Anagrams game).

#Test case [automated]Description
1Copy a java file1. In Projects view, select file: Anagram game->Test Packages->com.toy.anagrams.lib->WordLibraryTest.java
2. Invoke a popup on this file
3. select Copy (CTRL+C)
4. Select Anagram game->Test Packages
5. Invoke popup, and select Paste (CTRL+V)
EXPECTED RESULT: File WordLibraryTest.java is copied into Test packages into newly created package named <default package>
2Delete a java file1. Select file WordLibraryTest.java created in previous case (in default package).
2. Delete this file (via Delete key, or popup on this file)
3. Confirm deleting in dialog
EXPECTED RESULT: File is deleted and <default package> dissapeared beacause it was empty.
3Cut a java file1. Select file: Anagram game->Test Packages->com.toy.anagrams.lib->WordLibraryTest.java
2. Select popup on this file
3. select Cut (CTRL+X)
4. Select Anagram game->Source Packages
5. Invoke popup, and select Paste (CTRL+V)
6. Refactoring wizard appears. Click next.
7. Confirm refactoring (moving .java file) by click on" Do refactoring"
EXPECTED RESULT: File WordLibraryTest.java is copied into Source packages into newly created package named <default package>. The original file (in Test Packages) is removed.
4Copy a form file1. Select Anagrams.java in Anagrams->Source packages->com.toy.anagrams.ui
2. Invoke from popup Copy (CTRL+C)
3. Select Test Packages of Anagrams project
4. Choose Paste (CTRL+V) from popup
5. Invoke from popup on copied file Open
EXPECTED RESULT: File was copied into Test Projects, into newly created <default package>, and was opened in documents window. Design of form is focused. Both source and design buttons on the top of document window are visible.
5Cut a form file1. Select About.java in Anagrams->Source packages->com.toy.anagrams.ui
2. Choose Cut (CTRL+X) from popup on this file
3. Select Test packages node in Anagrams
4. Invoke Paste (CTRL+V) from popup this node
5. Refactoring dialog appears, click Next and confirm move of the file by "Do Refactoring".
EXPECTED RESULT: File has moved into its new location, into <default package>
6Copy a form file which exists1. Select Anagrams.java in Anagrams->Source packages->com.toy.anagrams.ui
2. Invoke from popup Copy (CTRL+C)
3. Select Test Packages of Anagrams project
4. Choose Paste (CTRL+V) from popup
EXPECTED RESULT: File has been copied into Test Packages into <default package>, and renamed to "Anagrams_1.java", because "Anagrams.java" already exists.
7Delete a form file1. Select Anagrams.java in Anagrams->Source packages->com.toy.anagrams.ui
2. Hit DEL key
3. Confirm dialog
EXPECTED RESULT: File About.java is deleted. Check in your file manager that files Anagrams.java and Anagrams.form are removed from {$YOUR_PROJECT_PATH}/AnagramGame/src/com/toy/anagrams/ui
8Multiple copy1. Select both Anagrams.java and About.java in Test packages-><default package> of Anagrams
2. Invoke from popup Copy (CTRL+C)
3. Select Source Packages->com.toy.anagrams.ui of Anagrams project
4. Choose Paste (CTRL+V) from popup
EXPECTED RESULT: Two files were copied into Source Packages->com.toy.anagrams.ui : Anagrams.java and About.java
9Multiple cut1. Select Anagrams.java, About.java and Anagrams_1.java in Test packages-><default package> of Anagrams
2. Invoke from popup Cut (CTRL+X)
3. Select Test Packages->com.toy.anagrams.lib of Anagrams project
4. Choose Paste (CTRL+V) from popup
5. Confirm refactoring dialog by Next and Do Refactoring
EXPECTED RESULT: Three selected files are moved from <default package> of Test Packages into com.toy.anagrams.lib. <default package> dissapeared, since it was empty.
10Multiple delete1. Select Anagrams.java, About.java and Anagrams_1.java from Test Packages->com.toy.anagrams.lib
2. From popup choose Delete
3. Confirm delete
EXPECTED RESULT: All three selected files are deleted. Only WordLibraryTest.java remained in this package.
11Renaming package1. Select Anagrams->Source packages-><default package>
2. from popup, choose Refactor->Rename...(ALR+SHIFT+R)
3. enter some name (e.g. mypackage), click next, confirm by Do Refactoring
EXPECTED RESULT: Package is renamed, still contains one file (WordLibraryTest.java)
12Renaming a single file1. Select file: Anagrams->Source packages->mypackage->WordLibraryTest.java
2. By shortcut ALT+SHIFT+R launch Rename dialog
3. Type a new name (e.g. WordLibraryTestRenamed)
4. Click Next and confirm rename by Do refactoring
EXPECTED RESULT: File is correctly renamed, its placement did not change.
13Renaming two files1. Select in Anagrams->Source packages->com.toy.anagrams.ui both About.java and Anagrams.java
2. Invoke from popup Refactor->Rename
EXPECTED RESULT: Rename cannot be invoked, its disabled because more than one file is selected.
14Renaming a single file to invalid name1. Select file: Anagrams->Source packages->mypackage->WordLibraryTestRenamed.java
2. By F2 shortcut, launch inplace renaming
3. Type wrong name (e.g. !(*&#@%^$) and press Enter
4. In next dialog press next button
EXPECTED RESULT: In following dialog, next button is disabled, error message is displayed.
15Renaming form file1. Select Anagrams.java in Anagrams->Source packages->com.toy.anagrams.ui->About.java
2. Invoke renaming by ALT+SHIFT+R
3. Type AboutRenamed, click Next button
4. Confirm by Do Refactoring button
EXPECTED RESULT: Files (both .java and .form) are renamed, check in your manager.
16Deleting whole package1. Select Anagrams->Source packages->mypackage
2. from popup invoke Delete
3. Confirm delete
EXPECTED RESULT: Package "mypackage" has been removed, including file it contained.
17Deleting opened file1. Open Anagrams.java
2. Select Anagrams->Source packages->com.toy.anagrams.lib->Anagrams.java
3. Hit DEL key
4. Confirm delete
EXPECTED RESULT: File Anagrams.java (and also Anagrams.form - check in your manager) is deleted and its document window is closed
18Deleting more items1. Select package Anagrams->Source packages->com.toy.anagrams.lib, and file Anagrams->Source packages->com.toy.anagrams.ui->AboutRenamed.java
2. Hit Del key
3. Confirm deleting of two items
EXPECTED RESULT: Selected package and file were removed.
19Deleting whole Project1. Open a project.
2. Select "Delete Project" item in project's popup menu.
EXPECTED RESULT: The "Delete Project" dialog is showed. If you click on yes, the project will be deleted.


Test suite: Copy/Cut/Paste between two projects

Purpose: This test intends to verify cut/copy/paste operations between two projects. All these actions can be invoked via popup on item (file or package), or from menu Edit, or via shortcuts. Try all posibilities. Check also if refactoring is properly launched when moving classes.
Setup: Start with clear userdir. Create 2 projects: Java application and Sample java application (Anagrams game)

#Test case [automated]Description
1Copy a java file between two projects1. In JavaApplication1, select Source packages->javaapplication1->Main.java
2. Invoke from popup Copy (CTRL+C)
3. In Anagrams, select Source packages
4. Invoke from popup Paste (CTRL+V)
EXPECTED RESULT: File Main.java is copied from JavaApplication1 to Anagrams, and is placed into a Source packages-><default package>
2Copy a whole package between two projects1. In JavaApplication1, select package: Source packages->javaapplication1
2. Invoke from popup Copy (CTRL+C)
3. In Anagrams, select Source packages
4. Invoke from popup Paste (CTRL+V)
EXPECTED RESULT: Package (and its content) is copied into Anagrams project, and is placed into Source packages
3Copy multiple files between two projects1. In Anagrams, select files About.java and Anagrams.java from Source packages->com.toy.anagrams.ui
2. Invoke from popup Copy (CTRL+C)
3. In JavaApplication1, select Source packages->javaapplication1 package
4. Invoke from popup Paste (CTRL+V)
EXPECTED RESULT: Both files (and both .java and .form) ale copied into JavaApplication1 project, and are placed in Source packages->javaapplication1 package (check that all files are present there in manager)
4Copy multiple files that already exist betwwen two projects.1. This case is the same as previous, but copied files already exist in their destination.
2. In Anagrams, select files About.java and Anagrams.java from Source packages->com.toy.anagrams.ui
3. Invoke from popup Copy (CTRL+C)
4. In JavaApplication1, select Source packages->javaapplication1 package
5. Invoke from popup Paste (CTRL+V)
EXPECTED RESULT: Both files (and both .java and .form) are renamed (because they already exist - added "_1" suffix) and copied into JavaApplication1 project, and are placed in Source packages->javaapplication1 package (check that all files are present there in manager)
5Cut a java file between two projects1. In JavaApplication1, select Source packages->javaapplication1->Main.java
2. Invoke from popup Cut (CTRL+X)
3. In Anagrams, select Test packages
4. Invoke from popup Paste (CTRL+V)
5. Click Next in refactoring dialog, and confirm move by Do refactoring
EXPECTED RESULT: File Main.java is moved from JavaApplication1 to Anagrams, and is placed into a Test packages-><default package>
6Cut multiple packages between two projects1. Select com.toy.anagrams.lib and com.toy.anagrams.ui packages from Anagrams->Source packages
2. Invoke from popup Cut (CTRL+X)
3. Select in JavaApplication1->Test packages
4. Invoke from popup Paste (CTRL+V)
EXPECTED RESULT: Two packages are moved from Anagrams project into JavaApplication1->Test packages
7Cut multiple files between two projects1. In JavaApplication1, select all 4 files in Source packages->javaapplication1 package (About_1.java, About.java, Anagrams_1.java, Anagrams.java)
2. Invoke from popup Cut (CTRL+X)
3. Select Anagrams->Test packages
4. Invoke from popup Paste (CTRL+V)
5. Click Next in refactioring dialog. Confirm move by Do refactoring
EXPECTED RESULT: All four files ale moved into Anagram game project, and are placed in Test packages-><default package>


Test suite: Drag and drop

Purpose:
Setup: Start with clear userdir. Create a new sample java project (Anagrams game). Perform these actions in projects view. Check also if refactoring is properly launched when moving classes.

#Test case [automated]Description
1Move file by DnD1. Purpose of this is to move file About.java to Test packages->com.toy.anagrams.lib
2. Select Anagrams->Source packages->com.toy.anagrams.ui->About.java
3. Drag About.java file and drag it over Test packeges. Still hold the mouse
4. Test packages node expands, and while still holding the mouse, move the mouse to com.toy.anagrams.lib package.
5. Release the mouse, confirm dialog by next, and by Do refactoring
EXPECTED RESULT: File is properly moved.
2Copy file by DnD1. Purpose of this is to copy file Anagrams.java to Test packages->com.toy.anagrams.lib
2. Select Anagrams->Source packages->com.toy.anagrams.ui->Anagrams.java
3. Drag (and hold CTRL) Anagrams.java file and drag it over Test packeges. Still hold the CTRL and mouse
4. Test packages node expands, and while still holding the mouse, move the mouse to com.toy.anagrams.lib package.
5. Release the mouse, release CTRL.
EXPECTED RESULT: The file is properly copied.
3Copy file that exists by DnD1. Purpose of this is to copy file Anagrams.java to Test packages->com.toy.anagrams.lib, where the same file already exists
2. Select Anagrams->Source packages->com.toy.anagrams.ui->Anagrams.java
3. Drag (and hold CTRL) Anagrams.java file and drag it over Test packeges. Still hold the CTRL and mouse
4. Test packages node expands, and while still holding the mouse, move the mouse to com.toy.anagrams.lib package.
5. Release the mouse, release CTRL.
EXPECTED RESULT: File is copied to new location as Anagrams_1.java, becease Anagrams.java already existed.
4Move package by DnD1. Purpose of this is to move Source packages->com.toy.anagrams.ui to Test packages
2. Select Source packages->com.toy.anagrams.ui and drag it over Test packages
3. Drop there
EXPECTED RESULT: Package and its content has moved under Test packages.
5Move package to one that exists by DnD1. Select Test packages->com.toy.anagrams.lib package
2. Drag it to Source package
3. Drop there
EXPECTED RESULT: Package is properly moved, and its content is joined with the package of the same name in Source packages.
6Copy package by DnD1. Purpose of this is to copy Test packages->com.toy.anagrams.ui to Source packages
2. Select Test packages->com.toy.anagrams.ui, press CTRL and while still holding CTRL drag it over Source packages
3. Drop there and release CTRL
EXPECTED RESULT: Package is properly copied. (see issue 60481 !!)
7Try forbidden DnD1. Try some forbidden DnD (e.g. try to drag Libraries into Source packages)
EXPECTED RESULT: Action does not perform.
8Check consistency between Projects and Files view.1. Focus on files view
2. Select file About.java in Anagram game/src/com/toy/anagrams/lib
3. Copy this file by DnD (with holding CTRL) to Anagram game/test/com/toy/anagrams/ui. If you don't have all the destination nodes expanded, hold while DnD mouse over some node and it expands its subnodes after while.
EXPECTED RESULT: Check if copied file appears also in projects view in Test packages->com.toy.anagrams.ui package


Test suite: Popup search

Purpose: This intends to test popup search in projects tab.
Setup: Start with clear userdir. Create sample java project (e.g.Anagram game)

#Test case [automated]Description
1Popup search open1. Focus on Projects tab
2. Start typing a text
EXPECTED RESULT: Popup search textfiels appears in the upper left corner of the projects tab
2Find first occurence1. Focus on Projects tab
2. Type some item name that you see inside your opened project (e.g. Libraries)
EXPECTED RESULT: Selection is moved to a typed item.
3Find next occurence1. Focus on Projects tab
2. Expand node Anagrams->Source packages->com.toy.anagrams.ui, so that files About.java and Anagrams.java are visible.
3. Type "A"
4. Press down arrow several times.
EXPECTED RESULT: The selection moves around the items which name starts with "A" (AnagramGame, About.java, Anagrams.java)
4Find occurencies with scrolling1. Make projects view horizontally smaller, so that only a few items are visible.
2. Focus on Projects tab
3. Type some name of an item, which you just don't see, because of small projects view. (but you know it would apper if you have scrolled)
EXPECTED RESULT: The window scrolls and the item (which name you have typed) is selected
5Deleting in popup search1. Make projects view normal size as usual (teardown from previous test)
2. Focus on Projects tab
3. Start typing some text
4. try to press backspace key
EXPECTED RESULT: Selection is moved to the first occurence of current typed text - when deleting last character, selection can move to the previous selection
6Exit the popup search1. Focus on Projects tab
2. Start typing a text
3. Selection moves to the items that are currently matching typed text
4. Press ESC
EXPECTED RESULT: After ESC is pressed, popup search disappears but last item that was selected remains selected.


Test suite: Other tests

Purpose:
Setup: No setup needed

#Test case [automated]Description
1Ignored files property1. Create new java project (JavaApplication)
2. Invoke popup on Source packages, select New | Empty file
3. Type test.txt and click Finish
4. Check if file is visible in Projects view (in default package under source packages) and in Files view under src folder.
5. Now try to disable viewing all txt files: go to Tools | Options, select IDE configuration | System | System settings
6. Now change the "ignored files" property: Add to the end of its line regular expression |.*\.txt
7. Confirm and check files and projects view.
EXPECTED RESULT: Since all files with extension TXT are disabled to view, your created file should not be visible in projects view, nor in files view



Generated: Mon Oct 10 15:24:52 CEST 2005
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by