TS 60 J2SEProjects

Projects Test Specification

Author: Milan Kubec, Jaromir Uhrik
Last update: 19.08.2005
Introduction: This test specification covers new implementation of projects infrastructure based on Ant. You are supposed to unzip all zip files found under data folder - each to some separate folder.


Contents


Test suite: Creating J2SE Project

Purpose: Test of creation of all possible J2SE project types.
Setup: Prepare empty folder for creating test projects. Unzip projects.zip to some folder.


  1. New J2SE Application (default settings)
    1. Invoke File | New Project...
    2. Select General category and Java Application project type, click Next
    3. Enter project name and browse to project folder location
    4. Check that Project Folder field shows correct project folder location
    5. Leave other checkboxes with default values
    6. Click Finish
    • 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) and that project is set as main project (name is bold in Projects view). Execute following project actions: Build Project. Run Project and Clean & Build Project from project context menu.


  1. New J2SE Application (not main project)
    1. Invoke File | New Project...
    2. Select General category and Java Application project type, click Next
    3. Enter project name and browse to project folder location
    4. Check that Project Folder field shows correct project folder location
    5. Uncheck Set as Main Project checkbox
    6. Click Finish
    • EXPECTED RESULT: New Project must be created and Main Class must be selected and opened in editor. Check project main class in Project Properties. Project is not set as main project (name in plain).


  1. New J2SE Application (no main class)
    1. Invoke File | New Project...
    2. Select General category and Java Application project type, click Next
    3. Enter project name and browse to project folder location
    4. Check that Project Folder field shows correct project folder location
    5. Uncheck Create Main Class checkbox
    6. Click Finish
    • EXPECTED RESULT: New Project must be created. Check that no project main class is set in Project Properties. Project must be set as main project (name in bold).


  1. New J2SE Application (canceled wizard)
    1. Invoke File | New Project..., select General/ Java Application
    2. Cancel this wizard in sequence in every its step
    • EXPECTED RESULT: No project is created and nothing is created on disk when canceling all steps in sequence.


  1. New J2SE Library
    1. Invoke File | New Project...
    2. Select General category and Java Class Library project type, click Next
    3. Enter project name and browse to project folder location
    4. Check that Project Folder field shows correct project folder location
    5. 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.


  1. New J2SE Library (canceled wizard)
    1. Invoke File | New Project...
    2. Invoke General category and Java Class Library
    3. Cancel this wizard in sequence in every its step
    • EXPECTED RESULT: No project is created and nothing is created on disk when canceling all steps in sequence.


  1. New Java Project with ex. sources
    1. Invoke File | New Project...
    2. Select General category and Java Project with Existing Sources project type, click Next
    3. Enter Project Name iText and select Project Location folder
    4. Leave Set as Main Project checkbox with default value (checked)
    5. Press Next button
    6. Click Add Folder... and browse to
       srcroots/itext/src 
      folder
    7. Click Finish
    • EXPECTED RESULT: New Project must be created, project must be set as main. Nothing is selected in Projects view and nothing is opened in Editor. Sources Packages node must show all sources available in given src folder.


  1. New Java Project with ex. sources (not main project)
    1. Invoke File | New Project...
    2. Select Projects with Existing Sources category and Java Project with Existing Sources project type, click Next
    3. Enter Project Name iText and select Project Location folder
    4. Uncheck Set as Main Project checkbox
    5. Press Next button
    6. Click Add Folder... and browse to
       sourceroots/itext/src 
      folder
    7. Check that Project Folder field shows correct project folder location
    8. Click Finish
    • EXPECTED RESULT: New Project must be created, project must not be set as main. Nothing is selected in Projects view and nothing is opened in Editor. Sources Packages node must show all sources available in given src folder.


  1. New Java Project with ex. sources (canceled wizard)
    1. Invoke File | New Project..., select General/Java Project with Existing Sources
    2. Cancel this wizard in sequence in every its step
    • EXPECTED RESULT: No project is created and nothing is created on disk when canceling all steps in sequence.


  1. Create sample project
    1. Invoke File | New Project...
    2. Select Samples/General/Anagram Game , click Next button
    3. Enter Project Name ("SampleProject") and select Project Location, click Finish button
    • EXPECTED RESULT: Correct sample project must be created in correct location



Test suite: Opening, Closing and Deleting Projects

Purpose:
Setup:


  1. Close sample project
    1. Close "SampleProject" (use popup menu action Close Project)
    • EXPECTED RESULT: The SampleProject will disappear, all files belonging to this project will be closed - they disappear from editor pane.


  1. Open sample project
    1. Invoke File | Open Project...
    2. Browse "SampleProject" folder
    3. Leave checkbox Open as Main Project checked (default value)
    4. Click OpenProject Folder button
    • EXPECTED RESULT: Project "SampleProject" must be opened as main project (name in bold; badge), nothing is selected in Projects view and nothing is opened in editor.


  1. Open single project (not main project)
    1. Invoke File | Open Project...
    2. Find and select "SampleProject" project folder
    3. Uncheck Open as Main Project checkbox
    4. Click Open Project Folder button
    • EXPECTED RESULT: Project "SampleProject" must be opened (name in plain, no badge), nothing is selected in Projects view and nothing is opened in editor.


  1. Create depending project
    1. Create new J2SE project with name ProjectA
    2. Create new J2SE project with name ProjectB
    3. In ProjectA create new java class with name CalledClass
    4. Add following line into the CalledClass constructor:
       System.out.println("+++External class successfully called+++"); 
    5. In ProjectB properties click on Libraries node (Compile panel) and push Add Project... button
    6. Select ProjectA and push Add Project JAR Files
    7. Write following line into the body of main method of Main class in project ProjectB:
       new CalledClass(); 
    8. Close both ProjectA and ProjectB
    • EXPECTED RESULT: Projects are closed now.


  1. Open prj with dep. on another prj
    1. Invoke File | Open Project
    2. Find and select ProjectB project folder
    3. Leave checkboxes Open as Main Project and Open Required Projects checked by default
    4. Click Open Project Folder button
    5. Invoke Build | Main Project
    6. Invoke Build | Clean & Build Main Project
    • EXPECTED RESULT: Two projects must be opened - ProjectA and ProjectB, which must be set as main project. Both build actions of Main Project must be successful.


  1. Run depending project (successful)
    1. Press F6 to run main project
    • EXPECTED RESULT: The project runs and succesfully calls the method from dependant project. The following line appears among lines in output:
       +++External class successfully called+++ 


  1. Open prj with dep. on another prj (not main project)
    1. Invoke File | Open Project...
    2. Find and select ProjectB project folder
    3. Uncheck Open as Main Project checkbox and leave Open Required Projects checkbox checked by default
    4. Click Open Project Folder button
    5. Select ProjectB project and invoke Clean & Build Project JAR
    • EXPECTED RESULT: Two projects must be opened, none of them set as main. Clean and Build action must be successful.


  1. Open prj with dep. on another prj (not open required)
    1. Invoke File | Open Project...
    2. Find and select ProjectB project folder
    3. Uncheck Open as Main Project checkbox and Open Required Projects checkbox
    4. Click Open Project Folder button
    5. Select ProjectB project and invoke Clean & Build Project JAR
    • EXPECTED RESULT: Only ProjectB project must be opened, not set as main project. Clean and Build action must be successful.


  1. Run depending project (unsuccessful)
    1. Invoke File | Open Project...
    2. Find and select ProjectA project folder
    3. Click Open Project Folder button
    4. Select ProjectA project and invoke Clean
    5. Close ProjectA
    6. Select ProjectB project and invoke Properties
    7. In Libraries panel uncheck Build Projects on Classpathcheckbox
    8. Close Properties by OK button
    9. Run project
    • EXPECTED RESULT: The following output must appear:
       
      

init: deps-jar: compile: run: Exception in thread "main" java.lang.NoClassDefFoundError: ProjectA/CalledClass

       at ProjectB.Main.main(Main.java:30)

Java Result: 1 BUILD SUCCESSFUL (total time: 0 seconds)


  1. Close project(s)
    1. Open 4 projects (some of them library, e.g. timerbean), open couple of files from each of them
    2. Select one and invoke Close Project from its context menu
    3. Project must be closed and all its files disappear from editor
    4. Select rest of projects and invoke File | Close 3 projects
    • EXPECTED RESULT: All selected projects must be closed and also all their files in editor.


  1. Delete project cancelation
    1. Open "SampleProject"
    2. Select popup menu item Delete Project
    3. Yes/No dialog appears
    4. Push No button
    • EXPECTED RESULT: The project stays in IDE, nothing is deleted.


  1. Delete Project
    1. Select "SampleProject"
    2. Select popup menu item Delete Project
    3. Set checkbox checked on the dialog that appears and push Yes button
    • EXPECTED RESULT: Project is closed and deleted


  1. Delete project in the same location
    1. Create "SampleProject" in the same location
    2. Invoke popup menu action Delete Project
    3. Set checkbox unchecked and push Yes button
    • EXPECTED RESULT: The project disappears from IDE, all opened files belonging to this project are closed. The project is deleted from the disk, but its "src" directory stays on the disk.



Test suite: Multiple Source Roots

Purpose:
Setup:


  1. Multiple Source Packages for J2SE Project
    1. Create or open J2SE Project
    2. Set multiple source roots as Source Packages
    3. Build the project
    • EXPECTED RESULT: Built jar file must contain classes from all source roots


  1. Multiple Source Packages for Java Library
    1. Create or open J2SE Library
    2. Set multiple source roots as Source Packages
    3. Build the project
    • EXPECTED RESULT: Built jar file must contain classes from all source roots


  1. Multiple Test Packages
    1. Create or open J2SE Project
    2. Set multiple source roots as Test Packages
    3. Create tests in all available packages
    4. Execute all tests
    • EXPECTED RESULT: All tests must be executed



Test suite: Project Actions

Purpose:
Setup:


  1. Build, Clean Project
    1. Invoke File | Open Project...
    2. Select SwingSet2 project folder, click Open Project Folder button
    3. Select action Build Project JAR from project context menu
    4. Output window must open and BUILD SUCCESSFUL message must be printed after build is over.
    5. Select action Clean Project from project context menu
    6. BUILD SUCCESSFUL message must be printed to Output window
    7. Open Files view and expand SwingSet2 project folder
    8. Only following folders and files must be visible under project folder:
   nbproject
   src
   test
   build.xml
   manifest.mf	
    • EXPECTED RESULT: Project must be succesfully built and cleaned, build products must be removed.


  1. Clean & Build Project
    1. Invoke File | Open Project
    2. Select Examples project folder, click Open Project Folder button
    3. Select action Clean & Build Project JAR from project context menu
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to output window, verify that build log contains 'do-clean' target that deletes build and dist folders.


  1. Clean Project
    • EXPECTED RESULT:


  1. Run Project
    1. Invoke File | Open Project
    2. Select Gantt-1.9.11 project folder, click Open Project Folder button
    3. Select action Run Project from project context menu
    • EXPECTED RESULT: Application Gantt-1.9.11 must be started. After exiting it output window must show BUILD SUCCESSFUL


  1. Run Project in Debugger
    1. Invoke File | Open Project
    2. Select Examples project folder, click Open Project Folder button
    3. Open project properties, select Running project node and change project main class to examples.advanced.MemoryView
    4. Select action Run Project in Debugger from project context menu
    • EXPECTED RESULT: Selected project main class must be launched in debugger, debugger specific windows will be opened.


  1. Set Main Project
    1. Invoke File | Open Project
    2. Select Examples project folder, click Open Project Folder button
    3. Select SwingSet2 project folder, click Open Project Folder button
    4. Set each of opened project as main by context menu Set as Main Project and by actions Build | Build Main Project, Build | Clean & Build Main Project, Run | Run Main Project and Run | Run Main Project in Debugger verify that Main project is correctly set. Main project must have name in bold face and icon with badge.
    • EXPECTED RESULT: All actions must be executed on project that is set curently as Main.


  1. Behavior when no main prj set
    1. Close main project
    2. Invoke action Build | Build Main Project
    3. Dialog for selecting main project will be opened, select one project and click OK
    4. Selected project must be built
    5. Close main project
    6. Invoke action Build | Clean & Build Main Project
    7. Dialog for selecting main project will be opened, select one project and click OK
    8. Selected project must be cleaned and built
    9. Close main project
    10. Invoke action Run | Run Main Project
    11. Dialog for selecting main project will be opened, select one project and click OK
    12. Selected project must be run
    13. Close main project
    14. Invoke action Run | Run Main Project in Debugger
    15. Dialog for selecting main project will be opened, select one project and click OK
    16. Selected project must be run in debugger
    • EXPECTED RESULT: Project selected in the dialog must be set as main and action must be performed on it.



Test suite: Single File/Package actions

Purpose:
Setup:


  1. Compile single file
    1. Select Java file in Explorer under Project node
    2. Invoke action Compile File in its context menu
    • EXPECTED RESULT: Selected Java file must be successfully compiled


  1. Run single file
    1. Select executable Java file in Explorer under Project node
    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 in Explorer under Project node and open it in editor
    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) in Explorer
    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. Select Java file (that has test) in Explorer, open the test by Tools -> JUnit Tests -> Open Test
    2. Set breakpoint somewhere in reachable code in opened test file
    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 package in Explorer under Project node
    2. Invoke action Compile Package
    • EXPECTED RESULT: Selected Java package must be successfully compiled



Test suite: Project Properties

Purpose:
Setup:


  1. Compilation Classpath
    1. Open Dummy1 project
    2. Open Properties from context menu of opened project (or from File menu)
    3. Select node Compiling Sources
    4. Add any project(s), JAR(s) and Library(ies) to compilation classpath
    5. Set Ant verbosity level to Verbose (Tools | Options, Build | Ant Settings)
    6. Invoke Build | Clean & Build Main Project action
    7. Maximize Output Window and find compilation part of the log (Compilation arguments:)
    • EXPECTED RESULT: Project must be successfuly built and compilation arguments must contain all project JARs, standalone JARs and Libraries added to compilation classpath in project customizer in defined order.


  1. Test Compilation Classpath
    1. Open Dummy1 project
    2. Open Properties from context menu of opened project (or from File menu)
    3. Select node Compiling Sources
    4. Add any project(s), JAR(s) and Library(ies) to compilation classpath
    5. Select node Build | Compiling Tests
    6. There must be following elements in the right pane:

Classpath for Compiling Sources Compiled Sources JUnit

    1. Add any project(s), JAR(s) and Library(ies) to Tests compilation classpath
    2. Set Ant verbosity level to Verbose (Tools | Options, Build | Ant Settings)
    3. Invoke Run | Run Other | Run Tests for Dummy1 action
    4. Maximize Output Window and find test compilation part of the log (second Compilation arguments:)
    • EXPECTED RESULT: Tests for project must be succesfuly executed and compilation arguments must contain all project JARs, standalone JARs and libraries in defined order, tests comp. cp must also contain entries for Compiling Sources, Compiled Sources and JUnit jar.


  1. Running Project
    1. Open Dummy1 project
    2. Open Properties from context menu of opened project (or from File menu)
    3. Select node Compiling Sources
    4. Add any project(s), JAR(s) and Library(ies) to compilation classpath
    5. Select node Run | Running Project
    6. There must be following elements in the right pane:

Classpath for Compiling Sources Compiled Sources

    1. Add any project(s), JAR(s) and Library(ies) to Running classpath
    2. Set Ant verbosity level to Verbose (Tools | Options, Build | Ant Settings)
    3. Invoke Run Project from its context menu
    4. Check that output looks like this:

arg 0 = 123
arg 1 = abc
arg 2 = 456
arg 3 = def

    1. Maximize Output Window and find project execution part of the log (run target)
    • EXPECTED RESULT: Project must be successfully executed, execution arguments must contain all project JARs, standalone JARs and libraries in defined order, execution cp must also contain entries for Compiling Sources, Compiled Sources



Test suite: Creating Files in Project

Purpose:
Setup:


  1. Create File in Source Packages
    1. Create dummy J2SE Application project (check Main Project, check Main Class)
    2. Invoke New | File action in context menu of created project
    3. Select Java Beans category and Java Bean file type, click Next
    4. Enter class name, select Source Packages in Location combo box and select existing package in Package editable combo box
    5. Verify that Created File field shows correct file location and name and click Finish
    • EXPECTED RESULT: Correctly created file under Source Packages must be opened in editor.


  1. Create File in Source Packages (new package)
    1. Create dummy J2SE Application project (check Main Project, check Main Class)
    2. Invoke New | File action in context menu of created project
    3. Select Java Classes category and Java Class file type, click Next
    4. Enter class name, select Source Packages in Location combo box and enter non-existing package in Package editable combo box
    5. Verify that Created File field shows correct file location and name and click Finish
    • EXPECTED RESULT: Correctly created file under Source Packages must be opened in editor. File must be placed in newly created package.


  1. Create File in Test Packages
    1. Create dummy J2SE Application project (check Main Project, check Main Class)
    2. Invoke New | File action in context menu of created project
    3. Select JUnit category and Empty Test file type, click Next
    4. Enter class name, select Test Packages in Location combo box and select existing package in Package editable combo box
    5. Verify that Created File field shows correct file location and name and click Finish
    • EXPECTED RESULT: Correctly created file must appear under Test Packages.


  1. Create File in Test Packages (new package)
    1. Create dummy J2SE Application project (check Main Project, check Main Class)
    2. Invoke New | File action in context menu of created project
    3. Select JUnit category and Empty Test file type, click Next
    4. Enter class name, select Test Packages in Location combo box and enter non-existing package in Package editable combo box
    5. Verify that Created File field shows correct file location and name and click Finish
    • EXPECTED RESULT: Correctly created file must appear under Test Packages. File must be placed in newly created package.


  1. Create File in additional source root
    1. Open Project Properties and create new source root using Add Folder action
    2. Close Project properties
    3. Create Java package and files under newly created source root
    4. Invoke Build Project
    • EXPECTED RESULT: Project must be built and classes from all source roots must be included in final JAR file



Test suite: Single File Actions

Purpose: Test of actions working only with one file (in project context).
Setup: Unzip archive with test projects.


  1. Compile
    1. Open TestSingleActions project
    2. Invoke Clean Project action from project context menu
    3. Select Class1.java node under Source Packages testsingle1 package
    4. Press F9
    5. BUILD SUCCESSFUL must be printed to output window
    6. Open Files window and check in build/classes subfolder that only the selected class was compiled and nothing else
    • EXPECTED RESULT: Only selected class must be compiled.


  1. Run
    1. Open TestSingleActions project
    2. Invoke Clean Project action from project context menu
    3. Select Main2.java node under Source Packages testsingle2 package
    4. Invoke Run | Run Other | Run "Main2.java"
    5. BUILD SUCCESSFUL must be printed to output window
    6. Check output window that it contains message: "Executed testsingle2.Main2"
    • EXPECTED RESULT: Selected executable class must be executed even if it's not set as project main class.


  1. Run (not main method)
    1. Open TestSingleActions project
    2. Select Class3.java node under Source Packages testsingle3 package
    3. Invoke Run | Run Other | Run "Class3.java"
    4. Information dialog must be opened saying that selected class doesn't have main method
    • EXPECTED RESULT: Nothing is executed in this case.


  1. Run Test for
    1. Open TestSingleActions project
    2. Invoke Clean Project action from project context menu
    3. Select Class2.java node under Source Packages testsingle2 package
    4. Invoke Run | Run Other | Run Test for "Class2.java"
    5. BUILD SUCCESSFUL message must be printed to output window
    6. Open Files window and check that build/test folder contains only compiled test class for selected class
    • EXPECTED RESULT: Test for selected class only must be successfully executed with no failure.



Test suite: Project Dependency

Purpose:
Setup:


  1. Rebuild required project
    1. Open examples project (let required project open too)
    2. Open Properties of examples project
    3. Uncheck Build Projects on Classpath checkbox in panel Libraries
    4. Invoke Clean Project on timerbean project
    5. Invoke Clean and Build Project on examples project
    6. Compilation must fail
    7. Open Propeties of examples project
    8. Check Build Required Projects checkbox
    9. Invoke Clean and Build Project on examples project
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to Output Window.



Test suite: Generating Javadoc

Purpose:
Setup:


  1. Generate Javadoc
    1. Open TestJavadoc project
    2. Invoke Generate Javadoc for Project action from project context menu
    • EXPECTED RESULT: Javadoc must be successfully created and message BUILD SUCCESSFUL must be printed to output window. Generated javadoc must be opened in your default browser.


  1. Generate Javadoc (changed settings)
    1. Open TestJavadoc project
    2. Open Project properties and select node Build | Documenting
    3. Check all checkboxes in Javadoc settings pane, enter some window title, enter additional params
    4. Invoke Generate Javadoc for Project action from project context menu
    • EXPECTED RESULT: Javadoc must be successfully created and message BUILD SUCCESSFUL must be printed to output window. Generated javadoc must be opened in your default browser and must contain all members (private and package private and version tag a author tag) and browser window must have the title entered in properties dialog.



Test suite: JUnit tests

Purpose:
Setup:


  1. Run Tests for Project
    1. Open TestSingleActions project
    2. Invoke action Run Tests from project context menu
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to output window. There must be three test executions in output window, all must pass.


  1. Run Test File
    1. Open TestSingleActions project
    2. Select Class1.java node under Source Packages node under testsingle1 package
    3. Invoke Run | Run Other | Run Test for Class1.java
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to output window. One passed test must be executed for selected class.


  1. Run Test File in Debugger
    1. Open TestSingleActions project
    2. Select Class2.java node under Source Packages node under testsingle2 package
    3. Invoke Run | Run Other | Run Test for Class2.java in Debugger
    4. Build must successfully finish and tests must pass
    5. Put breakpoints on lines 35 and 41 of Class2.java file
    6. Invoke Run | Run Other | Run Test for Class2.java in Debugger
    7. Execution must stop on the first breakpoint
    8. Invoke Continue action
    9. Execution must stop on the second breakpoint
    10. Invoke Continue action
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to output window, debugger must be finished. All tests must pass.



Test suite: Java Platforms

Purpose:
Setup: Have folowing JDKs installed on computer: 1.3.x, 1.4.x and 1.5, possibly some of them also with javadoc.


  1. Add Platform (1.3)
    1. Invoke Tools | Java Platform Manager
    2. Click Add Platform button
    3. Browse to installation directory of JDK 1.3 and select it, click Next
    4. Wait untill all fields are filled and check those fields for correctness, click Next
    5. Check if sources are correctly detected, click Finish
    6. Select javadoc folder and click Next
    • EXPECTED RESULT: New Java platform for JDK 1.3 must be added to list of platforms. Check all platform properties - Classes, Sources, Javadoc. Close Java Platform manager. Adding new platform cannot change default platforms of existing or newly created projects.


  1. Add Platform (1.4)
    1. Do the same as in previous step but for JDK 1.4.x
    • EXPECTED RESULT: New Java platform for JDK 1.4 must be added to list of platforms. Check all platform properties - Classes, Sources, Javadoc. Close Java Platform manager. Adding new platform cannot change default platforms of existing or newly created projects.


  1. Add Platform (1.5)
    1. Do the same as in previous step but for JDK 1.5.x
    • EXPECTED RESULT: New Java platform for JDK 1.5 must be added to list of platforms. Check all platform properties - Classes, Sources, Javadoc. Close Java Platform manager. Adding new platform cannot change default platforms of existing or newly created projects.


  1. Add Platform (own name)
    1. Do the same as in previous 3 steps but enter your own identiying name for each platform
    • EXPECTED RESULT: New Java platform must be added to list of platforms. Check all platform properties - Classes, Sources, Javadoc. Close Java Platform manager and name. Adding new platform cannot change default platforms of existing or newly created projects.


  1. Using Platforms
    1. Open TestPlatform project
    2. Open project properties and select one those created platforms as Java Platform for the project
    3. Invoke Clean & Build Project JAR from project context menu
    4. Invoke Run Project from project context menu
    5. Invoke Run | Run Other | Run Tests for "TestPlatform"
    6. Repeat previous steps (2, 3, 4, 5) for all created Java Platforms
    • EXPECTED RESULT: All actions must be finished successfully. Project output must show correct system properties of selected platform.


  1. Remove Platform
    1. Invoke Tools | Java Platform Manager
    2. Select some custom platform and click Remove
    3. Repeat previous step for all custom platforms
    • EXPECTED RESULT: All custom platforms must be removed.



Test suite: Libraries, Library Manager

Purpose:
Setup: Unzip testlibraries.zip to some known folder.


  1. Add Library (jars)
    1. Invoke Tools | Library Manager, click New Library button
    2. Enter jcommon-0.9.3 into field Library Name, select Class Libraries as Library Type, click OK
    3. Select tab Classpath and click Add JAR/Folder
    4. Browse to jcommon-0.9.3.jar file under jcommon-0.9.3 folder and click Add JAR/Folder
    5. Close Libraries Manager by Close
    6. Open project jfreechart-0.9.18 and invoke Clean & Build Project JAR
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to output window.


  1. Add Library (jars, src)
    1. Invoke Tools | Library Manager, click Add Library button
    2. Enter jcommon-0.9.3 into field Library Name, select Class Libraries as Library Type, click OK
    3. Select tab Classpath and click Add JAR/Folder
    4. Browse to jcommon-0.9.3.jar file under jcommon-0.9.3 folder and click Add JAR/Folder
    5. Select tab Sources and click Add JAR/Folder
    6. Select src folder under jcommon-0.9.3 folder and click Add JAR/Folder
    7. Close Libraries Manager by Close
    8. Open project jfreechart-0.9.18 and invoke Clean & Build Project JAR
    9. Project must be successfully built
    10. Open file org.jfree.chart.annotations.TextAnnotation.java, click on SerialUtilities on 269 line
    11. Invoke Goto Source action (Alt+O)
    • EXPECTED RESULT: Source of SerialUtilities must be opened in editor.


  1. Add Library (jars, src, javadoc)
    1. Invoke Tools | Library Manager, click Add Library button
    2. Enter jcommon-0.9.3 into field Library Name, select Class Libraries as Library Type, click OK
    3. Select tab Classpath and click Add JAR/Folder
    4. Browse to jcommon-0.9.3.jar file under jcommon-0.9.3 folder and click Add JAR/Folder
    5. Select tab Sources and click Add JAR/Folder
    6. Select src folder under jcommon-0.9.3 folder and click Add JAR/Folder
    7. Select Javadoc Tab and click Add JAR/Folder
    8. Select javadoc folder under jcommon-0.9.3 folder and click Add JAR/Folder
    9. Close Libraries Manager by Close
    10. Open project jfreechart-0.9.18 and invoke Clean & Build Project JAR
    11. Project must be successfully built
    12. Open file org.jfree.chart.annotations.TextAnnotation.java, move cursor behind the '('
    13. Invoke Code Completion (Ctrl+Space)
    • EXPECTED RESULT: Correct Code Completion in editor must be shown including correct javadoc.


  1. Modify Library parts
    1. Create library, specify parts code and javadoc during creating
    2. Setup project to use the library, use library code inside projects code
    3. Remove parth of the library - sources
    4. Test javadoc completion for library code in the project
    • EXPECTED RESULT: Javadoc completion is not supposed to work


  1. Remove Library
    1. Open project jfreechart-0.9.18
    2. Invoke Tools | Library Manager, click Add Library button
    3. Select jcommon-0.9.3 library in the list and click Remove
    4. Select project jfreechart-0.9.18 and invoke Clean & Build Project JAR
    • EXPECTED RESULT: BUILD FAILED message must be printed to output window.



Test suite: Creating Jars

Purpose:
Setup:


  1. Included Files
    1. Open project TestJars
    2. Open Project Properties
    3. Select Packaging node
    4. Append "**/*.jpg" to to list of Excluded from JAR
    5. Close Project Properties dialog
    6. Invoke Build Project action
    7. Open Files view and find dist/TestJars.jar file, expand its node and then expand resources folder
    • EXPECTED RESULT: JAR file must be successfully created and folder resources must not contain any files.


  1. Compress
    1. Open project TestJars
    2. Invoke Build Project action
    3. Write down size of created jar file (e.g. in Files view)
    4. Open Project Properties
    5. Select Packaging node
    6. Check Compress checkbox
    7. Invoke Clean and Build Project action
    • EXPECTED RESULT: Compare size of created jar with the size of previously created jar, it must be smaller.



Test suite: Broken References

Purpose:
Setup:


  1. Broken References in comp. cp
    1. Open project TestReferences1
    2. Open Project Properties
    3. Open file org.netbeans.testref1.TestRef1, there will be all imports marked by errors
    4. Fix all three broken references: Open Project TestLib1, Add Library junit-3.8.1, add jar file to compilation classpath. When reference is fixed it must be marked with different (green) icon.
    • EXPECTED RESULT: All imports marked with error annotation must be fixed. Resolve Reference Problems action in context menu must be disabled.


  1. Platform references
    1. Check out ant module from netbeans.org CVS
    2. Open project ant/project/eg/brokenproj
    3. It must have 5 broken references, one of them will be jdk15-test
    4. Select jdk15-test from list and click Resolve
    5. Create platform JDK 1.5 with name jdk15-test
    6. Resolve other broken references, by creating missing resources
    • EXPECTED RESULT: Icon must change to green one. After reopening Resolve Reference Problems dialog broken reference jdk15-test must disapear.



Test suite: Freeform Project

Purpose: Test of Freestyle project that is special kind of project without solid structure, it's defined by external Ant build script.
Setup: Unzip freeform.zip file. Copy freeform1, freeform2 and freeform3 folders (projects) to some folder.


  1. Create Freeform Project 1
    1. Open New Project wizard
    2. Select Standard category and Java Project with existing Ant Script project, click Next
    3. Browse to freeform1 folder location, click Open, check that all fields are populated correctly
    4. Change Project Name and Project Folder, click Next
    5. Select jar target in Build Project ComboBox, click Next
    6. Click Add Folder on next panel and select sources folder, click Next
    7. Click Finish
    • EXPECTED RESULT: New project must be successfully created. build.xml and sources folder must be under its node in Projects View.


  1. Create Freeform Project 2
    1. Open New Project wizard
    2. Select Standard category and Java Project with existing Ant Script project, click Next
    3. Browse to freeform2 folder location, click Open, check that all fields are populated correctly, click Next
    4. Select jar target in Build Project ComboBox, click Next
    5. Click Add Folder on next panel and select src folder, click Next
    6. Click Finish
    • EXPECTED RESULT: New project must be successfully created. build.xml and src folder must be under its node in Projects View.


  1. Create Freeform Project 3
    1. Open New Project wizard
    2. Select Standard category and Java Project with existing Ant Script project, click Next
    3. Browse to freeform3 folder location, click Open, check that all fields are populated correctly, click Next
    4. Select jar target in Build Project ComboBox, click Next
    5. Click Add Folder on next panel and select src1, src2 and src3 folders, click Next
    6. Click Add Folder and select for each src folder one jar libs/TestLibX.jar (for src1 - libs/TestLib1.jar etc.), click Next
    7. Click Finish
    • EXPECTED RESULT: New project must be successfully created. build.xml and src1, src2 and src3 folders must be under its node in Projects View.


  1. Build Freeform Project
    1. Invoke action Build Project on all created freeform projects
    • EXPECTED RESULT: Project must be built and message BUILD SUCCESSFUL must be printed to Output window.


  1. Clean in Freeform Project
    1. Invoke action Clean Project on all created freeform projects
    • EXPECTED RESULT: All build products must be deleted and BUILD SUCCESSFUL message must be printed to Output window.


  1. Clean and Build in Freeform Project
    1. Invoke action Clean and Build Project on all created freeform projects
    • EXPECTED RESULT: Clean and Build must be executed and BUILD SUCCESSFUL message must be printed to Output Window.


  1. Run Freeform Project
    1. Invoke action Run Project on all created freeform projects
    • EXPECTED RESULT: One of the projects will start SwingSet2 demo. The other two will print text to Output window.


  1. Javadoc in Freeform Project
    1. Invoke action Generate Javadoc for Project on freeform2 project
    • EXPECTED RESULT: BUILD SUCCESSFUL message must be printed to Output window, check that javadoc for freeform2 project was generated in Files view.


  1. Test in Freeform Project
    1. Invoke action Test on freeform2 project
    • EXPECTED RESULT: Target test must be executed.



Test suite: Overriding targets

Purpose:
Setup:


  1. Clean and Build Project (overriden)
    1. Open CustomTargets project
    2. Invoke Clean and Build Project action
    • EXPECTED RESULT:
       
      

You must see in output window:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom post-clean target *****

clean:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-compile target *****

Compiling 1 source file to ...

    • ** Running custom post-compile target *****

compile:

    • ** Running custom pre-jar target *****

Building jar: ...

    • ** Running custom post-jar target *****

jar:/projects/CustomTargets/build Deleting ...

    • ** Running custom post-clean target *****

clean:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-compile target *****

Compiling 1 source file to ...

    • ** Running custom post-compile target *****

compile:

    • ** Running custom pre-jar target *****

Building jar: ...

    • ** Running custom post-jar target *****

jar:


  1. Run Project (overriden)
    1. Open CustomTargets project
    2. Invoke Run Project action
    • EXPECTED RESULT:
       
      

You must see in output window:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-compile target *****
    • ** Running custom post-compile target *****

compile: run:


  1. Build Project (overriden)
    1. Open CustomTargets project
    2. Invoke Build Project action
    • EXPECTED RESULT:
       
      

You must see in output window:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-compile target *****
    • ** Running custom post-compile target *****

compile:

    • ** Running custom pre-jar target *****
    • ** Running custom post-jar target *****

jar:


  1. Run Tests (overriden)
    1. Open CustomTargets project
    2. Invoke Test Project
    • EXPECTED RESULT:
       
      

You must see in output window:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-compile target *****
    • ** Running custom post-compile target *****

compile: Created dir: ...

    • ** Running custom pre-compile-test target *****

Compiling 1 source file to ...

    • ** Running custom post-compile-test target *****

compile-test: Created dir: ... testGetString Testsuite: org.netbeans.test.MainTest Tests run:


  1. Run Single Tests (overriden)
    1. Open CustomTargets project
    2. Select node Main.java under org.netbeans.test package under Source Packages
    3. Invoke Run | Run Other | Test "Main.java"
    • EXPECTED RESULT:
       
      

You must see in output window:

    • ** Running custom pre-init target *****
    • ** Running custom post-init target *****

init:

    • ** Running custom pre-compile target *****
    • ** Running custom post-compile target *****

compile:

    • ** Running custom pre-compile-test-single target *****
    • ** Running custom post-compile-test-single target *****

compile-test-single: testGetString Testsuite: org.netbeans.test.MainTest Tests run:



Test suite: Headless Builds

Purpose: Test if build script created by IDE are without any change executable by command line Ant.
Setup: Have Ant tool working on command line (at least version 1.6.x). You must run command line ant on the same JDK as IDE.


  1. J2SE Application
    1. Open command line and browse to folder with SwingSet2 project
    2. Type 'ant' on command line and hit Enter
    3. Successful build (including javadoc) must be executed
    4. Type 'ant clean' on command line and hit Enter
    5. Successful clean build must be executed
    6. Type 'ant run' on command line and hit Enter
    7. SwingSet2 demo must be started; close the application
    • EXPECTED RESULT: All targets executed from command line must be successful.


  1. J2SE Library
    1. Open command line and browse to folder with timerbean project
    2. Type 'ant' on command line and hit Enter
    3. Successful build (including javadoc) must be executed
    4. Type 'ant clean' on command line and hit Enter
    5. Successful clean build must be executed
    • EXPECTED RESULT: All targets executed from command line must be successful.



Generated: Thu Dec 14 14:48:59 CET 2006

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