TS 72 FilesAndProjectsView

Test Specification for Files and Projects View

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

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 possibilities. Check also if refactoring is properly launched when moving/copying classes.
Setup: Start with clear userdir. Create sample java application (e.g. Anagrams game). Actions are performed in projects view.


  1. Copy a java file
    1. select Copy (CTRL+C) on some java file.
    2. Invoke popup on some other package, and select Paste (CTRL+V), refactoring dialog appears.
    • EXPECTED RESULT: File is properly copied into other package
  1. Copy a java file when destination contains the same file
    1. select Copy (CTRL+C) on some java file.
    2. Invoke popup on some other package, that contains file of the same name. and select Paste (CTRL+V), refactoring dialog appears.
    • EXPECTED RESULT: File is properly copied into other package, original file should not be overwriten
  1. Delete a java file
    1. Select some java file.
    2. Delete this file (via Delete key, or popup on this file)
    3. Safe delete dialog appears.
    • EXPECTED RESULT:
  1. Cut a java file
    1. select Cut (CTRL+X) on some java file
    2. Invoke popup on some other package, and select Paste (CTRL+V), refactoring dialog appears.
    • EXPECTED RESULT: File is properly moved.
  1. Copy a form file
    1. Create Anagrams game sample project
    2. Invoke Copy (CTRL+C) on Anagrams.java
    3. Paste it to another package, confirm refactoring.
    • EXPECTED RESULT: Copied file can be opened and edited in editor.
  1. Delete a form file
    1. Delete previously copied form file
    • EXPECTED RESULT: check (e.g. in console) that both .java and .form file were deleted.
  1. Cut a form file
    1. Invoke Cut (CTRL+X) on Anagrams.java
    2. Invoke Paste (CTRL+V) on another package, confirm refactoring.
    • EXPECTED RESULT: File has moved into its new location, no error badging is shown.
  1. Multiple copy / multiple cut
    1. Try to copy / cut on multiple files from one package to another
    • EXPECTED RESULT: All selected files are properly copied / moved.
  1. Multiple delete
    1. Select multiple files, invoke delete
    • EXPECTED RESULT: All files are properly deleted.
  1. Deleting whole package
    1. invoke delete on some package
    2. Confirm delete
    • EXPECTED RESULT: Package + content is removed
  1. Deleting opened file
    1. Invoke delete on some file that is opened in editor
    • EXPECTED RESULT: File is deleted and its document window is closed
  1. Deleting whole Project
    1. Create or open some project.
    2. invoke Delete project in project's popup menu.
    • EXPECTED RESULT: The "Delete Project" dialog is showed. If you click on yes, the project will be deleted.
  1. Deleting whole Project with sources
    1. Create or open some project.
    2. invoke Delete project in project's popup menu, check that you want to delete also sources.
    • EXPECTED RESULT: The "Delete Project" dialog is showed. If you click on yes, the project and its sources 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.

  1. Copy a java file between two projects
    1. Invoke Copy (CTRL+C) on file from first project
    2. Invoke from Paste (CTRL+V) on some package in second project
    • EXPECTED RESULT: file is properly copied
  1. Copy a whole package between two projects
    1. Invoke from popup Copy (CTRL+C) on some package on first project
    2. Paste the package into second project
    • EXPECTED RESULT: Package (and its content) is properly copied
  1. Cut a java file between two projects
    1. Invoke Cut (CTRL+X) on file from first project
    2. Invoke from Paste (CTRL+V) on some package in second project
    • EXPECTED RESULT: file is properly moved
  1. Cut multiple packages between two projects
    1. Select more packages in one project, invoke from popup Cut (CTRL+X)
    2. Paste them into another poject
    • EXPECTED RESULT: Packages are properly moved


Test suite: Drag and drop

Purpose:
Setup: Start with clear userdir. Create some project. Perform these actions in projects view. Check also if refactoring is properly launched when moving classes.


  1. Move file by DnD
    1. Drag some file from one package to another, refactoring dialog appears
    • EXPECTED RESULT: File is properly moved.
  1. Copy file by DnD
    1. Drag + hold CTRL some file from one package to another, refactoring dialog appears
    • EXPECTED RESULT: File is properly copied.
  1. Move package by DnD
    1. Drag some package from one project to another, refactoring dialog appears
    • EXPECTED RESULT: Package is properly moved.
  1. Copy package by DnD
    1. Drag + hold ctrl some package from e.g. source packages to test packages, refactoring dialog appears
    • EXPECTED RESULT: Package is properly coped.
  1. Try forbidden DnD
    1. Try some forbidden DnD (e.g. try to drag Libraries into Source packages)
    • EXPECTED RESULT: Action does not perform.
  1. Try forbidden DnD - .class file
    1. Have some .jar file added in Libraries folder.
    2. Expand this .jar file and try to DnD some .class file from this .jar into one of Source packages.
    • EXPECTED RESULT: Action does not perform.


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)


  1. Popup search open
    1. Focus on Projects tab
    2. Start typing a text
    • EXPECTED RESULT: Popup search textfiels appears in the upper left corner of the projects tab
  1. Find first occurence
    1. 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.
  1. Find next occurence
    1. 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)
  1. Find occurencies with scrolling
    1. 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
  1. Deleting in popup search
    1. 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
  1. Exit the popup search
    1. 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: Project actions

Purpose:
Setup:

  1. Open recent project list
    1. Open project AAA
    2. Close the AAA project
    3. open menu File | Open Recent Project
    • EXPECTED RESULT: The project is listed in the menu menu
  1. Open recent project
    1. Open project BBB
    2. Close the BBB project
    3. File | Open Recent Project | BBB
    • EXPECTED RESULT: The project opens in IDE again
  1. Create new configuration
    1. In project customizer, Run panel, create new configuration
    • EXPECTED RESULT: New configuration is created, you can see it in combomox in a global toolbar.
  1. Customize configuration
    1. Expand combobox in toolbar, click Customize
    2. Change configuration you created in previous step (e.g. add some arguments)
    • EXPECTED RESULT: New configuration was customized, changes are persistent
  1. Set active configuration
    1. Expand combobox in toolbar, select both default configuration and your new configuration
    • EXPECTED RESULT: Check that fields of Run panel in project customizer are reflecting chosen configuration.TBD
  1. Delete configuration
    1. In project customizer, Run panel, invoke delete of the configuration
    • EXPECTED RESULT: Configuration is deleted.TBD
  1. Open project action in Favorites view
    1. Open favorites window (see #54122)
    2. Browse there for some project folder
    3. Invoke Open project on project folder node
    • EXPECTED RESULT: Project is opened


Test suite: Project groups

Purpose:
Setup:


  1. Create new project group - free group
    1. Have 3 opened java projects in IDE (pr1, pr2, pr3)
    2. File | Project Group | Create group
    3. Name the group GROUP_1, choose Free Group, click Finish
    • EXPECTED RESULT: New project group is created and visible in Files
  1. Create new project group - project with dependencies group
    1. Have prepared project master and slave. Project master depends on slave.
    2. File | Project Group | Create group
    3. Name the group GROUP_2, choose Project and all required projects, browse for master project, click Finish
    • EXPECTED RESULT: New project group is created and visible in Files
  1. Create new project group - folder of projects
    1. File | Project Group | Create group
    2. Name the group GROUP_3, choose Folder of projects, browse for folder e.g. NetBeansProjects, click Finish
    • EXPECTED RESULT: New project group is created and visible in Files
  1. Switch project groups
    1. try to open all of previously created project groups by selecting them one by one in File | Project Group
    • EXPECTED RESULT: Project groups are switched, appropriate projects are opened
  1. Properties of project groups
    1. try to open properies of previously created project groups by selecting them one by one in File | Project Group and invoking File | Project Group | Propertes of "xxx"
    • EXPECTED RESULT: For GROUP_2 and GROUP_3 you are able to change group name (try). For GROUP_1 you are able to customize name, and auto-saving of project group.
  1. Autosaving of free project groups
    1. Switch to GROUP_1
    2. Open another project (ABCD)
    3. Switch to GROUP_2
    4. Switch back to GROUP_1
    • EXPECTED RESULT: GROUP_1 now contains also project ABCD
  1. Disabled autosaving of free project groups
    1. Switch to GROUP_1
    2. Disable autosaving of group in group properties
    3. Open another project (EFG)
    4. Switch to GROUP_2
    5. Switch back to GROUP_1
    • EXPECTED RESULT: GROUP_1 should not contain project EFG
  1. Manual saving of free project groups
    1. Switch to GROUP_1
    2. Check autosaving of group is disabled in group properties
    3. Open another project (XYZ)
    4. Go to group properties and push "Save current project list now" button
    5. Switch to GROUP_2
    6. Switch back to GROUP_1
    • EXPECTED RESULT: GROUP_1 should contain project XYZ
  1. Removing project groups
    1. Switch to GROUP_3
    2. File | Project Group | Create group | Remove "GROUP_3"
    • EXPECTED RESULT: GROUP_3 is removed


Test suite: Running IDE with Project Group switches

Purpose:
Setup: Continue with previous projects and project groups.

  1. Opening IDE with no switch
    1. Close IDE
    2. Run it again from command line
    • EXPECTED RESULT: The IDE is started with Project group opened. The Group is the same as was opened when IDE was closed.


  1. Opening IDE with "--close-group" switch
    1. Close IDE
    2. Run it again from command line and add "--close-group" switch
    • EXPECTED RESULT: The IDE is started with no Project group opened.


  1. Opening IDE with "--open-group" switch
    1. Close IDE
    2. Run it again from command line and add "--open-group XXX" switch, where XXX is name of some of group, that you created in previous test case. (Use quotes for names with spaces in Windows shortcut.)
    • EXPECTED RESULT: The IDE is started with XXX Project group opened.


  1. Opening IDE with "--list-groups" switch
    1. Close IDE
    2. Run it again from command line and add "--list-groups" switch
    • EXPECTED RESULT: In command line are printed names of all your Project Groups.

Test suite: Collapse all feature

Purpose: This test case covers functionality of Collapse All feature (since NB 7.2).
Setup: No setup needed


  1. Collapse All in Project View
    1. Create 3 new java projects (e.g Prj1, Prj2, Prj3)
    2. Invoke popup in Projects view (but NOT on some node)
    3. Select Collapse All
    • EXPECTED RESULT: All projects nodes are collapsed. You can see only 3 projects node (Prj1, Prj2, Prj3).


  1. Collapse All in Files View
    1. Continue with projects from previous test case.
    2. In Main menu click on: Windows | Files (Ctrl + 2).
    3. In Files view are three collapsed files (Prj1, Prj2, Prj3).
    4. Expand them all (Double click on each Prj* file).
    5. Invoke popup in Files view (but NOT on some node)
    6. There is only one item in popup menu (Collapse All) .
    7. Select Collapse All
    • EXPECTED RESULT: All projects/files nodes are collapsed. You can see only three Files (Prj1, Prj2, Prj3). Files view looks exactly the same as in step 3.


Test suite: Other tests

Purpose:
Setup: No setup needed


  1. Ignored files property
    1. 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, click Miscellanous button and select Files.
    6. Now change the "ignored files" property: append regular expression |.*\.txt to the line
    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


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo