TS 72 ProjectsWizardsAndFreeform

Projects Test Specification for Projects types

Author: Tomas Musil , Adam Senk
Last update: 30.03.2012
Introduction: Test basics of project wizards - Java project, Freeform project, Project with ex.sources, Java class library and sample Anagram game


Contents


Test suite: Java Project

Purpose: Tests creation of java project.
Setup: Start with fresh userdir.

  1. New J2SE Application (default settings)
    1. Invoke File | New Project...
    2. Select Java category and Java Application project type
    3. Enter project name
    4. Check that Project Folder field shows correct project folder location
    5. Leave other checkboxes with default values
    6. Finish wizard
    • EXPECTED RESULT: New Project must be created and Main.java must be selected in Projects view and opened in editor. Check project "Main Class" in Project Properties (in Run node panel). Execute following project actions: Build Project. Run Project and Clean & Build from project context menu.
  2. New J2SE Application (no main class)
    1. Use the same steps like in first testcase, but uncheck create main class
    • EXPECTED RESULT: New Project must be created. Check that no project main class is set in Project Properties.
  3. New J2SE Application (dedicated folder for libraries)
    1. Use the same steps like in first testcase, but check use dedicated folder for storing libraries . You should be able to specify folder location.
    • EXPECTED RESULT: Check that after project creation, you are able to manage (in Tools-Libraries) both library catalogs - global libraries and libraries in dedicated folder.
  4. Create sample project
    1. Invoke File | New Project...
    2. Select Samples|Java|Anagram Game , click Next button
    3. Enter Project Name and select Project Location, click Finish button
    • EXPECTED RESULT: Correct sample project must be created in correct location
  5. Building and running sample project
    1. Invoke Build on sample project
    2. Invoke Clean and Build on sample project
    3. Invoke Run on sample project
    • EXPECTED RESULT: All actions can be invoked without any error.


Test suite: Java Class library

Purpose: Tests creation of java class library project.
Setup: Start with fresh userdir.

  1. New Java class Library
    1. Invoke File | New Project...
    2. Select Java category and Java Class Library project type, click Next
    3. Enter project name and browse to project folder location
    4. Click Finish
    • EXPECTED RESULT: New project must be created, nothing is selected in Projects view (just root node of project) and nothing is opened in Editor.
  2. New Java class Library (dedicated folder for libraries)
    1. Use the same steps like in first testcase, but check use dedicated folder for storing libraries . You should be able to specify folder location.
    • EXPECTED RESULT: Check that after project creation, you are able to manage (in Tools
  3. Adding class to Java Class library
    1. Add some class to Java class library by New file wizard. Create it in some package.
    2. Build java class library.
    • EXPECTED RESULT: Check that built JAR (in dist folder of project) contains newly added class.



Test suite: Java project with existing sources

Purpose: Tests creation of Java project with existing sources.
Setup: Start with fresh userdir. Prepare some source roots and test roots.Use e.g. JFreeChart

  1. New Java Project with existing sources
    1. Invoke File | New Project...
    2. Panel 1:Select Java category and Java Project with Existing Sources project type, click Next
    3. Panel 2:Enter Project Name and select Project Location folder. Leave other default settings, click Next
    4. Panel 3:Add sourceroot (use sources folder unzipped from jfreechart) and testroot (use test folder unzipped from jfreechart)
    5. Panel 4:Set up includes and excludes; check that includes/excludes are changing according to what you type. Leave default include all.
    6. Finish wizard.
    7. Error badging is shown, to fix this, set dependency on servlet.jar and jcommon-1.X.X.jar (can be found at lib folder of unzipped jfreechart) as a JAR files under Libraries node.
    • EXPECTED RESULT: Project is created and no error badging is shown. Project can be built.
  2. New Java Project with existing sources (dedicated folder for libraries)
    1. Use the same steps like in first testcase, but check use dedicated folder for storing libraries . You should be able to specify folder location.
    • EXPECTED RESULT: Project is created and no error badging is shown. Project can be built.


Test suite: Java freeform project

Purpose: Tests creation of Java freeform project.
Setup: Start with fresh userdir. Prepare some source roots, test roots and corresponding ant build script. Use e.g. JFreeChart

  1. New Java freeform project
    1. Invoke File | New Project...
    2. Panel 1:Select Java category and Java freeform project project type, click Next
    3. Panel 2:Enter location (folder with unzipped jfreechart)
    4. Panel 2:Enter build script(sub folder ant of unzipped jfreechart)
    5. Panel 2:Check project name and project location,click Next
    6. Panel 3:Check that ant targets are matching with actions ,click Next
    7. Panel 4:Add sourceroot (use sources folder unzipped from jfreechart) and testroot (use test folder unzipped from jfreechart)
    8. Panel 4:Set up includes and excludes; check that includes/excludes are changing according to what you type. Exclude *.html.
    9. Panel 5:Set up classpath for source and testroot. (sourceroot needs servlet.jar and jcommon-1.X.X.jar, testroot needs servlet.jar, jcommon-1.X.X.jar, Jfreechart-X.jar, junit.jar)
    10. Finish wizard.
    • EXPECTED RESULT: Project is created and no error badging is shown.
  2. Invoking actions
    1. Invoke Build on freeform project
    2. Invoke Clean and Build on freeform project
    3. Invoke Test on freeform project
    • EXPECTED RESULT: Actions are calling matching target.
  3. Binding actions with ant targets
    1. Invoke project properties, Build and Run panel
    2. Add new mappings (e.g. Zip javadocs ->zip-javadoc target)
    • EXPECTED RESULT: Action is added into project context menu.
  4. Invoking binded action
    1. Invoke newly added action
    • EXPECTED RESULT: Check that action calls matching ant target.
  5. Remove binded action
    1. Invoke project properties, Build and Run panel
    2. Remove mapping of action
    • EXPECTED RESULT: Action is removed from project context menu.


Test suite: Project on UNC path

Purpose: Tests project in UNC path.
Setup: Start with fresh userdir. Prepare UNC path like saaaf004\homes\olscha2\My Documents. Can be tested on Windows only

  1. New project in UNC path
    1. Invoke File | New Project...
    2. Choose Java/Java Application
    3. Next
    4. select the UNC path as Project location
    5. Finish wizard.
    • EXPECTED RESULT: Project is created and no error badging is shown.
  2. Open project from UNC path
    1. Open a project from an UNC path
    • EXPECTED RESULT: Project is opened and behaves normally.


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