Difference between revisions of "JSF Tools Smoke Tests"

From Eclipsepedia

Jump to: navigation, search
(Create page)
 
m (Changed Autocomplete to Content-Assist. Other minor edits)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
'''NOTE: Draft version, subject to change'''
 
'''Reference'''
 
'''Reference'''
 
* [http://127.0.0.1:50460/help/topic/org.eclipse.jst.jsf.doc.user/html/gettingstarted/tutorial/JSFTools_tutorial Smoke tests based on the JSF Tutorial in the Eclipse help]
 
* [http://127.0.0.1:50460/help/topic/org.eclipse.jst.jsf.doc.user/html/gettingstarted/tutorial/JSFTools_tutorial Smoke tests based on the JSF Tutorial in the Eclipse help]
Line 33: Line 34:
 
**All JARs from JSF libraries checked for deployment should listed in the table.
 
**All JARs from JSF libraries checked for deployment should listed in the table.
  
'''JSF_006 Project Creation: Java Build Path'''
+
'''JSF_006-Project Creation: Java Build Path'''
Steps     1. Project properties -> Java Build Path
+
*Steps
Criteria     All JARs from selected JSF libraries should be listed in path.
+
*#Project properties -> Java Build Path
JSF_007 JSF Library Reference Property Page: J2EE Module Dependencies update
+
*Criteria
Steps     1. Project properties -> JSF Library Reference.
+
**All JARs from selected JSF libraries should be listed in path.
    2. Uncheck/check a selected JSF libraries for deployment.
+
 
Criteria     JARs from changed JSF library should be added/removed from J2EE Module Dependencies.
+
'''JSF_007-JSF Library Reference Property Page: J2EE Module Dependencies update'''
JSF_008 JSF Library Reference Property Page: Java Build Path update
+
*Steps
Steps     1. Project properties -> JSF Library Reference.
+
*#Project properties -> JSF Library Reference.
    2. Add/Remove a selected JSF component library.
+
*#Uncheck/check a selected JSF libraries for deployment.
Criteria     JARs from the added/removed JSF library should be added/removed from build path.
+
*Criteria
JSF_009 JSF Facet installation + JSF library reference
+
JARs from changed JSF library should be added/removed from J2EE Module Dependencies.
Steps     1. Create a web application w/o JSF facet installed during project creation.
+
 
    2. Project properties->Project Facets -> Add/Remove Project Facet.
+
'''JSF_008 JSF Library Reference Property Page: Java Build Path update'''
  JSF library references are added.  Module dependencies and build path are updated accordingly.
+
*Steps
JSF_010 JSF Facet installation/un-installation
+
*#Project properties -> JSF Library Reference.
Steps     1. Create a web application w JSF facet installed during project creation.
+
*#Add/Remove a selected JSF component library.
    2. Uninstall JSF facet.  Project properties->Project Facets -> Add/Remove Project Facet.
+
*Criteria
Criteria "    A JSF facet is uninstalled.  But, JSF library reference remain unchanged.  Designed behavior."
+
*JARs from the added/removed JSF library should be added/removed from build path.
JSF_011 Syntax Checking
+
 
Steps     1. Follow steps in tutorial document.
+
'''JSF_009 JSF Facet installation + JSF library reference'''
Criteria     Syntax checking performed as suggested in tutorial document.
+
*Steps
JSF_012 Semantic Checking
+
*#Create a web application w/o JSF facet installed during project creation.
Steps     1. Follow steps in tutorial document.
+
*#Project properties->Project Facets -> Add/Remove Project Facet.
Criteria     Semantic checking performed as suggested in tutorial document.
+
Criteria
JSF_013 Quick Fix
+
JSF library references are added.  Module dependencies and build path are updated accordingly.
Steps     1. Follow steps in tutorial document.
+
 
Criteria     Quick fix performed as suggested in tutorial document.
+
'''JSF_010 JSF Facet installation/un-installation'''
JSF_014 Content Assist
+
*Steps
Steps     1. Follow steps in tutorial document.
+
*#Create a web application w JSF facet installed during project creation.
Criteria     Content assist performed as suggested in tutorial document.
+
*#Uninstall JSF facet.  Project properties->Project Facets -> Add/Remove Project Facet.
JSF_015 FacesConfig Editor: Add Managed Bean
+
*Criteria
Steps     1. Follow steps in tutorial document.
+
*#A JSF facet is uninstalled.  But, JSF library reference remain unchanged.  Designed behavior.
Criteria     Managed bean is added successfully.
+
 
JSF_016 FacesConfig Editor: Add JSP pages in Navigation rule tab.
+
'''JSF_011 Syntax Checking'''
Steps     1. Follow steps in tutorial document.
+
*Steps
Criteria     JSP pages are added successfully.
+
*#Follow steps in tutorial document.
JSF_017 FacesConfig Editor: Connect JSP pages in Navigation rule tab.
+
*Criteria
Steps     1. Follow steps in tutorial document.
+
*#Syntax checking performed as suggested in tutorial document.
Criteria     JSP pages are connected successfully.
+
 
JSF_018 FacesConfig Editor: Link properties set up in Navigation rule tab.
+
'''JSF_012 Semantic Checking'''
Steps     1. Follow steps in tutorial document.
+
*Steps
Criteria     Link properties are set up properly as suggested in tutorial document.
+
*#Follow steps in tutorial document.
JSF_019 Runtime: Module dependencies are deployed
+
*Criteria
Steps     1. Deploy a JSF web application to a container.
+
*#Semantic checking performed as suggested in tutorial document.
Criteria     Check if JARs are deployed with the application
+
JSF_020 Runtime: Login page displayed
+
'''JSF_013 Quick Fix'''
Steps "    1. Right-click on login.jsp page and perform ""Run on Server""."
+
*Steps
Criteria     Web application should be deployed and login page should display properly.
+
*#Follow steps in tutorial document.
JSF_021 "Runtime: Page navigation, login button clicked."
+
*Criteria
Steps     1. Enter a value for name and click Login.
+
*#Quick fix performed as suggested in tutorial document.
Criteria     Navigate to a welcomed page with name populated from login page.
+
 
 +
'''JSF_014 Content Assist'''
 +
*Steps
 +
*#Follow steps in tutorial document.
 +
*Criteria
 +
*#Content assist performed as suggested in tutorial document.
 +
 
 +
'''JSF_015 FacesConfig Editor: Add Managed Bean'''
 +
*Steps
 +
*#Follow steps in tutorial document.
 +
*Criteria
 +
*#Managed bean is added successfully.
 +
 
 +
'''JSF_016 FacesConfig Editor: Add JSP pages in Navigation rule tab.'''
 +
*Steps
 +
Follow steps in tutorial document.
 +
*Criteria
 +
*#JSP pages are added successfully.
 +
 
 +
'''JSF_017 FacesConfig Editor: Connect JSP pages in Navigation rule tab.'''
 +
*Steps
 +
*#Follow steps in tutorial document.
 +
*Criteria
 +
*#JSP pages are connected successfully.
 +
 
 +
'''JSF_018 FacesConfig Editor: Link properties set up in Navigation rule tab.'''
 +
*Steps
 +
*#Follow steps in tutorial document.
 +
*Criteria
 +
*#Link properties are set up properly as suggested in tutorial document.
 +
 
 +
'''JSF_019 Runtime: Module dependencies are deployed'''
 +
*Steps
 +
Deploy a JSF web application to a container.
 +
*Criteria
 +
*#Check if JARs are deployed with the application
 +
 
 +
'''JSF_020 Runtime: Login page displayed'''
 +
*Steps
 +
*#Right-click on login.jsp page and perform ""Run on Server""."
 +
*Criteria
 +
*#Web application should be deployed and login page should display properly.
 +
 
 +
'''JSF_021 Runtime: Page navigation.'''
 +
*Steps
 +
*#Enter a value for name and click Login.
 +
*Criteria
 +
*#Navigate to a welcomed page with name populated from login page.
 +
 
 +
'''JSF_022 Documentation'''
 +
*Steps
 +
*#Open the Eclipse Help, Help->HelpContents
 +
*#Check the  links in the JavaServerFaces Tooling User Guide and JavaServerFaces Tooling Developer Guide
 +
**#JavaServerFaces Tooling Developer Guide->Programmer's guide->JSF Expression Language->(All the links)
 +
**#JavaServerFaces Tooling Developer Guide->Tutorial->Implementing a New Tag based EL variable contributor for JSP
 +
*Criteria
 +
*#The pages should open successfully.
 +
 
 +
<br/>
 +
 
 +
=='''<font color="dimgray">Test Case JSF_023:</font> &nbsp; <font color="maroon">Project Creation: Loading Resource Bundles</font>'''==
 +
 
 +
=== Steps ===
 +
 
 +
<br/>
 +
 
 +
* '''<font color="maroon">Add a Properties File</font>'''
 +
 
 +
<br />
 +
 
 +
: As outlined in the [http://www.eclipse.org/webtools/jsf/docs/tutorial/JSFTools_1_0_tutorial.html tutorial], move the static strings that you have used in the JSP file to a [http://java.sun.com/javase/6/docs/api/java/util/ResourceBundle.html resource bundle]. To do this, add a file called say '''messages.properties''' in the folder '''com.tutorial''' for example. Define the properties as shown below and save the file.
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle1.png]]
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle3.png|frame|You can drag-and-drop the tag from the '''JSF Core''' section of the Palette View]] <br/>
 +
 
 +
 
 +
* '''<font color="maroon">Add the loadBundle Tag</font>'''
 +
 
 +
<br />
 +
 
 +
: Add the JSF tag, '''loadBundle''' as shown below.
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle2.png]]
 +
 
 +
<br/>
 +
 
 +
: Instead of typing it in, you may also drag-and-drop the '''loadBundle''' tag from the '''JSF Core''' section of the Palette View, as shown in the image on the right. If you choose to do it this way, double-click on the '''loadBundle''' widget that appears on the page and enter the '''basename''' and '''var''' attributes.
 +
 
 +
<br/>
 +
 
 +
* '''<font color="maroon">Test whether Content-Assist Works</font>'''
 +
 
 +
<br/>
 +
 
 +
: Delete a hard-coded string from a value attribute in a JSF tag and replace it with '''<tt>"#{}"</tt>'''
 +
 
 +
<br/>
 +
 
 +
: Now place the cursor inside the braces, and press Ctrl+Space (or equivalent). You should see a popup with a list that includes the '''msg''' variable defined in the '''loadBundle''' tag. Select it.
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle4.png]]
 +
 
 +
<br/>
 +
 
 +
: Enter a dot after msg and and hit '''Ctrl+Space''' (or equivalent). You should see a pop-up with a list of properties defined in the '''messages.properties''' file. Select the property '''name'''
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle5.png]]
 +
 
 +
<br/>
 +
 
 +
* '''<font color="maroon">Test the Preview</font>'''
 +
 
 +
<br/>
 +
 
 +
: Click on the Preview tab on the editor
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle6.png]]
 +
 
 +
<br/>
 +
 
 +
: Ensure that you can see all the output labels replaced with their appropriate values from the properties resource bundle.
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle7.png]]
 +
 
 +
<br/>
 +
 
 +
* '''<font color="maroon">Test the Rendered Output on the Server</font>'''
 +
 
 +
<br/>
 +
 
 +
: Right click on your JSP file and select "'''Run on Server'''". Test whether the property values are rendered correctly.
 +
 
 +
<br/>
 +
 
 +
: [[Image:JsfResourceBundle7.png]]
 +
 
 +
<br/>
 +
 
 +
==== Criteria ====
 +
 
 +
Ensure that the following criteria are met:
 +
 
 +
* '''<font color="green">loadBundle.</font>''' You should be able to add a loadBundle tag successfully.
 +
* '''<font color="green">Content-Assist.</font>''' All the properties of the resource bundle should be displayed correctly when Ctrl+Spacebar (or equivalent) is pressed.
 +
* '''<font color="green">Preview.</font>''' The preview should display correctly (with appropriate values from the properties file)
 +
* '''<font color="green">Run on Server.</font>''' When run on the server, the rendered JSP page should display correctly.
 +
 
 +
<br/>
 +
 
 +
 
 +
[[JSF Tools Test Plans| Back to Test Plans]]
 +
[[Category:Eclipse Web Tools Platform Project]]

Latest revision as of 21:57, 27 March 2008

NOTE: Draft version, subject to change Reference

Tests

JSF_001-Create JSF Library in preference page

  • Steps
    1. Window -> Preferences…->Web and XML -> JSF Libraries
  • Criteria
    • JSF Library is created successfully.

JSF_002-JSF Project Facets Wizard Page

  • Steps
    1. Select ""JavaServer Faces v1.1 Project"" preset in Project Facet Wizard page.
  • Criteria
    • Can select JavaServer Faces preset and move to next page.

JSF_003-JSF Capabilities: JSF Library Wizard Page

  • Steps
    1. Check JSF Capabilities wizard on libraries selection and check for deployment.
  • Criteria
    • Can configure selection of JSF libraries and check for deployment and finish project creation.

JSF_004-Project Creation: JSF Library Reference Property Page

  • Steps
    1. Project properties -> JSF Library Reference.
  • Criteria
    • See the same configuration as configured in JSF_003.

JSF_005 Project Creation: J2EE Module Dependencies

  • Steps
    1. Project properties --> J2EE Module Dependencies
  • Criteria
    • All JARs from JSF libraries checked for deployment should listed in the table.

JSF_006-Project Creation: Java Build Path

  • Steps
    1. Project properties -> Java Build Path
  • Criteria
    • All JARs from selected JSF libraries should be listed in path.

JSF_007-JSF Library Reference Property Page: J2EE Module Dependencies update

  • Steps
    1. Project properties -> JSF Library Reference.
    2. Uncheck/check a selected JSF libraries for deployment.
  • Criteria

JARs from changed JSF library should be added/removed from J2EE Module Dependencies.

JSF_008 JSF Library Reference Property Page: Java Build Path update

  • Steps
    1. Project properties -> JSF Library Reference.
    2. Add/Remove a selected JSF component library.
  • Criteria
  • JARs from the added/removed JSF library should be added/removed from build path.

JSF_009 JSF Facet installation + JSF library reference

  • Steps
    1. Create a web application w/o JSF facet installed during project creation.
    2. Project properties->Project Facets -> Add/Remove Project Facet.

Criteria JSF library references are added. Module dependencies and build path are updated accordingly.

JSF_010 JSF Facet installation/un-installation

  • Steps
    1. Create a web application w JSF facet installed during project creation.
    2. Uninstall JSF facet. Project properties->Project Facets -> Add/Remove Project Facet.
  • Criteria
    1. A JSF facet is uninstalled. But, JSF library reference remain unchanged. Designed behavior.

JSF_011 Syntax Checking

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. Syntax checking performed as suggested in tutorial document.

JSF_012 Semantic Checking

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. Semantic checking performed as suggested in tutorial document.

JSF_013 Quick Fix

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. Quick fix performed as suggested in tutorial document.

JSF_014 Content Assist

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. Content assist performed as suggested in tutorial document.

JSF_015 FacesConfig Editor: Add Managed Bean

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. Managed bean is added successfully.

JSF_016 FacesConfig Editor: Add JSP pages in Navigation rule tab.

  • Steps

Follow steps in tutorial document.

  • Criteria
    1. JSP pages are added successfully.

JSF_017 FacesConfig Editor: Connect JSP pages in Navigation rule tab.

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. JSP pages are connected successfully.

JSF_018 FacesConfig Editor: Link properties set up in Navigation rule tab.

  • Steps
    1. Follow steps in tutorial document.
  • Criteria
    1. Link properties are set up properly as suggested in tutorial document.

JSF_019 Runtime: Module dependencies are deployed

  • Steps

Deploy a JSF web application to a container.

  • Criteria
    1. Check if JARs are deployed with the application

JSF_020 Runtime: Login page displayed

  • Steps
    1. Right-click on login.jsp page and perform ""Run on Server""."
  • Criteria
    1. Web application should be deployed and login page should display properly.

JSF_021 Runtime: Page navigation.

  • Steps
    1. Enter a value for name and click Login.
  • Criteria
    1. Navigate to a welcomed page with name populated from login page.

JSF_022 Documentation

  • Steps
    1. Open the Eclipse Help, Help->HelpContents
    2. Check the links in the JavaServerFaces Tooling User Guide and JavaServerFaces Tooling Developer Guide
      1. JavaServerFaces Tooling Developer Guide->Programmer's guide->JSF Expression Language->(All the links)
      2. JavaServerFaces Tooling Developer Guide->Tutorial->Implementing a New Tag based EL variable contributor for JSP
  • Criteria
    1. The pages should open successfully.


[edit] Test Case JSF_023:   Project Creation: Loading Resource Bundles

[edit] Steps


  • Add a Properties File


As outlined in the tutorial, move the static strings that you have used in the JSP file to a resource bundle. To do this, add a file called say messages.properties in the folder com.tutorial for example. Define the properties as shown below and save the file.


JsfResourceBundle1.png


You can drag-and-drop the tag from the JSF Core section of the Palette View


  • Add the loadBundle Tag


Add the JSF tag, loadBundle as shown below.


JsfResourceBundle2.png


Instead of typing it in, you may also drag-and-drop the loadBundle tag from the JSF Core section of the Palette View, as shown in the image on the right. If you choose to do it this way, double-click on the loadBundle widget that appears on the page and enter the basename and var attributes.


  • Test whether Content-Assist Works


Delete a hard-coded string from a value attribute in a JSF tag and replace it with "#{}"


Now place the cursor inside the braces, and press Ctrl+Space (or equivalent). You should see a popup with a list that includes the msg variable defined in the loadBundle tag. Select it.


JsfResourceBundle4.png


Enter a dot after msg and and hit Ctrl+Space (or equivalent). You should see a pop-up with a list of properties defined in the messages.properties file. Select the property name


JsfResourceBundle5.png


  • Test the Preview


Click on the Preview tab on the editor


JsfResourceBundle6.png


Ensure that you can see all the output labels replaced with their appropriate values from the properties resource bundle.


JsfResourceBundle7.png


  • Test the Rendered Output on the Server


Right click on your JSP file and select "Run on Server". Test whether the property values are rendered correctly.


JsfResourceBundle7.png


[edit] Criteria

Ensure that the following criteria are met:

  • loadBundle. You should be able to add a loadBundle tag successfully.
  • Content-Assist. All the properties of the resource bundle should be displayed correctly when Ctrl+Spacebar (or equivalent) is pressed.
  • Preview. The preview should display correctly (with appropriate values from the properties file)
  • Run on Server. When run on the server, the rendered JSP page should display correctly.



Back to Test Plans