TS 67 NBPlatform

"API support ++ Test Specification for "NetBeans 6.7

Author: Matus Dekanek
Version: 0.0
Last update: 05th Mar 2009
Introduction: Testing of new features of netbeans platform projects. For full-feature testing is recommended to perform also NB6.5 API support tests.
Comments: THIS IS IMPORTANT: In all module projects/suites/etc mentioned here do not forget to do following before building the project:
-invoke properties on project
- in API versioning tab check all checkboxes in the Public packages list
This is needed for correct inclusion of projects.

Contents


Test suite: 1 Create a NB Pplatform project

Purpose: Tests successfull creation of NB platform project. This test is really simple. Create one of each type of Netbeans Module Project. This should be also covered in testspec for some older NB version.
Setup: No setup is needed.

  1. Test case 1 Create a NB Module project
    1. Invoke create new project action.
    2. Select NetBeans Modules| Module project and finish project creation
    • EXPECTED RESULT: A NB Module project is successfully created.
  1. Test case 2 Create a NB Module Suite project
    1. Invoke create new project action.
    2. Select NetBeans Modules| Module Suite project and finish project creation.
    • EXPECTED RESULT: A NB Module Suite project is successfully created.
  1. Test case 3 Create a Library Wrapper Module project
    1. Invoke create new project action.
    2. Select NetBeans Modules| Library Wrapper Module project, press next.
    3. Select some existing library(*.jar file) and finish project creation.

(to create a new java library, create new java project and build it. newly created java library will be in /dist/ directory of java project.)

    • EXPECTED RESULT: A NB Library wrapper is successfully created and is assigned to NB Module Suite created in previous case.
  1. Test case 4 Create a NB Platform Application project
    1. Invoke create new project action.
    2. Select NetBeans Modules| NB Platform Application project and finish project creation.
    • EXPECTED RESULT: A NB Platform Application project is successfully created.


Test suite: 2 Using external libraries

Purpose: Tests successfull creation of NB platform project and using external libraries in it.
Setup: No setup is needed.

  1. Test case 1 Create a NB Module project
    1. Invoke create new project action.
    2. Select NetBeans Modules| Module project and finish project creation
    • EXPECTED RESULT: A NB Module project is successfully created.
  1. Test case 2 Create a NB Module Suite project
    1. Invoke create new project action.
    2. Select NetBeans Modules| Module Suite project and finish project creation.
    • EXPECTED RESULT: A NB Module Suite project is successfully created.
  1. Test case 3 Create a Library Wrapper Module project
    1. Invoke create new project action.
    2. Select NetBeans Modules| Library Wrapper Module project, press next.
    3. Select some existing library(*.jar file) and finish project creation.

(to create a new java library, create new java project and build it. newly created java library will be in /dist/ directory of java project.)

    • EXPECTED RESULT: A NB Library wrapper is successfully created and is assigned to NB Module Suite created in previous case.
  1. Test case 4 Create a NB Platform Application project
    1. Invoke create new project action.
    2. Select NetBeans Modules| NB Platform Application project and finish project creation.
    • EXPECTED RESULT: A NB Platform Application project is successfully created.



Test suite: 3 Using library wrapper project

Purpose: "Library wrapper is a way, how to use some general external library in module suite projects."
Setup: "No needed setup. However, steps of this test suite must be followed in the specified order."

  1. "Test case 1 Creating a library wrapper over created library (fibonacciLib)."
    1. Create new Java Application (let`s name it JavaApp).
    2. Add new class to JavaApp(let`s name it newClass).
    3. Create new method in new class of JavaApp; insert the following code:
      1. }}code
        /** @brief fibonacci`s number calculating function
        *
        * @return n-th fibonacci`s number
        */
        public static intfibonacci(int n){
        if(n==0) return 1;
        if(n==1) return 1;
        return fibonacci(n-1) + fibonacci(n-2);
        }

        }}
    4. Check that newClass is compilable.
    5. Build javaApp project (check that .jar file was created in projectDir/dist/)
    6. Create new NB Module Suite project (let`s name it NewSuite).
    7. Create new Library Wrapper Module project using freshly created library from javaApp project (Let`s name it fibonacciLib and set Code Base Name of library to org.foo.fibonacciLib).
    8. Invoke popup menu on fibonacciLib project node, select Properties. In API Versioning tab check org.foo.fibonacciLib to be public.
    • EXPECTED RESULT: Library Wrapper Module project is correctly created and asigned to NewSuite project. You may check properties of project and that in fibonacciLib project dir/release/modules/ext is JavaApp.jar file (.jar library file from JavaApp).
  1. Test case 2 Edit created library wrapper
    1. Create new class in fibonacciLib project, let`s name it NewClassWrapper.
    2. Insert following method into class NewClassWrapper:
      1. }}code
        /** @brief wrapper for fibonacci numbers generator
        *
        * @return n-th fibonnaci`s number
        */
        public static intfibonacci(int n){
        return JavaApp.NewClass.fibonacci(n);
        }

        }}
    3. Check that NewClassWrapper is compilable.
    4. Build fibonacciLib project.
    • EXPECTED RESULT: Build is succesfull, you can see on output window that cluster for NewSuite was created and .jar for fibonacciLib is created as well.


  1. Test case 3 Use library wrapper in another module
    1. Create new module in the NewSuite suite project (call it MyModule).
    2. On Libraries node of MyModule project in projects view invoke Add Module Dependency.
    3. From library list choose fibonacciLib and press ok. FibonacciLib should be added to project`s libraries.
    4. On Libraries|fibonacciLib node of MyModule project in projects view invoke Remove and confirm popup dialog - fibonacciLib is removed from project.
    5. On MyModule node in projects view invoke Properties. Open Libraries panel. Panel should allow adding, removing or editing module dependencies and libraries and to add or remove required tokens.
    6. Click on Add Dependency button. From provided modules select fibonacciLib and confirm dialog. fibonacciLib should be in project`s libraries.
    7. Create new class in MyModule project (moduleClass).
    8. Import org.foo.fibonacciLib.NewClassWrapper into class nad add following code into class moduleClass:
      1. }}code
        /** @brief another wrapper for fibonacci function
        *
        * @return n-th fibonacci number
        */
        public static int fibonacci(int n){
        return NewClassWrapper.fibonacci(n);
        }

        }}
    9. Invoke popup menu on MyModule project node, select Properties. In API Versioning tab check org.foo.MyModule (or any other package name for MyModule) to be public.
    10. Check that muduleClass is compilable. Build MyModule.
    • EXPECTED RESULT: Module is successfully built.


Test suite: 4 Clusters

Purpose: Tests successfull creation of clusters and their usage and linking between projects.
Setup: Create a module suite project, you may use also the NewSuite project from previous test suites.

  1. Test case 1 Create and use cluster
    1. Insert some projects into your suite. If you are using NewSuite project, you don`t need to do this.
    2. Build the suite. In the projectfolder/build should be created a folder named "cluster".
    3. Create another standalone(!) suite project (let`s call it AnotherSuite).
    4. Invoke project properties on AnotherSuite.
    5. In libraries tab invoke Add cluster action. Browse and find the cluster folder in the previous suite project(see step 1). Add this cluster to the project.
    6. Try to use some of the classes from the cluster in AnotherSuite:
      1. Create new module
      2. Create new class in the module
      3. Invoke properties on the module project, in libraries tab invoke add module dependancy and select one of modules from the suite, which`s cluster is used in the AnotherSuite project
      4. In the new class try to use one of classes from the selected module project (import org.foo.moduleFromAnotherSuite.someClass;)
    • EXPECTED RESULT: Cluster should be added to project, and project should be compilable.
  1. Test case 2 Create and use cluster - module
    1. This test case is the same as the previous one, only cluster is not created from suite, but from a standalone nbmodule project.
    • EXPECTED RESULT: Cluster should be added to project, and project should be compilable.



Test suite: 5 Projects

Purpose: Tests successfull creation of projects and their usage and linking between projects.
Setup: Create a module suite project, you may use also the NewSuite project from previous test suites.

  1. Test case 1 Create and use project
    1. Test case is the same as the case 1 from previous test suite, only the project folder is used instead of cluster folder. It should work the same way.
    • EXPECTED RESULT: Project as a library should be added to project, and project should be compilable.
  1. Test case 2 Create and use cluster - module
    1. This test case is the same as the previous one, only that standalone module project is used instead of a module suite project. Try to have both clusters from both projects included (standalone module and suite).
    • EXPECTED RESULT: Project as a library should be added to project, and project should be compilable.




Test suite: 6 Sample netbeans platform application

Purpose: Tests other actions required for netbeans application development.
Setup: No setup is needed.

  1. Test case 1 Create a sample nbmodule application project
    1. Create a nbmodule sample application (new project|sampes|netbeans modules|paint application)
    2. Build and run the sample application.
    • EXPECTED RESULT: Project should work.




Test suite: 7 Linked dependecies

Purpose: Tests correct linking trough more projects.
Setup: No setup is needed. Previous suites might be helpful for understanding this suite.


  1. Test case 1 Linking
    1. Create a standalone nbmodule (moduleX, org.foo.moduleX ). Add a class into it (fooclass) and build it.
    2. Create a nbmodule suite project(suite1). Import moduleX as a library into this suite.
    3. Create another nbmodule suite (anotherSuite). Import suite1 project as a library into this suite.
    4. Warning should be shown in library tab of properties window: suite1 is dependant on moduleX which is not present (or similar).
    5. Solve warning by adding also moduleX project into libraries.
    6. Create a module in anotherSuite, create a class in this module and try tu import fooclass in this new class.
    • EXPECTED RESULT: Import must be succesful and new class must be compilable, as well as whole anotherSuite.




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