TS 61 AppClient

Application Client Project Test Specification

Author: Radim Roska,Martin Schovanek
Version: 1.3
Estimated time: 8 hours
Default IZ component(s): j2ee/appclient
Last update: 2008/03/31
Introduction: IDE can create projects that implement J2EE application clients (similar to web applications and ejb modules). These projects would be similar to the J2SE Application project, with additional support for:

  1. J2EE platform deployment descriptor editing
  2. server specific deployment descriptor editing
  3. deployment
  4. assembly into Enterprise Applications


Contents


Test suite: New Enterprise Application Project Wizard

Purpose: Test creating of projects
Setup: Application server (e.g. GlassFish) is registered. Create Enterprise Application Project.(lets call it EAR project)

  1. Create Application Client Project
    1. New project - Enterprise - Enterprise Application Client
    2. Try to browse file system and choose location for project, check or uncheck Set as Main project. Next
    3. Select in Add to Enterprise Application your created ear project created in setup.
    4. Select GlassFish server.
    5. Try various Java EE versions.
    6. Finish
    • EXPECTED RESULT: Project is/is not created as Main project whether you've checked/unchecked Set as Main Project. Its part of EAR Project you've specified in wizard. In Configuration Files there has to be deployment descriptor application-client.xml. Project is created in correct location...
  1. Create Application Client Project with Existing Sources
    1. Create new Java class file in project in some new package.
    2. Delete project (dont check Also delete Source Under.....)
    3. Create new project - this time select Application Client Project with Existing Sources.
    4. Specify location of deleted project (using browse). Next.
    5. Java EE is same as it was before deleting. Next.
    6. Add Source Package and Test Package folders.
    7. Finish
    • EXPECTED RESULT: Application client is recreated correctly.


Test suite: Persistence in Application Client

Purpose: Testing of Persistence in Application Client.
Setup:

  1. Create new Persistence unit
    1. Invoke Persistence unit wizard by New|File/Folder|Persistence|Persistence Unit.
    2. Leave Persistence Unit name default
    3. Persistence libraries needed should be available and pre-set - default is toplink
    4. Leave Table generation Strategy on Create option.
    5. Select database connection - you can choose some of sample databases
    • EXPECTED RESULT: persistence.xml is created in Configuration Files.
  1. Create new Entity Class
    1. Invoke Entity class wizard by New|File/Folder|Persistence|Entity Class.
    2. Specify some class name, package name and Finish.
    3. Invoke wizard by New|File/Folder|Persistence|Entity Classes from Database
    4. Specify Database Connection.
    5. Choose some table(s) you want to generate entity class for. Click Next.
    6. Check table names and class names, you can modify predefined package name.
    7. Click Finish.
    • EXPECTED RESULT: Valid Entity classes are generated.


Test suite: Application Client and Web Services

Purpose: Testing Web Service Client in Application Client.

This part is sufficiently described in JAX-WS Web Service Client test specification - http://qa.netbeans.org/modules/j2ee/netbeans 6.1/WSClientJAXWS.html

Test suite: Additional features of Application Client.

Purpose: Testing another features of Application Client.
Setup: Create EAR project with application client.

  1. Call Enterprise Bean in java class.
    1. In application client in EAR project create new java class by New|File/Folder|Java Classes|Java Class.
    2. Leave Java Class name default and enter package name org.my.java.
    3. Right-click somewhere in editor, where new java class is opened and select Enterprise Resources|Call Enterprise Bean.
    4. Select EJB from the list (if there is nothing,close window,create Session bean with remote interface in EJB module .
    5. Click OK.
    • EXPECTED RESULT: According to the Java EE version is generated either lookup for bean or annotation with bean declaration.
  1. Use database
    1. Right-click somewhere in editor, where java class is opened and select Enterprise Resources|Use Database.
    2. Add Reference..by clicking on Add....
    3. Write some reference name and specify e.g. Server Data Source
    4. Click OK in dialog.
    • EXPECTED RESULT: As before result depends on Java EE version. While using java ee 5, just annotation is added otherwise getter for DataSource is created.
  1. Other enterprise features.
    1. Testing of these features is described on following url : http://qa.netbeans.org/modules/j2ee/promo-g/EnterpriseResourcesTestSpec.html


Test suite: Project operations.

Purpose: Testing of project operations.

  1. Perform all build, clean & build, clean, verify and generate javadoc operations on your Application Client project.
  2. Check properties of AppClient project.
  3. Deploy project on application server - undeploy and deploy.
  4. Run, Debug, Test(first you can create some simple junit test) project.
  5. Operations Rename, Move, Copy, Delete and Find
    • EXPECTED RESULT: All these operations has to work properly.


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