TS 73 Apisupport Sanity

Sanity Test Specification for NetBeans API Support Functionality

Author: Hermien Pellissier, Aldo Brucale
Last update: 10 October 2012
NetBeans version: NetBeans 7.3
Introduction: Test cases for sanity testing of NetBeans API Support functionality.
Prerequisites: The following things will be needed to complete all the actions in the following test suites:

  1. Latest version of NetBeans IDE (System Under Test)
  2. One older version of NetBeans Platform
  3. Another JDK Target (Test needs selection of older JDK, usually not available on Mac unless you specifically install one)

Contents


Test suite: NetBeans Platform Manager

Purpose: Verifying that multiple platforms can correctly be configured using the platform manager, and that error checking is correctly applied to user input in the platform manager.
Setup: A second platform (besides the running IDE) is required for this test suite. Either install a different version of the IDE (for example the trunk dev build), or make a copy of the NetBeans install directory.

  1. Add Invalid Platform Folder
    1. Go to Tools > NetBeans Platforms.
    2. Click the Add Platform... button.
    3. Select any folder that does not contain a NetBeans platform.
    • EXPECTED RESULT: The Next and Finish buttons on the Add NetBeans Platform dialog are disabled and the Platform Name field on the right is empty.
  2. Add Valid Platform Folder
    1. Select the root folder of the second NetBeans distribution (see setup procedure for this test suite).
    • EXPECTED RESULT: The Next and Finish buttons are enabled and the Platform Name field on the right displays the name of the platform correctly.
  3. Specify Invalid Platform Name
    1. Click the Next button, and note the state of the Finish button (it should be enabled).
    2. Clear the Platform Name field.
    • EXPECTED RESULT: The Finish button is disabled and an error message is displayed.
  4. Specify Valid Platform Name
    1. Enter "My platform" in the Platform Name field.
    2. Click the Finish button.
    • EXPECTED RESULT: The "My platform" is added to platform manager.
  5. Harness Selection - Default Platform
    1. On the NetBeans Platform Manager dialog, select the default platform.
    2. Switch to the Harness tab and inspect the settings.
    • EXPECTED RESULT: Harness suplied with IDE is selected, and other options are disabled.
  6. Harness Selection - Other Platform
    1. Select "My platform" in the platforms list.
    2. Choose the Other option (which should now be enabled).
    3. Click on the Browse... button and select the harness folder in folder where "My platform" is located.
    • EXPECTED RESULT: All three harness options are selectable for a platform other than the default one. The Browse... button should be enabled only when the Other option is selected.

Test suite: Module Suite Wizard

Purpose: Verifying that module suites can be created with the wizard and that validation is correctly applied to user input.
Setup: No setup is required.

  1. Invalid Project Name
    1. Open the new project wizard from the main menu at File > New Project....
    2. Select the NetBeans Modules category and choose the Module Suite project type.
    3. Click Next.
    4. Type an invalid project name using forbidden characters such as \/:*?">|.
    • EXPECTED RESULT: A message is displayed indicating that the project name is invalid, and the Finish button is disabled.
  2. Valid Project Name
    1. Type a valid suite name.
    2. Click Finish.
    • EXPECTED RESULT: A valid suite is created and added to the Projects window list, with the name as specified in the wizard.

Test suite: NetBeans Platform Application Wizard

Purpose: Verifying that NetBeans Platform Applications can be created with the wizard and that validation is correctly applied to user input.
Setup: No setup is required.

  1. Invalid Project Name
    1. Open the new project wizard from the main menu at File > New Project...
    2. Select the NetBeans Modules category and choose the NetBeans Plaform Application project type.
    3. Click Next.
    4. Type an invalid project name using forbidden characters such as \/:*?">|.
    • EXPECTED RESULT: A message is displayed indicating that the project name is invalid, and the Finish button is disabled.
  2. Valid Project Name
    1. Type a valid suite name.
    2. Click Finish.
    • EXPECTED RESULT: A valid suite is created and added to the Projects window list, with the name as specified in the wizard.

Test suite: Module Project Wizard

Purpose: Verifying that NetBeans modules can successfully be created using the wizard, and that validation is correctly applied to user input.
Setup: No setup is required. One of the suites created earlier in this test specification will be reused.

  1. Invalid Project Name
    1. Open the new project wizard from the main menu at File > New Project...
    2. Select the NetBeans Modules category and choose the Module project type.
    3. Click Next.
    4. Type an invalid project name using forbidden characters such as \/:*?">|.
    • EXPECTED RESULT: A message is displayed indicating that the project name is invalid, and the Next button is disabled.
  2. Valid Project Name
    1. Type a valid Project Name.
    2. Select the Add to Module Suite option.
    3. Select a module suite from the drop down list.
    4. Click Next.
    • EXPECTED RESULT: The wizard proceeds to the next step.
  3. Valid Code Base
    1. Type a valid value into the Code Name Base field.
    2. Click Finish.
    • EXPECTED RESULT: The module is created and added to the selected module suite. It is also added to the list of open projects on the Projects window.

Test suite: Action Wizard

Purpose: Verifying that an action can be created using the wizard.
Setup: The module created in the previous test suite will be re-used here.

  1. Create New Action
    1. Select the new module created in the previous test suite on the Projects window.
    2. Open the new file wizard from the main menu at File > New File....
    3. Select the Module Development category, and the Action file type.
    4. Click Next.
    5. Choose the Always Enabled option, and click Next.
    6. Leave the settings on the GUI registration page of the wizard as the defaults that are suggested. Note the location that is suggested, and click Next.
    7. Specify the Display Name of the action to be "Test Action".
    8. Click Finish.
    9. Run the module (right click on the module and choose Run).
    • EXPECTED RESULT: Verify that the action called "Test Action" appears on the menu in the location noted earlier.

Test suite: Test Suite Module's Libraries Node

Purpose: Verifying that module dependencies can be added to and removed from a module that is part of a suite.
Setup: The module created earlier as a part of a suite will be re-used here.

  1. Adding Dependencies to a Suite Module
    1. Select the suite module created earlier in the Projects list.
    2. Expand the project's Libraries node.
    3. Right-click on the node and choose Add Module Dependency...
    4. Choose any module (note which one you choose!), and click OK.
    • EXPECTED RESULT: The selected module is added under the Libraries node.
  2. Removing Dependencies from a Suite Module's project.xml File
    1. Open the project.xml file of the module (Project Metadata under the Important Files node).
    2. Cut an entire <dependency> tag with all of its children from the file and save it.
    • EXPECTED RESULT: The dependency is removed from the Libraries node.
  3. Adding Dependencies to a Suite Module's project.xml File
    1. Paste the entire <dependency> tag back where it was and save the file.
    • EXPECTED RESULT: The dependency is added under the Libraries node.
  4. Removing Dependencies from a Suite Module
    1. Right-click on the newly added dependency in the projects tree and choose Remove.
    • EXPECTED RESULT: The selected module is removed from the Libraries node.

Test suite: Java Platforms

Purpose: Verifying that the Java platform that is specified for a standalone module is correctly used when the module is executed.
Setup: A second installation (i.e. different version) of the JDK is required for this test suite. Download and install an older or newer version of the JDK. Add it to the list of Java platforms in the IDE (Tools > Java Platforms) before proceeding.

  1. Default Target JDK
    1. Access the about box (Help > About) of the IDE and note which version of Java it is running on.
    2. Create a new standalone module (create a Module project but choose Standalone Module instead of Add to Module Suite).
    3. Run the module (right click on the module and choose Run).
    4. Access the about box of the executed application, and note the version of Java that it is running on.
    5. Exit the application.
    • EXPECTED RESULT: The application runs on the same version of Java as the IDE.
  2. Select Other Target JDK
    1. Invoke the module's properties (right click on the module and choose Properties).
    2. Select the Libraries category.
    3. Select other Java platform.
    4. Click OK.
    5. Run the module again.
    6. Access the about box and note the Java version.
    7. Exit the application.
    • EXPECTED RESULT: The application is running on the selected Java version.

Test suite: Test Standalone Module's Libraries Node

Purpose: Verifying that module dependencies can be added to and removed from a standalone module.
Setup: The standalone module created in the previous test suite will be re-used here.

  1. Adding Dependencies to a Standalone Module
    1. Select the standalone module created earlier in the Projects list.
    2. Expand the project's Libraries node.
    3. Right-click on the node and choose Add Module Dependency...
    4. Choose any module (note which one you choose!), and click OK.
    • EXPECTED RESULT: The selected module is added under the Libraries node.
  2. Removing Dependencies from a Standalone Module's project.xml File
    1. Open the project.xml file of the module (Project Metadata under the Important Files node).
    2. Cut the entire <dependency> tag with all of its children from the file and save it.
    • EXPECTED RESULT: The dependency is removed from the Libraries node.
  3. Adding Dependencies to a Standalone Module's project.xml File
    1. Paste the entire <dependency> tag back where it was and save the file.
    • EXPECTED RESULT: The dependency is added under the Libraries node.
  4. Removing Dependencies from a Standalone Module
    1. Right-click on the newly added dependency in the projects tree and choose Remove.
    2. Click Yes on the confirmation dialog.
    • EXPECTED RESULT: The selected module is removed from the Libraries node.

Test suite: Library Wrapper Module Wizard

Purpose: Verifying that a library wrapper module can be created with the wizard and that validation is correctly applied to user input.
Setup: No setup is required. The suite created earlier in this test spec will be re-used.

  1. Invalid Library File Name
    1. Open the new project wizard from the main menu at File > New Project...
    2. Select the NetBeans Modules category and choose the Library Wrapper Module project type.
    3. Click Next.
    4. Type an invalid library file name (a library file that does not exist).
    • EXPECTED RESULT: The Finish and Next buttons are disabled.
  2. Valid Library File Name
    1. Type valid library jar file name or browse to an existing library. (You can choose one of the jars included in the IDE install folder, for example in platform/modules.)
    • EXPECTED RESULT: The Next button is enabled.
  3. Creating a Library Wrapper
    1. Click Next.
    2. Select the suite created earlier in this test suite as parent for the new library wrapper.
    3. Click Next.
    4. Specify a valid Code Name Base for the module.
    5. Click Finish.
    • EXPECTED RESULT: The library wrapper module is created and added to the list of open projects on the Projects window.
    • EXPECTED RESULT: In the project.xml file (Project Metadata in the Important Files node): project\configuration\data\public-packages\package contains all packages from jar library, project\configuration\data\class-path-extension\runtime-relative-path contains ext/"libname".jar and project\configuration\data\class-path-extension\binary-origin contains release/modules/ext/"libname".jar.
    • EXPECTED RESULT: The library jar is copied to release/modules/ext/"libname".jar in the created project.
    • EXPECTED RESULT: The library jar displayed in the Projects view under the libraries node.
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