TS 61 ProjectsActions

Projects Test Specification for Projects actions

Author: Tomas Musil
Last update: 02.05.2008
Introduction: Test basics of project action which can be called on j2se project


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
  1. 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
  1. 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: Run action is now context sensitive - which main class is ran depends now on context.
  1. Persistence of "Open as main project"
    1. Check persistence of "Open as main project" on open project dialog.
    • EXPECTED RESULT: Should be off by default, but state should be remembered.
  1. Persistence of "Set as main project"
    1. Check persistence of "Set as main project" on new project wizard.
    • EXPECTED RESULT: Should be on by default, but state should be remembered. (details for which projects is on/off are here: MainProjectConceptualChange
  1. 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. Build project with CoS enabled
    1. Turn ON compile on save feature in project properties (right-click the project, invoke Properties, select Compiling section, check Compile on Save)
    2. Invoke Build on project
    • EXPECTED RESULT: A message saying the project is built automatically shows up. There are buttons "Project properties", "Clean and Build" and "OK".
  1. Build project with CoS disabled
    1. Turn OFF compile on save feature in project properties (right-click the project, invoke Properties, select Compiling section, uncheck Compile on Save)
    2. Invoke Build on project
    • EXPECTED RESULT: Project is build. No message is shown, no output is written.
  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.
  1. Clean project
    1. Invoke Clean on project
    • EXPECTED RESULT: Project is cleaned dist and build folders are deleted.
  1. Run project
    1. Invoke Run on project
    • EXPECTED RESULT: Project is ran.
  1. 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.
  1. Test project
    1. Invoke Test on project
    • EXPECTED RESULT: Tests of project are launched, output window with test results is opened.
  1. Set main project
    1. Open some project as not main project (uncheck Open as main project checkbox during opening)
    2. Invoke Set main project on project
    • 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.
  1. 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.
  1. 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.
  1. 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.
  1. Move project
    1. Invoke Move on project
    2. Select target location
    • EXPECTED RESULT: Project is successfully moved.
  1. 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.
  1. 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.
  1. 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: 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.
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