TS 72 ProjectsActions

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