TS 74 Maven

Test Specification: Maven Support Test Specification

Author: Tomas Musil
Version: 7.26 (??? Version cannot be the same as in TS_73_Maven)
Introduction: This document serves mostly as a test specification for Maven specific functionality in Netbeans IDE - it should cover all most important features of Maven functionality,however this test specification can't cover all scenarios with Maven,and it should be tested by specific components responsible engineers along with Ant scenarios.
Setup: To create and build Maven project, just use the Maven 3.x bundled with the IDE. Also, for JavaEE projects, test in all cases JavaEE6 and JavaEE7 projects.

For testers using Java SE, you will need to download Java EE plugin in Java WEB and EE category .

Contents


Test suite: Maven projects

Purpose: Test creating different project archetypes
Setup: Test all Java EE project types for JavaEE6 and JavaEE7. Replace <JavaEE> with corresponding version.

  1. Create Java application
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > Java Application and push Next
    3. Type QuickstartPrj to the Project Name field and push Finish
    • EXPECTED RESULT:
      The project is created, the output contains message about "BUILD SUCCESS".
  2. Create Web Application Java EE
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > Web Application and push Next
    3. Type WebAppPrj<JavaEE> to the Project Name field and push Next
    4. Select Java EE version and push Finish
    • EXPECTED RESULT:
      The project is created, the output contains message about "BUILD SUCCESS".
  3. Create EJB Module Java EE
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > EJB Module and push Next
    3. Type EJBModPrj<JavaEE> to the Project Name field and push Next
    4. Select Java EE version and push Finish
    • EXPECTED RESULT:
      The project is created, the output contains message about "BUILD SUCCESSFUL".
  4. Create Enterprise Application Java EE
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > Enterprise Application and push Next
    3. Type EntAppPrj<JavaEE> to the Project Name field and push Next
    4. Select Java EE version and push Finish
    5. Push Finish
    • EXPECTED RESULT:
      Four projects are created (ear,ejb,pom and war), the output contains message about "BUILD SUCCESS".There's missing dependencies warning icon in Projects tab. Check that it can be resolved using "Show and resolve problem" action from context menu.
  5. Create NetBeans Module archetype
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > NetBeans Module and push Next
    3. Type NBModulePrj to the Project Name field and push Finish
    • EXPECTED RESULT:
      The project is created, the output contains message about "BUILD SUCCESSFUL". There's missing dependencies warning icon in Projects tab. Do build and this will disappear.
  6. Create NetBeans Application archetype
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven | NetBeans Application and push Next
    3. Type NBAppPrj to the Project Name field, check to create sample module and push Finish
    • EXPECTED RESULT:
      Both projects "NBAppPrj - NetBeans Platform Application (pom)" and "NBAppPrj - sample NetBeans Module (nbm)" are created, the output contains message about "BUILD SUCCESSFUL". There's missing dependencies warning icon in Projects tab. Check that it can be resolved using "Show and resolve problem" action from context menu.
  7. New Archetype wizard
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > Project from archetype and push Next
    3. Type archetype name (or part) into search field (e.g. "hudson")
    4. Select appropriate archetype and push Next
    5. Type MvnSampleProject to the Project Name field and push Finish
    • EXPECTED RESULT:
      Project from archetype is successfully created.


Test suite: Clean, Build, Run, Debug maven project

Purpose: Test basic operation on the maven specific projects

  1. Clean project
    1. Invoke popup menu on QuickstartPrj
    2. Select Clean action
    • EXPECTED RESULT:
      In Files view there is missing "target" folder now .
  2. Build project
    1. Invoke popup menu on QuickstartPrj
    2. Select Build action
    • EXPECTED RESULT:
      In Files view there appears "target" folder - contains QuickstartPrj-1.0-SNAPSHOT.jar file.
  3. Run project
    1. Invoke popup menu on QuickstartPrj
    2. Select Run action
    3. IDE asks for selecting main class for execution - push Select Main Class button to select offered one
    • EXPECTED RESULT:
      Project is executed - "Hello World!" string is printed in output .
  4. Debug project
    1. Set up breakpoint in main method's the only body line
    2. Type some other System.out.println on the next line
    3. Invoke popup menu on QuickstartPrj
    4. Select Debug action
    • EXPECTED RESULT:
      Debugger stops at the breakpoint and then continues when pushing F7. Finally there are printed proper lines in output .


Test suite: Run, Debug, Profile, Test single file

Purpose: Test basic operations on single files in the maven specific projects

  1. Run file
    1. Invoke popup menu on WebAppPrj
    2. Select New > Servlet and enter name and package (MavenPrjServlet, org.mavenprj)
    3. Click Finish
    4. Select Run action on MavenPrjServlet
    5. Confirm Servlet Execution URI by clicking OK
    6. Select Glassfish v4 server in next window and click OK
    • EXPECTED RESULT:
      Project is deployed and servlet displayed in browser .
  2. Debug file
    1. Select Debug action on MavenPrjServlet
    • EXPECTED RESULT:
      Project is deployed in debug mode,Debugger window opened in IDE and servlet displayed in browser .
  3. Profile file
    1. Go to Profile menu and select Advanced Commands > Run Profiler Calibration.
    2. After it's finished,click on OK.
    3. Select Profile action on MavenPrjServlet
    4. Click on Run button.
    • EXPECTED RESULT:
      Project is deployed in Profile mode,Profiler window opened in IDE and servlet displayed in browser .
  4. Test file
    1. Select Test action on MavenPrjServlet
    2. Create new JUnit test for MavenPrjServlet (New > JUnit > Test For Existing Class , browse for MavenPrjServlet) and invoke Test action on it.
    • EXPECTED RESULT:
      In case of servlet, no tests are executed. In case of JUnit test in fails, since we didn't entered any paramaters.

Test suite: Project properties

Purpose: Test properties of maven project

  1. Test General properties
    1. Select project properties for QuickstartPrj (by calling Properties from popup on project node)
    2. Select General
    3. Set up each of the field and check that these values are changed properly in pom.xml
    • EXPECTED RESULT:
      The pom.xml of the project synchronizes with the changes made in the project properties.
  2. Test Sources properties
    1. Select Sources node in project properties
    2. Check that the Source/Binary format is 1.5 by default
    3. Change Source/Binary format to 1.7
    • EXPECTED RESULT:
      The change is propagated in pom.xml .
  3. Test Configurations properties
    1. Select Configurations
    2. Push Add... button and set up fields "Configuration Id:" together with "Activate profiles", check "persist for others to reuse" checkbox
    3. Push OK button
    • EXPECTED RESULT:
      In Files view there is created nb-configuration.xml and contains proper values .
  4. Test Compile on Save for app execution
    1. By default, CoS should be "Enabled"
    2. Test by running (multiple times) Maven project containing class with main method.
    • EXPECTED RESULT:
      Code is not run directly, without Maven.
  5. Test Configurations
    1. Set up Configuration field in Run (select existing configuration)
    2. Check Configuration field in Actions and write test into Activate Profiles
    • EXPECTED RESULT:
      The file nbactions-<profilename>. xml is created at the same level as pom.xml - check it up in the Files view.
  6. Test Actions properties
    1. Select e.g 'Clean project' action in the list and change 'clean' goal and change it to 'install'
    2. Push OK button
    • EXPECTED RESULT:
      The change is written to the nbactions<profilename>.xml .
  7. Test Formatting properties
    1. Go to Formatting and select the radiobutton "Use project specific options"
    2. Set up different values for Tab Size, Right Margin and Indent spaces
    • EXPECTED RESULT:
      Values are stored in nb-configuration.xml and are used when editing pom.xml .

Test suite: Create templates in maven projects

Purpose: Test creating different templates in maven project

  1. Create package
    1. Create package in QuickstartPrj
    • EXPECTED RESULT:
      Package is created and is empty .
  2. Create JFrame form
    1. Create new JFrame form file in QuickstartPrj's newly created package
    • EXPECTED RESULT:
      The JFrame is available and is properly generated and opened in editor window.
  3. Create XML document
    1. Create new XML Document file in QuickstartPrj's newly created package
    2. Left everything set on default.
    • EXPECTED RESULT:
      The XML file is available and is properly generated and opened in editor window.
  4. Create new Java class
    1. Create new Java class file in QuickstartPrj's newly created package
    • EXPECTED RESULT:
      The Java class file is available and is properly generated and opened in editor window.

Test suite: Refactoring

Purpose: Test main refactoring in maven project

  1. Rename package
    1. Rename java package created in previous test suite to sun.my.pack
    2. In the Rename dialog click on Refactor.
    • EXPECTED RESULT:
      Rename succeeds, the code is compilable.
  2. Rename java class
    1. Rename java file created in previous test suite to MyClass
    2. In the Rename dialog click on Refactor.
    • EXPECTED RESULT:
      The file is renamed and compilation/run works smoothly.
  3. Rename JFrame form
    1. Rename JFrame file created in previous test suite to MyFrame
    2. In the Rename dialog click on Refactor.
    • EXPECTED RESULT:
      The file is renamed and compilation/run works smoothly.

Test suite: Project operations

Purpose: Test Delete, Move and Rename of Maven projects

  1. Rename project
    1. Rename WebAppPrj JEE5 Webapp (war) project to MavenWebAppPrj
    • EXPECTED RESULT:
      Rename succeeds, the project is compilable.
  2. Move project
    1. Move MavenWebAppPrj to another location
    • EXPECTED RESULT:
      The project is moved properly and compilation/run works smoothly.
  3. Delete project
    1. Delete MavenWebAppPrj
    2. Verify if checkbox "also delete sources..." is unchecked by default
    3. Confirm with "Yes"
    • EXPECTED RESULT:
      The project is deleted but sources will remain.
  4. Delete project along with sources
    1. Delete MavenWebAppPrj
    2. Verify if checkbox "also delete sources..." is unchecked by default
    3. Check the checkbox "also delete sources..."
    4. Confirm with "Yes"
    • EXPECTED RESULT:
      The project is deleted along with its sources.

Test suite: Maven related options

Purpose: Test maven related options

  1. Set up External Maven Home
    1. Go to Tools > Options > Java > Maven > Execution
    2. Set up the Maven external home by selecting "Browse..." in the "Maven Home" combobox
    3. Run a Maven build
    • EXPECTED RESULT:
      The used maven version can be checked by building of a project - it is written in the output like following line:
      NetBeans: Executing '/space/maven/2.0.9/apache-maven-2.0.9/bin/mvn install'.
  2. Set up Skip Tests
    1. Go to Tools > Options > Java > Maven > Execution
    2. Check checkbox "Tests for any build executions not related to testing"
    3. Build a Maven project (which has tests in its test-sources)
    • EXPECTED RESULT:
      No tests are run during project testing-check in Output tab.
    1. Uncheck checkbox "Tests for any build executions not related to testing"
    2. Build a Maven project (which has tests in its test-sources)
    • EXPECTED RESULT:
      Tests will be executed while building
  3. Set up Global Options
    1. Go to Tools > Options > Java > Maven > Execution
    2. Go to "Global Execution Options" textfield and click on "Add" button to the right
    3. Select "--debug" option
    4. Build project
    • EXPECTED RESULT:
      Check Output tab,that there's more detailed output from building.
  4. Set up frequency of download of binaries/javadoc/sources
    1. Go to Tools > Options > Java > Maven > Dependencies
    2. In comboboxes for binaries/javadoc/sources select "first project open only"
    3. Create new Maven Web App project
    • EXPECTED RESULT:
      There's now more actions done on project creation. ???
  5. Edit Global Custom Goal Definitions
    1. Go to Tools > Options > Java > Maven > Execution
    2. Click on "Edit Global Custom Goal Definitions..." button
    • EXPECTED RESULT:
      Goals window should open.
  6. Set up frequency of index updates
    1. Go to Tools > Options > Java > Maven > Index
    2. Set "Index Update Frequency" to "On Every Startup"
    3. Close IDE and reopen.
    • EXPECTED RESULT:
      Index should be updated on startup.
    1. Click on Index Now to invoke immediate index reload.
    • EXPECTED RESULT:
      Index should be updated shortly.
  7. Maven related editor hints
    1. Go to Tools > Options > Editor > Hints
    2. Set up the Language to "Apache Maven POM Files"
    3. Change the hints options - by managing this options,you can set the behaviour of editor for maven pom.xml files.
    • EXPECTED RESULT:
      Check all top-level checkboxes are set.
  8. Edit Custom Global Definitions
    1. Go to Tools > Options > Java > Maven > Execution
    2. Click on "Edit Custom Global Definitions..." button
    • EXPECTED RESULT:
      Goals window should open.
  9. Set up project node display with different pattern
    1. Close all open projects (if any)
    2. Create a new Maven project (GAV: com.company:sampleproject:2.0.1-SNAPSHOT and name "Our sample project")
    3. Go to Tools > Options > Java > Maven > Appearance
    4. Set "Project node name" to "Default" and push OK
      • EXPECTED RESULT:
        label of project node is "Our sample project"
    5. Go to Tools > Options > Java > Maven > Appearance
    6. Set "Project node name" to "${project.groupId}.${project.artifactId}-${project.version}" and push OK
      • EXPECTED RESULT:
        label of project node is "com.company.sampleproject-2.0.1-SNAPSHOT"
    7. Go to Tools > Options > Java > Maven > Appearance
    8. Set "Project node name" to "Custom...", type "${project.name}::${project.version}" into the appearing textfield and push OK
      • EXPECTED RESULT:
        label of project node is "Our sample project::2.0.1-SNAPSHOT"

Test suite: Project libraries

Purpose: Test libraries in maven projects

  1. Add library
    1. Click on Dependencies node in projects view and invoke popup menu
    2. Select Add Dependency
    3. Filter the library - e.g. jfreechart (if Local repository is being currently transferred, wait please until it ends)
    • EXPECTED RESULT:
      The library should be added properly to the project. Show and Resolve problems / Download Libraries,if necessary . If problem remains,resolve it manually.
  2. Download Missing Dependencies
    1. Click on Dependencies node in projects view and invoke popup menu
    2. Select Download Missing Dependencies
    • EXPECTED RESULT:
      All dependencies are checked and the missing ones downloaded - if there's any minus badge on dependency, it should disappear .
  3. Download Javadoc
    1. Click on Dependencies node in projects view and invoke popup menu
    2. Select Download Javadoc
    • EXPECTED RESULT:
      All javadocs are downloaded .
  4. Download Sources
    1. Click on Dependencies node in projects view and invoke popup menu
    2. Select Download Sources
    • EXPECTED RESULT:
      All sources are downloaded .
  5. Manually Install Artifact
    1. Click on any Library node in projects view and invoke popup menu
    2. Select Manually Install Artifact and select any library jar, you have available locally
    • EXPECTED RESULT:
      Library is added to the list . Show and Resolve problems / Download Libraries,if necessary . If problem remains,resolve it manually.
  6. Add Local Javadoc
    1. Click on any Library node in projects view and invoke popup menu
    2. Select Add Local Javadoc and select any javadoc, you have available locally
    • EXPECTED RESULT:
      javadoc is loaded .Show and Resolve problems / Download Libraries,if necessary .
  7. Remove Dependency
    1. Click on any Library node in projects view and invoke popup menu
    2. Select Remove Dependency
    • EXPECTED RESULT:
      Dependency should be removed.
  8. Exclude Dependency
    1. This option is available only for transitive dependencies
    2. Click on any Library node in projects view and invoke popup menu
    3. Select Exclude Dependency
    • EXPECTED RESULT:
      Dependency should be removed.
  9. View Artifact Details
    1. Click on any Library node in projects view and invoke popup menu
    2. Select View Artifact Details
    • EXPECTED RESULT:
      Artifact Details is opened in the editor .
  10. Show Dependency Graph
    1. Click on any Library node in projects view and invoke popup menu
    2. Select View Artifact Details
    3. Click on "Graph" button in the multiview header.
    • EXPECTED RESULT:
      Artifact Details / Graph is displayed in editor .

Test suite: Maven repository browser

Purpose: Test Maven repository browser functionality

  1. Invoke repository browser
    1. Start IDE with fresh userdir
    2. Go to Services window, expand Maven Repositories node
    • EXPECTED RESULT:
      The Maven Repository Browser node and has only local repo).
  2. Repository browser with remote repo
    1. Create new Maven java project
    2. Go to Services window, expand Maven Repositories node
    • EXPECTED RESULT:
      The Maven Repository Browser appears and has local repo as well as central repo registered).
  3. Update Indexes on local/remore repo
    1. Invoke Update Index on repo node popup
    • EXPECTED RESULT:
      Index gets updated.
  4. Add repository
    1. Invoke Add repository from popup on Maven repositories node
    2. Write TestingRepository for Name,TestRep for ID and select path to ~/TestRep folder (create it).
    3. Hit Add button.
    • EXPECTED RESULT:
      The repository is added.Try to add there any libraries and check it's visible in Repository Browser in IDE.
  5. Find in repository
    1. Invoke Find from popup on Maven repositories node, type "jfreechart"
    • EXPECTED RESULT:
      Check that the searched tree is the same as when Adding library to a project.
  6. Artifact details
    1. Doubleclick on some artifact from Cental repository (e.g. jfree.jfreechart v 1.0.13)
    • EXPECTED RESULT:
      Details of artifact are displayed in editor area, POM can be viewed.
  7. Download artifact
    1. Invoke Download action from popup on some artifact node from central repo
    • EXPECTED RESULT:
      Artifact is downloaded into local repo.
  8. Download sources/javadoc
    1. Find some artifact in central repo that has javadoc and sources available, download it
    2. From it's popup invoke Download Javadoc (Download Sources)
    • EXPECTED RESULT:
      Javadoc and sources can be downloaded.

Test suite: Edit pom.xml file

Purpose: Test pom.xml editor functionality

  1. Dependency graph
    1. Select "Graph" tab in editor multiview of opened POM file
    • EXPECTED RESULT:
      Dependency graph is displayed.
  2. Code Completion in pom.xml
    1. Switch to source tab
    2. Invoke code completion in section <dependencies>
    3. Select <dependency> from the code completion
    • EXPECTED RESULT:
      The dependency tag is written to the editor.
  3. Code Generation in pom.xml
    1. Invoke code generation either by Alt+Insert keyboard shortcut or from context menu > Insert Code
    2. Select <dependency>
    • EXPECTED RESULT:
      Add library window is displayed.
  4. Hints in pom.xml
    1. Open pom.xml and select the whole content of a "<dependency>" tag, i.e. everything between "<dependency>" tag and corresponding "</dependency>" tag.
    2. The hint indicator appears in left gutter
    3. Press "Alt + Enter" to show the available hints
    4. Press "Enter" to execute the hint
    • EXPECTED RESULT:
      Move Unmanaged to Dependency Management hint causes adding <dependencyManagement> section.
  5. POM Model tab
    1. With opening of pom.xml file, POM Model tab is opened in Navigator window
    2. Select any tag in the Model window and double-click on it
    • EXPECTED RESULT:
      Corresponding tags should be marked also in the editor.
  6. POM Inheritance tab
    1. Go to the previously created Enterprise Application project and open pom.xml file from (ear)
    2. Select POM Inheritance from dropdownlist in Navigator window
    3. Select other project then current one in the list and double-click.
    • EXPECTED RESULT:
      Corresponding project's pom.xml is opened in editor.
  7. Code completion based on index of local repo
    1. Start IDE with empty userdir
    2. Open some simple j2se maven project
    3. If Netbeans start downloading index of central repo, cancel it
    4. Open pom.xml
    5. Put carret inside <version> tag of JUnit dependency and invoke code completion
    • EXPECTED RESULT:
      Only JUnit version that are present in local repository should be offered in code completion. Check content of your local repo in Maven repository browser window.
  8. Hyperlinks in POM
    1. Open POM file that contains hyperlink (e.g. you can use pom.xml in webapp project)
    2. Navigate to some hyperlink, CTRL+click it
    • EXPECTED RESULT:
      You can jump to definition by CTRL+clicking on hyperlink. Otherwise you are shown in baloon popup value if you dot not perform click

Test suite: Functional tests

Purpose: Test scenarios for Maven usage
Setup: Test all Java EE project types for JavaEE6 and JavaEE7.

  1. Two depending Java applications
    1. Create new Maven java application project (m1)
    2. Build it to install JAR into local repo
    3. Create another new Maven java application project (m2)
    4. Build it to install JAR into local repo
    5. Add to dependencies in (m2) dependency on (m1)
    6. Open predefined App.java in (m2) and try to use in code predefined App.java from (m1)
    7. Check also that Go to source works and opens App.java from (m1)
    • EXPECTED RESULT:
      Class from (m2) can be used and Go to source works. ".
  2. Find usages in local repo
    1. Build again (m2)
    2. Close (m2)
    3. Invoke Find usages on App.java in (m1)
    • EXPECTED RESULT:
      Find usagas should find reference from (m2) jar in local repo.
  3. Build installers for NB application
    1. Create new Maven NetBeans Platform application project (Nbapp)
    2. Clean and build (on Nbapp-app)
    3. Switch to deployment profile
    4. Clean and build; installers are generated
    • EXPECTED RESULT:
      Installers are generated in deployment profile; all work fine. ".
  4. Create CRUD sample Java EE
    1. Create new CRUD sample application (Samples|Maven)
    2. Clean and build parent project
    3. Run 'crud-sample-application - NetBeans Platform based application'
    • EXPECTED RESULT:
      Application starts".

Test suite: Misc tests

Purpose: To test misc. Maven support features
Setup:

  1. Local definition settings.xml
    1. Have in ~/.m2/settings.xml some section specific to your environment, e.g. proxy settings (See details in [[1]]
    2. Do some action (e.g. create new module) and check that action is executed according to ~/.m2/settings.xml
    3. Download and unzip Maven distribution from web
    4. In Tools|Options, change Maven home to newly downloaded bits
    5. move your settings.xml from ~/.m2 to $NEW_MAVEN_HOME/conf/settings.xml
    6. Change something specific in $NEW_MAVEN_HOME/conf/settings.xml (e.g. proxy settings)
    7. Do some action (e.g. create new module) and check that action is executed according to $NEW_MAVEN_HOME/conf/settings.xml
    • EXPECTED RESULT:
      Settings.xml in Maven home can be taken into account".

Maven OSGI test Specification

Author: Jaroslav Pospisil
Version: 1.0
Introduction: This document serves mostly as a test specification for Maven OSGI functionality in Netbeans IDE - it should cover all most important features of OSGI functionality.
Setup: To create and build Maven project,you have either to have external Maven installation installed, or to use embedded Maven,coming with IDE. There's currently many problems with embedder,so use of external Maven installation is strongly suggested. Download latest maven installation from http://maven.apache.org/download.html, unpack it and either set M2_HOME property or set external maven installation path in Tools > Miscelaneous > Maven. Also, for JavaEE projects, test in all cases both JavaEE5 and JavaEE6 projects
Second,ensure to pass this test specification twice,to test on both JDK1.5 and JDK1.6.


Test suite: Maven OSGi Bundle

Purpose: Test to create OSGi Bundle project archetype and appropriate file templates
Setup:

  1. Create OSGi Bundle
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > Maven OSGi Bundle and push Next
    3. Type TestOSGIBundle to the Project Name field and push Finish
    • EXPECTED RESULT:
      New OSGi Bundle is created with specific icon, the output contains message about "BUILD SUCCESSFUL".
  2. Create Java Class
    1. Right-Click on TestOSGiBundle in Project tab and select New > Java Class
    2. Type OSGiSharedClass to the Class Name field, osgistuff in Package and push Finish.
    3. Add new method returnSharedText, that returns string return "This text comes from method in OSGi Bundle" in the class.
    • EXPECTED RESULT:
      New Java Class with method is created in OSGi bundle.
  3. Create Bundle Activator (if not already created)
    1. Right-Click on TestOSGiBundle in Project tab and select New > Bundle Activator
    2. Select osgistuff for Package and click Finish.
    • EXPECTED RESULT:
      New Bundle Activator is created in OSGi Bundle.
  4. Install Bundle into repository
    1. Right-Click on TestOSGiBundle in Project tab and select Clean and Build
    • EXPECTED RESULT:
      .

Test suite: Test Dependency on OSGi Bundle

Purpose: Test to create dependency on OSGi Bundle in Quickstart project and demonstrate it works.
Setup:

  1. Create Maven Java Project
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven
    3. Select Java application and push Next
    4. Type TestQuickstartPrj to the Project Name field and push Finish
    • EXPECTED RESULT:
      The project is created, the output contains message about "BUILD SUCCESS".
  2. Add dependency on OSGi Bundle
    1. Go to Projects tab,click on TestQuickstartPrj node to open it and right-click on Dependencies node.
    2. Select Add Dependency and switch to Open Projects.
    3. Select TestOSGiBundle and click OK.
    4. Wait until all neccessary libraries are downloaded (watch progress bar).
    • EXPECTED RESULT:
      OSGi Bundle dependency is added into Libraries as project and library.
  3. Call OSGi method from main class
    1. Go to editor, when should be App.java already opened.
    2. Insert into main method line just above System.out command:
      OSGISharedClass oc = new OSGISharedClass();
    3. Change System.out command to:
      System.out.println( oc.returnSharedText() );
    4. Save and run project.
    • EXPECTED RESULT:
      The project is started, the output contains message about "BUILD SUCCESSFUL" and also contains line:
      This text comes from method in OSGI Bundle
      .

Test suite: Maven Netbeans Module with OSGi support

Purpose: Test to create Netbeans Module with OSGi support project archetype and appropriate file templates
Setup:

  1. Create Netbeans Module with OSGi support
    1. Go to main menu File > New Project
    2. In New Project wizard select Maven > Maven Netbeans Module and push Next
    3. Type TestOSGINBM to the Project Name field and push Next
    4. Check Allow OSGi bundles as dependencies and click Finish.
    • EXPECTED RESULT:
      New Netbeans Module with OSGi support is created , the output contains message about "BUILD SUCCESSFUL". Verify that you can ass some OSGI bundle as dependency.)
  2. Build Project
    1. Use added OSGi dependency in code of TestOSGINBM
    2. Right-click on Build Project action in context menu.
    • EXPECTED RESULT:
      . Module can be built


--Jpospisil 13:31, 2 March 2010 (UTC) --Alied 04:34, 1 July 2013 (UTC)

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