Author: Lukasz Grela
Version: 1.0
Last update: Tue Mar 28 18:25:14 CEST 2006
Introduction:
This test specification guides tester through test cases of JSF Support Functionality
Purpose: Tests functionality which make possible to create Web Project base upon JSF framework
Setup:
#
Test case
Creating a New Web Application with JSF Support Description
1
1.
Choose File > NewProject and selecting the Web Application template from the Web category. 2.
In the Frameworks page, choose jsf frameworks. 3.
Click finish
RESULT:
1. All action are done correctly
2. Web project should be created
3. Jsf librares and files welcomeJSF.jsp, faces-config.xml should exist.
Purpose: Test adding JSF Support
Setup: Create Web Project
#
Test case
Description
1
Add Jsf Support
1.Right click a standard web application project's node and choose Properties.
2.Click Frameworks and select Java Server Faces.
3.Click OK to confirm your selection and exit the Project Properties dialog box.
RESULT:
1. All actions are done correctly
2. Jsf Libraries, welcomeJSF.jsp and faces-config.xml are added to project.
Purpose: Test Wizard that creating JSF Managed Bean.
Setup: create web application with JSF support
#
Test case
Description
1
Creating Managed Bean
1.
Right click on a web application. 2.
Choose New > File/Folder and selecting JSF Managed Bean from the Web category. 3.
Specifie the JSF managed bean class name. 4.
Specifies a folder to house the JSF managed bean. 5.
Specifies a package within the location to house the JSF managed bean. 6.
Specify the scope of Managed Bean.
RESULT:
All actions are done correctly.
Xml document that should be inserted looks like:
<managed-bean>
<managed-bean-name>bean_name</managed-bean-name>
<managed-bean-class>bean_class</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
2
Creating Managed Bean
1.
Open faces-config.xml 2.
Right click in editor, choose Add Managed Bean option from context menu the dialog window should appear. 3.
Specify Bean Name, Bean Class, Scope
RESULT:
All actions are done correctly.
Xml document that should be inserted looks like:
<managed-bean>
<managed-bean-name>bean_name</managed-bean-name>
<managed-bean-class>bean_class</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
Purpose: Test that functionality that make possible add navigation rule and navigation case works properly
Setup: create web application with JSF support
#
Test case
Description
1
Adding Navigation Rule to faces-config.xml
1.
Open faces-config.xml
Right-click in editor. 2.
Using context menu choose Add Navigation Rule - dialog should appear 3.
Specifiy Rule From View - it could be any jsp page in web project and Click OK 4.
Xml representing Navigation Rule is added to faces-config.xml
RESULT:
All actions are done correctly.
XML ducument that should be inserted looks like:
<navigation-rule>
<description>
</description>
<from-view-id>/rule_from_view.jsp</from-view-id>
</navigation-rule>
2
Adding Navigation Case to faces-config.xml
1.
Open faces-config.xml 2.
Add Navigation Rule - previous test case 3.
Right-click in editor,using context menu choose Add Navigation Case - dialog should appear 4.
Specifiy From View,there should be one entry because you already add Navigation Rule 5.
Specify also From Action, From Outcome, To View 6.
Clock OK 7.
Check that Xml document representing navigation case has been added to faces-config.xml and is nested beetwen <navigation-rule> tags
RESULT:
All actions are done correctly.
Xml document that should be inserted looks like:
<navigation-case>
<from-action>from_action</from-action>
<from-outcome>from_outcome</from-outcome>
<to-view-id>/to_view.jsp</to-view-id>
</navigation-case>
2
Checking that Navigation Case expose desired functionality
1.
Open faces-config.xml
Remove navigation rule from faces-cofig.xml if already exist 2.
Click Right in editor pane, and choose from context menu "Add Navigation Case", dialog should appear 3.
There should be no entry in From View (because Navigation Rule does't exist). 4.
The Ok button should be disable - there is no possibility to create navigation case without navigation rule.