Application Client Test Specification

Author: Jaroslav Pospisil
Version: 1.2
Last update: 25.11.2008
Introduction: The user are from Netbeans 5.5 able to 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:

  • J2EE platform deployment descriptor editing
  • server specific deployment descriptor editin
  • deployment
  • assembly into Enterprise Applications


Comment:


Table of Contents




Test suite 1: Application Client wizard - create new Application Client from scratch



Purpose: Testing of basic AC features.
Setup: Add Sun Java System Application Server 8.2 and Glassfish in Runtime tab in before you start.Create enterprise application
by invoking New Project|Enterprise|Enterprise Application with default values.
For purposes of testing,consider this suite as one executed twice,because there are two ways of using Application Client.
First is standalone application client - create new Application Client by invoking New Project|Enterprise|J2EE Application Client. Second is application client in EAR - create new Application Client by invoking New Project|Enterprise|Enterprise Application, and then checking
Create Application Client Module in wizard. Test suites are identical, so please test next for both sayed test cases.




#Test caseDescription
1New project name
1. Type new project name.
2. SJAS or Glassfish server and default J2EE version should be automatically set.
RESULT: Valid Application Client created (check Application Client directory structure and Source Packages|applicationclient|Main.java file).
2Project name as existing directory
1. Type project name as existing directory.
RESULT: Preventing user from application client creation.
3Invalid project name
1. Type invalid project name using forbidden characters.
RESULT: Preventing user from application client creation.
4Change location
1. Change location (use typing and/or selecting by Browse button).
RESULT: Valid application client created (check web application directory structure and WEB-INF/web.xml file).
5New location
1. Type new nonexisting location.
RESULT: New directory created. RESULT: Valid web application created (check Application Client directory structure and Source Packages|applicationclient|Main.java file).
6Read only location
1. Choose read only location.
RESULT: Preventing user from application client creation.
7Main class name
1. Change Main class Name and/or package name for Main class..
RESULT: Main class and/or package is created with different name).
8J2EE version
1. Select Glassfish as J2EE server and change J2EE specification level to J2EE 1.4.
RESULT: J2EE specification used in application client (File|"project name" Properties|General|J2EE Platform) is different to the default.
9Uncheck Create Main Class
1. Uncheck Create Main Class in wizard.
RESULT: No Main class is created in application client.
10Change server
1. Change server to Sun Java System Application Server 8.2.
RESULT: You can check if application properties|Run that server was set to Sun Java System Application Server 8.2 .
11Add to Enterprise application
1. Click on Add to Enterprise application and select it.
RESULT: Your application client will be added to selected Enterprise application.
12No main project
1. Turn off the Set as Main checkbox.
RESULT: Created application client will not become main project.
Teardown:



Test suite 2: Application Client wizard - create new Application Client from existing sources



Purpose: Testing of basic AC features.
Setup: Add Sun Java System Application Server 8.2 and Glassfish in Runtime tab in before you start.Create enterprise application
by invoking New Project|Enterprise|Enterprise Application with default values.
Create J2EE Application Client Module with Existing Sources in wizard. Use either your own sources, or use Application Client created in previous suite
and delete its build,dist,nbproject folders and build.xml file.




#Test caseDescription
1New application client
1. Browse for project folder in Location.
2. Leave project name default.
RESULT: Valid Application Client created (check Application Client directory structure and Source Packages|applicationclient|Main.java file).
2Location is existing project
1. Browse in Location for folder of existing project.
RESULT: Preventing user from application client creation.
3Invalid project name
1. Type invalid project name using forbidden characters.
RESULT: Preventing user from application client creation.
4Change location
1. Change location (use typing and/or selecting by Browse button).
RESULT: Valid application client created (check web application directory structure and WEB-INF/web.xml file).
5Bad location
1. Type new nonexisting location.
RESULT: Preventing user from application client creation.
6Read only location
1. Choose read only location.
RESULT: Preventing user from application client creation.
7J2EE version
1. Select Glassfish as J2EE server and change J2EE specification level to J2EE 1.4.
RESULT: J2EE specification used in application client (File|"project name" Properties|General|J2EE Platform) is different to the default.
8Uncheck Set Source Level to 1.5
1. Uncheck Set Source Level to 1.5 in wizard.
RESULT: J2SE version for this application client is set to Netbeans default (otherwise it's set to 1.5, even if Netbeans run on different version).
9Change server
1. Change server to Sun Java System Application Server 8.2.
RESULT: You can check if application properties|Run that server was set to Sun Java System Application Server 8.2 .
10Add to Enterprise application
1. Click on Add to Enterprise application and select it.
RESULT: Your application client will be added to selected Enterprise application.
11No main project
1. Turn off the Set as Main checkbox.
RESULT: Created application client will not become main project.
Teardown:



Test suite 3: Persistence in Application Client



Purpose: Testing of Persistence in Application Client.
Setup: Add Sun Java System Application Server 8.2 and Glassfish in Runtime tab in before you start.
Test persistence in standalone application client - create new Application Client by invoking New Project|Enterprise|J2EE Application Client
and also in application client in EAR - create new Application Client by invoking New Project|Enterprise|Enterprise Application, and then checking
Create Application Client Module in wizard.
.




#Test caseDescription
1Create 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.
4. Leave Table generation Strategy on Create option.
RESULT: Valid Persistence unit created and opened in editor(check persistence.xml in Configuration files folder).
2Create new Entity Class
1. Invoke Entity class wizard by New|File/Folder|Persistence|Entity Class.
2. Leave Class name default.
3. Enter package name, for example org.client.persistence .
4. Click on Finish.
RESULT: Valid Entity class created (should be opened in editor).
3Create new Entity Classes from Database
1. Invoke wizard by New|File/Folder|Persistence|Entity Classes from Database.
2. Select JDBC Connection by clicking on combo box and select jdbc:derby://localhost:1527/sample[app on APP].
3. Enter package name, for example org.client.persistence and click on Next.
4. Select some tables, for example CUSTOMER,ORDERS from left box and click on Add.
4. Click on Finish.
RESULT: Check that apropriate entity classes has been created.
Teardown:



Test suite 4: Application Client and Web Services



Purpose: Testing Web Service Client in Application Client.
Setup: This part is sufficiently described in JAX-WS Web Service Client test specification.




Test suite 5: Additional features of Application Client



Purpose: Testing another features of Application Client.
Setup: Add Sun Java System Application Server 8.2 and Glassfish in Runtime tab in before you start.
Test next features in standalone application client - create new Application Client by invoking New Project|Enterprise|J2EE Application Client
and also in application client in EAR - create new Application Client by invoking New Project|Enterprise|Enterprise Application, and then checking
Create Application Client Module in wizard.
.




#Test caseDescription
1Call Enterprise Bean in java class
1. 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.
RESULT: New lookup method should be added to class in editor.
2Use database
1. 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|Use Database.
4. Click OK in next dialog.
RESULT: New getDatabase method should be added to class in editor.
1Shortcut to setup Application Client's libraries
1. Rightclick on Libraries in the Projects tab.
2. Invoke Properties.
3. Click Cancel.
4. Rightclick on Test Libraries in the Projects tab.
5. Invoke Properties.
6. Click Cancel.
RESULT: In both cases should be opened Project Properties window. In the first case should be first (Compile) folder active and in the second the third (Compile Tests) one.
Teardown:




Generated: Thu Nov 25 9:24:12 CEST 2008

Project Features

About this Project

QA was started in November 2009, is owned by Jiří Kovalský, and has 97 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close