TS 72 ProjectsActions

(Difference between revisions)
(Test suite: Export/Import zip)
(Test suite: Project actions)
 
(13 intermediate revisions not shown)
Line 1: Line 1:
==Projects Test Specification for Projects actions ==
==Projects Test Specification for Projects actions ==
'''Author:''' [mailto:Tomas.Musil@Sun.Com Tomas Musil], [mailto:adam.senk@oracle.com Adam Senk] <br>
'''Author:''' [mailto:Tomas.Musil@Sun.Com Tomas Musil], [mailto:adam.senk@oracle.com Adam Senk] <br>
-
'''Last update:''' 08.02.2012 <br>
+
'''Last update:''' 30.07.2013 <br>
'''Introduction:'''  Test basics of project action which can be called on j2se project and  export/improt in zip format.
'''Introduction:'''  Test basics of project action which can be called on j2se project and  export/improt in zip format.
Line 14: Line 14:
# {{testcase|Choosing main project}}
# {{testcase|Choosing main project}}
##Create two projects
##Create two projects
-
#* {{result|EXPECTED RESULT: In Run | Set Main project you can choose which of them will be main (or none of them). Try all possibilities. }}
+
#* {{result|EXPECTED RESULT: In Run - Set Main project menu you can choose which of them will be main (or none of them). Try all possibilities. }}
-
+
# {{testcase|Actions for main project}}
# {{testcase|Actions for main project}}
##Have two projects with main classes,set one of them as main project
##Have two projects with main classes,set one of them as main project
##Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)  
##Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)  
#* {{result|EXPECTED RESULT: In both cases, main class of main project is ran}}
#* {{result|EXPECTED RESULT: In both cases, main class of main project is ran}}
-
 
# {{testcase|Actions for non-main project}}
# {{testcase|Actions for non-main project}}
##Have two projects with main classes,none of them is main
##Have two projects with main classes,none of them is main
##Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)
##Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)
-
#* {{result|EXPECTED RESULT: Run action is now context sensitive - which main class is ran depends now on context. }}
+
#* {{result|EXPECTED RESULT: IDE give you menu with as many options as there is projects. You choose one of theme and the project will be run. The project also is set as main.}}
-
+
-
# {{testcase|Persistence of "Open as main project"}}
+
-
##Check persistence of "Open as main project" on open project dialog.
+
-
#* {{result|EXPECTED RESULT: Should be off by default, but state should be remembered. }}
+
-
+
-
# {{testcase|Persistence of "Set as main project"}}
+
-
##Check persistence of "Set as main project" on new project wizard.
+
-
#* {{result|EXPECTED RESULT: Should be on by default, but state should be remembered. (details for which projects is on/off are here: MainProjectConceptualChange  }}
+
-
+
# {{testcase|Project configuration in context }}
# {{testcase|Project configuration in context }}
##Create main project P1, non main project P2
##Create main project P1, non main project P2
Line 44: Line 33:
Setup: Start with fresh userdir. Create some sample project e.g. Anagrams game.<br>
Setup: Start with fresh userdir. Create some sample project e.g. Anagrams game.<br>
          
          
-
# {{testcase|Build project with CoS enabled}}
 
-
##Turn ON compile on save feature in project properties (right-click the project, invoke Properties, select Compiling section, check Compile on Save)
 
-
##Invoke ''Build'' on project
 
-
#* {{result|EXPECTED RESULT: A message saying the project is built automatically shows up. There are buttons "Project properties", "Clean and Build" and "OK".}}
 
-
 
-
# {{testcase|Build project with CoS disabled}}
 
-
##Turn OFF compile on save feature in project properties (right-click the project, invoke Properties, select Compiling section, uncheck Compile on Save)
 
-
##Invoke ''Build'' on project
 
-
#* {{result|EXPECTED RESULT: Project is build. No message is shown, no output is written.}}
 
-
 
 
# {{testcase|Clean and build project}}
# {{testcase|Clean and build project}}
##Invoke ''Clean and Build'' on project
##Invoke ''Clean and Build'' on project
#* {{result|EXPECTED RESULT: Project is cleaned and built, check JAR file in dist folder and *.class files in build folder. }}
#* {{result|EXPECTED RESULT: Project is cleaned and built, check JAR file in dist folder and *.class files in build folder. }}
-
 
# {{testcase|Clean project}}
# {{testcase|Clean project}}
##Invoke ''Clean'' on project
##Invoke ''Clean'' on project
-
#* {{result|EXPECTED RESULT: Project is cleaned dist and build folders are deleted. }}
+
#* {{result|EXPECTED RESULT: Project is cleaned. Dist and build folders are deleted. }}
-
+
# {{testcase|Run project}}
# {{testcase|Run project}}
##Invoke ''Run'' on project
##Invoke ''Run'' on project
#* {{result|EXPECTED RESULT: Project is ran. }}
#* {{result|EXPECTED RESULT: Project is ran. }}
-
 
# {{testcase|Debug project}}
# {{testcase|Debug project}}
##Put breakpoint into some source file
##Put breakpoint into some source file
##Invoke ''Debug'' on project
##Invoke ''Debug'' on project
#* {{result|EXPECTED RESULT: Project is ran in debug mode, debugger stops at breakpoint. }}
#* {{result|EXPECTED RESULT: Project is ran in debug mode, debugger stops at breakpoint. }}
-
 
# {{testcase|Test project}}
# {{testcase|Test project}}
##Invoke ''Test'' on project
##Invoke ''Test'' on project
#* {{result|EXPECTED RESULT: Tests of project are launched, output window with test results is opened. }}
#* {{result|EXPECTED RESULT: Tests of project are launched, output window with test results is opened. }}
-
 
-
# {{testcase|Set main project}}
 
-
##Open some project as not main project (uncheck Open as main project checkbox during opening)
 
-
##Invoke ''Set main project'' on project
 
-
#* {{result|EXPECTED RESULT: Project is set as main. Name of project node is bold. All project shortcuts (F6, F11, S-F11,...) are binded with this project.}}
 
-
 
# {{testcase|Open required projects}}
# {{testcase|Open required projects}}
##Create new project called ''master''
##Create new project called ''master''
Line 87: Line 56:
##Invoke ''Open required projects'' on master project
##Invoke ''Open required projects'' on master project
#* {{result|EXPECTED RESULT: Slave project is opened.}}
#* {{result|EXPECTED RESULT: Slave project is opened.}}
-
 
# {{testcase|Rename project}}
# {{testcase|Rename project}}
##Invoke ''Rename'' on project
##Invoke ''Rename'' on project
##Do not check to rename project folder  
##Do not check to rename project folder  
#* {{result|EXPECTED RESULT: Only project display name is changed, project folder is the same. }}
#* {{result|EXPECTED RESULT: Only project display name is changed, project folder is the same. }}
-
 
# {{testcase|Rename project with project folder}}
# {{testcase|Rename project with project folder}}
##Invoke ''Rename'' on project
##Invoke ''Rename'' on project
##Check to rename also project folder
##Check to rename also project folder
#* {{result|EXPECTED RESULT: Both project display name and project folder are changed. }}
#* {{result|EXPECTED RESULT: Both project display name and project folder are changed. }}
-
 
# {{testcase|Move project}}
# {{testcase|Move project}}
##Invoke ''Move'' on project
##Invoke ''Move'' on project
##Select target location  
##Select target location  
#* {{result|EXPECTED RESULT: Project is successfully moved. }}
#* {{result|EXPECTED RESULT: Project is successfully moved. }}
-
 
# {{testcase|Copy project}}
# {{testcase|Copy project}}
##Invoke ''Copy'' on project
##Invoke ''Copy'' on project
##Select target location and project name  
##Select target location and project name  
#* {{result|EXPECTED RESULT: Project is successfully copied to target location with new name. }}
#* {{result|EXPECTED RESULT: Project is successfully copied to target location with new name. }}
-
 
# {{testcase|Delete project}}
# {{testcase|Delete project}}
##Invoke ''Delete'' on project
##Invoke ''Delete'' on project
##Do not check to delete also soources
##Do not check to delete also soources
#* {{result|EXPECTED RESULT: Project is deleted, but under project folder remained sourceroot and testroot. }}
#* {{result|EXPECTED RESULT: Project is deleted, but under project folder remained sourceroot and testroot. }}
-
 
# {{testcase|Delete project with sources}}
# {{testcase|Delete project with sources}}
##Invoke ''Delete'' on project
##Invoke ''Delete'' on project
##Check to delete also sources
##Check to delete also sources
#* {{result|EXPECTED RESULT: Project folder is deleted with its content. }}
#* {{result|EXPECTED RESULT: Project folder is deleted with its content. }}
 +
 +
====Test suite: Project actions - multiple project selection====
 +
Purpose: Project-wide actions, such as Clean & Build, may now be run when multiple projects are selected.  <br>
 +
Setup: Start with fresh userdir. Create two or more J2SE projects. Test all actions, when all projects in propject view are selected<br>
 +
       
 +
 
 +
# {{testcase|Clean and build multiple projects}}
 +
##Invoke ''Clean and Build'' on multiple projects selected
 +
#* {{result|EXPECTED RESULT: All projects are cleaned and built, check JAR file in dist folder and *.class files in build folder. }}
 +
 +
# {{testcase|Clean multiple projects }}
 +
##Invoke ''Clean'' on multiple project selected
 +
#* {{result|EXPECTED RESULT:All project are cleaned dist and build folders are deleted. }}
 +
 +
# {{testcase|Run multiple projects}}
 +
##Invoke ''Run'' on multiple projects selected
 +
#* {{result|EXPECTED RESULT: All projects are ran. }}
 +
 +
# {{testcase|Debug multiple project}}
 +
##Put breakpoint into some source file in each project
 +
##Invoke ''Debug'' on multiple projects selected
 +
#* {{result|EXPECTED RESULT: All project are ran in debug mode, debugger stops at breakpoint. }}
 +
 +
# {{testcase|Test multiple project}}
 +
##Invoke ''Test'' on multiple project selected
 +
#* {{result|EXPECTED RESULT: Tests of all projects are launched, output window with test results is opened. }}
 +
 +
# {{testcase|Rename multiple projects}}
 +
##Invoke ''Rename'' on multiple projects selected
 +
##Do not check to rename project folder
 +
#* {{result|EXPECTED RESULT:The rename action is invoked for each project.}}
 +
 
 +
# {{testcase|Move multiple project}}
 +
##Invoke ''Move'' on multiple projects selected
 +
#* {{result|EXPECTED RESULT: The move action is invoked for each selected project.}}
 +
 +
# {{testcase|Copy multiple projects}}
 +
##Invoke ''Copy'' on multiple projects selected
 +
#* {{result|EXPECTED RESULT: The copy action is invoked for each selected project. }}
 +
 +
# {{testcase|Delete multiple project}}
 +
##Invoke ''Delete'' on project
 +
#* {{result|EXPECTED RESULT: The delete action is invoked for each selected project. }}
====Test suite: Actions of files====
====Test suite: Actions of files====
Line 169: Line 175:
##Select path to export ZIP file.
##Select path to export ZIP file.
##Click on "Export" button.
##Click on "Export" button.
-
#* {{result|EXPECTED RESULT: Project is exported as a ZIP. Check exported file (On correcr place should be placed correct ZIP file.) }}
+
#* {{result|EXPECTED RESULT: Project is exported as a ZIP. Check exported file (On correcr place should be placed correct ZIP file.)Dist, build and private directories should be excluded from ZIP file. }}
    
    
# {{testcase|Import ZIP}}
# {{testcase|Import ZIP}}
Line 181: Line 187:
##Select path to import the project (you can leave it default).
##Select path to import the project (you can leave it default).
##Push "Import" button.
##Push "Import" button.
-
#* {{result|EXPECTED RESULT:Project is unpacked and imported correctly. Check basic project action and imported files.}}
+
#* {{result|EXPECTED RESULT:Project is unpacked and imported correctly. Check basic project action and imported directories and files.}}

Current revision as of 11:45, 30 July 2013

Projects Test Specification for Projects actions

Author: Tomas Musil, Adam Senk
Last update: 30.07.2013
Introduction: Test basics of project action which can be called on j2se project and export/improt in zip format.


Contents


Test suite: Main Menu project concept

Purpose: Actions can be tied to main project, or to project which is in context.
Setup:

  1. Choosing main project
    1. Create two projects
    • EXPECTED RESULT: In Run - Set Main project menu you can choose which of them will be main (or none of them). Try all possibilities.
  2. Actions for main project
    1. Have two projects with main classes,set one of them as main project
    2. Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)
    • EXPECTED RESULT: In both cases, main class of main project is ran
  3. Actions for non-main project
    1. Have two projects with main classes,none of them is main
    2. Invoke Run (F6) while focus is in each Main class. (Try this also for Build, Clean and Build, Debug)
    • EXPECTED RESULT: IDE give you menu with as many options as there is projects. You choose one of theme and the project will be run. The project also is set as main.
  4. Project configuration in context
    1. Create main project P1, non main project P2
    2. Put project P2 into context
    3. Run | Set project configuration | Customize
    • EXPECTED RESULT: Customizer of P1 should be invoked.

Test suite: Project actions

Purpose: Tests actions on project.
Setup: Start with fresh userdir. Create some sample project e.g. Anagrams game.

  1. Clean and build project
    1. Invoke Clean and Build on project
    • EXPECTED RESULT: Project is cleaned and built, check JAR file in dist folder and *.class files in build folder.
  2. Clean project
    1. Invoke Clean on project
    • EXPECTED RESULT: Project is cleaned. Dist and build folders are deleted.
  3. Run project
    1. Invoke Run on project
    • EXPECTED RESULT: Project is ran.
  4. Debug project
    1. Put breakpoint into some source file
    2. Invoke Debug on project
    • EXPECTED RESULT: Project is ran in debug mode, debugger stops at breakpoint.
  5. Test project
    1. Invoke Test on project
    • EXPECTED RESULT: Tests of project are launched, output window with test results is opened.
  6. Open required projects
    1. Create new project called master
    2. Create new project called slave
    3. Set dependency on slave project using Libraries node of master project
    4. Close slave project
    5. Invoke Open required projects on master project
    • EXPECTED RESULT: Slave project is opened.
  7. Rename project
    1. Invoke Rename on project
    2. Do not check to rename project folder
    • EXPECTED RESULT: Only project display name is changed, project folder is the same.
  8. Rename project with project folder
    1. Invoke Rename on project
    2. Check to rename also project folder
    • EXPECTED RESULT: Both project display name and project folder are changed.
  9. Move project
    1. Invoke Move on project
    2. Select target location
    • EXPECTED RESULT: Project is successfully moved.
  10. Copy project
    1. Invoke Copy on project
    2. Select target location and project name
    • EXPECTED RESULT: Project is successfully copied to target location with new name.
  11. Delete project
    1. Invoke Delete on project
    2. Do not check to delete also soources
    • EXPECTED RESULT: Project is deleted, but under project folder remained sourceroot and testroot.
  12. Delete project with sources
    1. Invoke Delete on project
    2. Check to delete also sources
    • EXPECTED RESULT: Project folder is deleted with its content.

Test suite: Project actions - multiple project selection

Purpose: Project-wide actions, such as Clean & Build, may now be run when multiple projects are selected.
Setup: Start with fresh userdir. Create two or more J2SE projects. Test all actions, when all projects in propject view are selected


  1. Clean and build multiple projects
    1. Invoke Clean and Build on multiple projects selected
    • EXPECTED RESULT: All projects are cleaned and built, check JAR file in dist folder and *.class files in build folder.
  1. Clean multiple projects
    1. Invoke Clean on multiple project selected
    • EXPECTED RESULT:All project are cleaned dist and build folders are deleted.
  1. Run multiple projects
    1. Invoke Run on multiple projects selected
    • EXPECTED RESULT: All projects are ran.
  1. Debug multiple project
    1. Put breakpoint into some source file in each project
    2. Invoke Debug on multiple projects selected
    • EXPECTED RESULT: All project are ran in debug mode, debugger stops at breakpoint.
  1. Test multiple project
    1. Invoke Test on multiple project selected
    • EXPECTED RESULT: Tests of all projects are launched, output window with test results is opened.
  1. Rename multiple projects
    1. Invoke Rename on multiple projects selected
    2. Do not check to rename project folder
    • EXPECTED RESULT:The rename action is invoked for each project.
  1. Move multiple project
    1. Invoke Move on multiple projects selected
    • EXPECTED RESULT: The move action is invoked for each selected project.
  1. Copy multiple projects
    1. Invoke Copy on multiple projects selected
    • EXPECTED RESULT: The copy action is invoked for each selected project.
  1. Delete multiple project
    1. Invoke Delete on project
    • EXPECTED RESULT: The delete action is invoked for each selected project.

Test suite: Actions of files

Purpose: Tests other project related actions on files.
Setup: Create sample Anagram game project. Turn off compile on save feature in project properties!

  1. Compile single file
    1. Clean project
    2. Invoke action Compile File in context menu of some Java file
    • EXPECTED RESULT: Selected Java file must be successfully compiled
  1. Run single file
    1. Select executable Java file under Project node (e.g. Anagrams.java)
    2. Invoke action Run File in its context menu
    • EXPECTED RESULT: Selected Java file must be successfully executed
  1. Debug single file
    1. Select executable Java file under Project node (e.g. Anagrams.java)
    2. Set breakpoint somewhere in reachable code in opened file
    3. Invoke action Debug File in its context menu
    • EXPECTED RESULT: Selected Java file must be successfully debugged
  1. Test single file
    1. Select Java file that has test - e.g. WordLibrary.java)
    2. Invoke action Run -> Run File -> Test filename
    • EXPECTED RESULT: Test for selected file must be executed (no matter result)
  1. Debug test for single file
    1. elect Java file that has test - e.g. WordLibrary.java)
    2. Set breakpoint somewhere in reachable code in test file (WordLibraryTest.java)
    3. Invoke action Run -> Run File -> Debug Test for filename
    • EXPECTED RESULT: Test for selected file must be debugged
  1. Compile single package
    1. Select some package
    2. Invoke action Compile Package
    • EXPECTED RESULT: Selected Java package must be successfully compiled
  1. Run single file
    1. Select non-executable Java file under Project node
    2. Invoke action Run File in its context menu
    • EXPECTED RESULT: Dialog that class does not have main method appears.

Test suite: Export/Import zip

Purpose: This test covers functionality of importing/exporting projects in zip format. (Since 7.2)
Setup: Start IDE with clean userdir. Create new J2SE sample project (e.g. AnagramGame)

  1. Export zip
    1. In Main menu select File | Export Project | To ZIP ...
    2. "Export Project(s) to Zip" window is invoked.
    3. "Root project" radio button is checked and "AnagramGame" project is selected to be exported as ZIP.
    4. Select path to export ZIP file.
    5. Click on "Export" button.
    • EXPECTED RESULT: Project is exported as a ZIP. Check exported file (On correcr place should be placed correct ZIP file.)Dist, build and private directories should be excluded from ZIP file.
  1. Import ZIP
    1. Continue with project from previous test case.
    2. Invoke popup menu on AnagramGame project and select Delete.
    3. Chech "Also delete sources under ..."
    4. Push "Delete" button
    5. Project is closed and all project and source files are deleted.
    6. In Main menu select File | Import Project | From Zip ...
    7. Select exported ZIP file from previous test case.
    8. Select path to import the project (you can leave it default).
    9. Push "Import" button.
    • EXPECTED RESULT:Project is unpacked and imported correctly. Check basic project action and imported directories and files.
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