TS 69 WebProject

Web project Test Specification

Author: Jindrich Sedek
Version: 0.9
Last update: 06/25/2008
Introduction:
Comments:

Contents


Test suite: Creating web project

Purpose:
Setup: JBoss 4.0.X, JBoss 5, Tomcat 5.5.X, Glassfish v2 installed and registered in IDE.
Click File -> New Project -> Web -> Web Application -> Next
Invalid chars are */\|:(){}[[ | ]] (on some systems they are ok, but not on Windows)

  1. Name and Locations panel
    1. Check prefilled default values in panels fieldsEXPECTED RESULT: No warning or errors appear.
    2. Invalid Project Name:Insert anywhere illegal char in this textfieldEXPECTED RESULT: Red warning appears.
    3. Invalid Project Location:Insert anywhere illegal char or invalid path in this textfieldEXPECTED RESULT: Red warning appears.
    4. Click Use Dedicated folder for Storing LibrariesEXPECTED RESULT: Textfiled is accessible with text '.\lib'
    5. Invalid Use Dedicated folder for Storing Libraries:Insert anywhere illegal char or invalid pathEXPECTED RESULT: Red warning appears.
    6. Restore fields in panel to default values
    7. Click Next
  2. Server and Settings panel
    1. Choose different servers in Server comboboxEXPECTED RESULT: Java EE Version availale is 1.4/1.3 for JBoss 4.0.X/Tomcat 5.5.X and JEE5/1.4/1.3 for Glassfish v2, JBoss 5 and Tomcat 6.0X
    2. Test switching between J2EE VersionEXPECTED RESULT: J2EE version is selected accordingly. If 1.4 version is selected, recommendation message about source level is shown and new checkbox for setting source level to 1.4 appears
    3. Change context path from default
    4. Click Next
  3. Frameworks panel
    1. Framework List should contain these frameworks (from the top):
    • Visual Web JavaServer Faces
    • Spring Web MVC 2.5
    • JavaServer Faces
    • Struts 1.2.9
    1. Check Visual Web JavaServer Faces framework checkbox
    • New fields are shown:
    • * Default Java Package (same as project name)
    • * JSF Servlet Name (not editable)
    • * Servlet URL Mapping (/faces/*)
    • * Checkbox Validate XML (checked)
    • * Checkbox Verify Objects
    • Invalid Servlet URL Mapping:Insert anywhere illegal charEXPECTED RESULT: Red warning appears and Next/Finish is disabled.
    • Invalid package name:Insert anywhere illegal charEXPECTED RESULT: Red warning appears and Next/Finish is disabled.
    1. Check Spring Web MVC 2.5
    • New Configuration tab is shown
    • * Dispatcher Name (dispatcher)
    • * Dispatcher Mapping (*.htm)
    • New Libraries tab is shown
    • * Checkbox Include JSTL
    • Invalid Dispatcher Name:Insert anywhere illegal char
    • Invalid Dispatcher Mapping:Insert anywhere illegal charEXPECTED RESULT: Red warning appears and Next/Finish is disabled.
    1. Check JavaServer Faces framework
    • New Configuration tab is shown
    • * JSF Servlet Name (not editable)
    • * Servlet URL Mapping (/faces/*)
    • * Checkbox Validate XML (checked)
    • * Checkbox Verify Objects
    • New Libraries tab is shown
    • * Registered Libraries
    • * Create New Library
    • * Do not append any library (selected)
    • Invalid Servlet URL Mapping:Insert anywhere illegal charEXPECTED RESULT: Red warning appears and Next/Finish is disabled.
    1. Check Struts 1.2.9
    • New fields are shown:
    • * Action Servlet Name (not editable)
    • * Action URL Mapping (/do/*)
    • * Application Resource (com.myapp.struts.ApplicationResource)
    • * Checkbox Add Struts TLDs
    • Invalid Action URL Pattern:Insert anywhere illegal char
    • Invalid Application Resource:Insert anywhere illegal charEXPECTED RESULT: Red warning appears and Next/Finish is disabled.
    1. Click FinishEXPECTED RESULT: New web project is successfuly created and no wearning/errors appears.


Test suite: Testing basic actions on project

Purpose:
Setup: Opened web project. Opened 1 another project, and set as Main project

  1. Simple actions

All action are invoked by right-click on project

    1. Invoke BuildEXPECTED RESULTS: Project is successfuly built.
    2. Invoke Build&CleanEXPECTED RESULTS: Project is successfuly built.
    3. Invoke CleanEXPECTED RESULTS: Project is successfuly built.
    4. Invoke VerifyEXPECTED RESULTS: Project is successfuly verified.
    5. Invoke Set as Main ProjectEXPECTED RESULTS: Project is set as main project.
  1. Complex actions I
    1. Generate Javadoc
      1. Invoke New Servlet wizard -> Finish
      2. Invoke Generate JavadocEXPECTED RESULTS: Project successfuly generates javadoc. Default web browser window is opened and javadoc page shown.
      3. Invoke Tools -> Set Servlet Execution URI on NewServlet.java. Click OK.EXPECTED RESULTS: No exception is thrown.
    2. Invoke RunEXPECTED RESULTS: Project is successfuly built and deployed. Default web browser window is opened and index.jsp page is shown.
    3. Invoke Undeploy & DeployEXPECTED RESULTS: Project is successfuly built, undeployed and deployed.
    4. Invoke Compile on Save
    • Change something in Index.jsp , for example add one space behind Hello World!
    • Click on SaveEXPECTED RESULTS: Project is successfuly saved, but also compiled and redeployed,as you can see in Output window.
    1. Disable Compile on Save
    • Open Project Properties.
    • Go to Run tab and uncheck Deploy on Change.
    • Close,change something in Index.jsp , for example add one more space behind Hello World!
    • Click on SaveEXPECTED RESULTS: Project is successfuly saved, but compile is not invoked this time.
    1. Debug
      1. Set breakpoint in index.jsp
      2. Invoke Debug and wait till debugger stops on breakpoint in jsp.EXPECTED RESULTS: Project is successfuly built and deployed. Default web browser window is opened, but page is still loading.
      3. Click Continue on Main bar (or by F5)EXPECTED RESULTS: Default web browser window finishes loading and index.jsp page is shown.
  1. Complex actions II
    1. Invoke Rename
    • Check "Also Rename Project Folder"
    • Change project name to another, with illegal charsEXPECTED RESULT: Red warning appears and Rename is disabled.
    • Change project name to another, valid one
    • Click RenameEXPECTED RESULT: Project is renamed, no errors appear. Project folder is renamed as well.
    1. Invoke Move
    • Change Project Location to another, with illegal charsEXPECTED RESULT: Red warning appears and Move is disabled.
    • Change Project Location to another, valid one
    • Click MoveEXPECTED RESULT: Project is moved, no errors appear.
    1. Invoke Copy
    • Change Project Name to another, with illegal charsEXPECTED RESULT: Red warning appears and Move is disabled.
    • Change Project Name to another, valid one
    • Change Project Location to another, with illegal charsEXPECTED RESULT: Red warning appears and Move is disabled.
    • Change Project Location to another, valid one
    • Click CopyEXPECTED RESULT: Project is copied, no errors appear. Both the original and new project are the same except for their names.
    1. Invoke CloseEXPECTED RESULT: Project is closed, no errors appear.
    2. Reopen project.
    3. Invoke Delete
    • Check "Also Delete Sources.."
    • Click DeleteEXPECTED RESULT: Project is deleted, no errors appear.


Test suite: CDI support

  1. Enabled CDI support
    1. Start new project wizard
    2. Choose Web Project and press Next button
    3. Select Glassfish V3 server and set Java EE 6 Web version
    4. Verify that "Context and Dependency Injection" check box is enabled
    5. Finish the wizard beans.xml file should be generated in WEB-INF directory and accessible in Configuration Files Node of the project.
    6. Open the beans.xml file and check that 'beans' root tag is generated together with xmlns attributes
    7. Verify that code completion works correctly in the file
  2. Disabled CDI support
    1. Start new project wizard
    2. Choose Web Project and press Next button
    3. Select Glassfish V3 server and set Java EE 6 Web version
    4. Disable "Context and Dependency Injection" check box
    5. Finish the wizard beans.xml file should NOT be generated
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