Sun Microsystems / Rave QE

Web Services Consumption Test Specification

Contents
Test Specification Identifier
       Features to be tested
       Approach Refinements
       Related documentation
       Test Identification
       Test Cases
Approvals
Revision History

Test Specification identifier
http://qa.netbeans.org/modules/webapps/promo-h/ws-consumption.html


(F) Features to be tested

Features that will be Implemented and Tested for LongFin Release

  • Testing Interface for Web Services
  • Adding WebService to Services Tab
  • Viewing a Web Service WSDL file
  • Adding Web Service to Projects
  • Binding WebService with components via DataProviders
  • Using Web Service from Java code

(A) Approach refinements

   This exercise would comprise of :
  • Identifying a list of web services that can be used by this testing
  • Identifying features that need to be tested/verified by this testing
  • Identifying difference between web services for J2EE 1.4 (JAX-RPC) and for Java 5 EE (JAX-WS)

  • (D) Related documentation.

    (T) Test Identification (Test Areas)


    Test Cases Detail/Procedure

    Add W/S using URL

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/ Notes

    ws_URL_001

    Add new correct W/S (no proxy)

    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Click Add button


    1. Corresponding node for W/S appears in the Services window

    Should be used direct Internet connection or W/S located in the local network

     

    ws_URL_002

    Add new correct W/S (proxy)

    1. Services->Web Services->Add Web Service

    2. Click "Set Proxy..." and enter correct proxy and port values

    3. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    4. Click Add button

    1. Corresponding node for W/S appears in the Services window

    Needs valid proxy server in the local network

     

    ws_URL_003

    Incorrect URL (no proxy)

    1. Services->Web Services->Add Web Service

    2. Enter not valid URL in the input text field with "WSDL URL" label (for example http://bla.bla.com/bla.wsdl)

    3. Click Add button

    1. Information dialog appears with message that specified W/S can't be added (Server returned HTTP response code: 504 for URL)

     

     

    ws_URL_004

    Incorrect URL (proxy)

    1. Services->Web Services->Add Web Service

    2. Click "Set Proxy..." and enter correct proxy and port values

    3. Enter not valid URL in the input text field with "WSDL URL" label (for example http://bla.bla.com/bla.wsdl)

    4. Click Add button

    1. Information dialog appears with message that specified W/S can't be added (Server returned HTTP response code: 504 for URL)

     

     

    ws_URL_005

    Cancel action

    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Click Cancel button

    1. No new node appears in the Services window

     

     

    ws_URL_006

    Package validation (valid package name)

    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Click 'Add' button

    4. Delete added W/S
    5. Services->Web Services->Add Web Service

    6. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    7. In "Package Name" input text field type package name different from default
    8. Click 'Add' button

    1. After step 3) new node for W/S appears in the Services. Look at sources: W/S should have default package ("websvc")

    2. After step 8) new node for W/S appears in the Services. Look at sources: W/S should have specified package (the package you can verify here for example: c:\Documents and Settings\Administrator\.netbeans\dev\config\WebServices\uszip-asmx\jaxws\src\NameOfPackageWS\)

     

     

    ws_URL_007 Package validation (invalid package name)
    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. In "Package Name" input text field type invalid package name (for example beginning form digit: "1websvc")
    4. Click 'Add' button

    1. Error message that package name is invalid should appear


    ws_URL_008 Package validation (empty package name)
    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Empty "Package Name" input text field
    4. Click 'Add' button

    1. Error message that package name is invalid should appear


    ws_URL_009

    Help system

    1. Services->Web Services->Add Web Service

    2. Click Help button

    1. Help window 'Add Web Service Dialog Box' will appear

     

     

    ws_URL_010

    Help system using shortcut

    1. Services->Web Services->Add Web Service

    2. Press F1 key

    1. Help window 'Add Web Service Dialog Box' will appear

     

     

    ws_URL_011

    Add already existing W/S

    1. Add any W/S using correct URL

    2. Check that it appears under Web Services node

    3. Try to add a new W/S using the same URL

    1. Information dialog with message that such W/S exists appears

     

     


    Add W/S using local WSDL file

    Setup (e): Go to the some URL for getting WDSL file (for example: http://www.webservicex.net/whois.asmx?wsdl). View Page Source in browser and then save page as ".wdsl" file.

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_loc_001

    Add W/S using valid WSDL file

    1. Services->Web Services->Add Web Service

    2. Choose Local File radio button

    3. Click Browse button and select correct WSDL file

    4. Click Open button

    5. Click Add button

    1. Corresponding node for W/S appears in the Services window

    Should have a correct WSDL file

     

    ws_loc_002

    Use incorrect or broken WSDL file

    1. Services->Web Services->Add Web Service

    2. Choose Local File radio button

    3. Click Browse button and select any but not WSDL file

    4. Click Open button

    5. Click Add button
    1. Information message with message that WSDL model cannot be generated appears

    Should have a incorrect WSDL file

     

    ws_loc_003

    Use not existing file

    1. Services->Web Services->Add Web Service

    2. Choose Local File radio button

    3. Type anything in the Local File input text field

    4. Click Add button

    1. Information message with message that path is wrong appears

     

     

    ws_loc_004

    Cancel action

    1. Services->Web Services->Add Web Service

    2. Choose Local File radio button

    3. Click Browse button and select correct WSDL file

    4. Click Open button
    5. Click Cancel button

    1. No new node appears in the Services window

     

     

    ws_loc_005

    Add another instance of the same W/S

    1. Add any W/S using correct local file

    2. Check that it appears under Web Services node

    3. Try to add a new W/S using the same local file

    1. Information dialog with message that such W/S exists appears

     



     Add special types of Web Services

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_types_001

    Web Service with two ports

    1. Services->Web Services->Add Web Service

    2. Enter valid URL for W/S with two ports in the input text field with "WSDL URL" label (for example: http://www.webservicex.net/BibleWebservice.asmx?wsdl)

    3. Push 'Add' button

    1. New node appears in the Services. It have two subnodes and both of them have their own method leaves

     

     

    ws_types_003

    Web Service with the error in the definition

    1. Services->Web Services->Add Web Service

    2. Enter valid URL for W/S with error in definition in the input text field with "WSDL URL" label

    3. Push 'Add' button

    1. Information message with message that WSDL model cannot be generated appears

     

     


    Other operations with W/S

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_oo_01
    Update W/S with URL
    1. If Web Service proxy is created from an URL , then fetch the new WSDL from the URL
    1. Once the updated WSDL is obtained, remove the old proxy client jar and replace it with the new proxy client jar. Also the corresponding metadata should be updated and the UI should reflect the changes in Web Service.


    ws_oo_02 Update W/S with local WSDL file
    1. For a Local file WSDL, popup a dialog to get a location for new WSDL
    1. Once the updated WSDL is obtained, remove the old proxy client jar and replace it with the new proxy client jar. Also the corresponding metadata should be updated and the UI should reflect the changes in Web Service.


    ws_oo_03

    Rename Action

    1. Rightclick Group nodes, Web Service nodes, Leaf nodes
    1. Rename should be possible only on Group node

    2. Rename context menu item should not be present on other nodes like Web Service Node, Leaf nodes

     

     

    ws_oo_04

    Delete W/S

    1. Select W/S in the Services window

    2. In the popup menu choose Delete

    1. Corresponding node disappears from the Services

     

     

    ws_oo_05

    Delete Menu Action visiblity

    1. Rightclick Group nodes, Web Service nodes, Leaf nodes
    1. Delete item should not be present on leaf nodes, Web Service Module Node

     

     

    ws_oo_06

    Delete multiple W/S

    1. Select multiple W/S in the Services window

    2. In the popup menu choose Delete

    1. Corresponding nodes disappears from the Services



    ws_oo_07

    Popup on multiselected objects

    1. Select some W/S and some Groups using Ctrl/Shift and mouse and click for popup
    1. No popup menu appears




    Operations with W/S methods

    Setup (e): 

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_met_001

    Test Method with simple result Execution

    1. No Internet connection should be available (wrong proxy setting
      behind a firewall)

    2. Explore Web Service to see method's nodes

    3. Rightclick method and select 'Test Method'

    4. Enter necessary values to parameters

    5. Push 'Submit'

    1. After step 3) 'Test Web Service Method' dialog appears

    2. After step 4) new value appears in the 'Results' list

    It's necessary to set a proxy setting in the Options if the machine behind a firewall

     

    ws_met_002

    Test Method with complex result Execution

    1. No Internet connection should be available (wrong proxy setting
      behind a firewall)

    2. Explore Web Service to see method's nodes

    3. Rightclick method and select 'Test Method'

    4. Enter necessary values to parameters

    5. Push 'Submit'

    1. After step 3) 'Test Web Service Method' dialog appears

    2. After step 5) new node appears in the 'Results' list . It should be possible to expand this node as the list of results with different types

    It's necessary to set a proxy setting in the Options if the machine behind a firewall

     

    ws_met_003

    Test Method with no internet connection

    1. No Internet connection should be available (wrong proxy setting
      behind a firewall)

    2. Explore Web Service to see method's nodes

    3. Rightclick method and select 'Test Method'

    4. Enter necessary values to parameters

    5. Push 'Submit'

    1. After step 3) 'Test Web Service Method' dialog appears

    2. After step 5) 'Exception' dialog should be visible.

     

     

    ws_met_004

    Help button

    1. No Internet connection should be available (wrong proxy setting
      behind a firewall)

    2. Explore Web Service to see method's nodes

    3. Rightclick method and select 'Test Method'

    4. Enter necessary values to parameters

    5. Push 'Help' button

    1. After step 5) Help window shoud appear with the corresponding topic.

     

     

    ws_met_005

    Help system using keyboard shortcut

    1. No Internet connection should be available (wrong proxy setting
      behind a firewall)

    2. Explore Web Service to see method's nodes

    3. Rightclick method and select 'Test Method'

    4. Enter necessary values to parameters

    5. Press F1 button

    1. After step 5) Help window shoud appear with the corresponding topic.

     

     


    Web Services Group

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    gr_001

    Create a new W/S group

    1. Services->Web Services->Create Group

    1. New Webservice Group added under Web Services node

     

     

    gr_002

    Rename W/S group

    1. Services->Web Services->Create Group

    2. Select New Webservice Group node and perform Rename... popup action

    3. Enter new name for W/S group

    4. Press OK

    1. W/S group node has a new name, all web services added before still exist under this node.

     

     

    gr_003

    Cancel Rename W/S group action

    1. Services->Web Services->Create Group

    2. Select New Webservice Group node and perform Rename... popup action

    3. Enter new name for W/S group

    4. Press Cancel

    1. Rename dialog disappears, node still have previous name

     

     

    gr_004

    Delete W/S group

    1. Servers->Web Services->Create Group

    2. Select New Webservice Group node and perform Delete popup action

    3. Press Ok

    1. 'New Webservice Group' node disappears, all web services added before to this group disappears too.

     

     

    gr_005

    Cancel Delete W/S group action

    1. Services->Web Services->Create Group

    2. Select New Webservice Group node and perform Delete popup action

    3. Press Cancel

    1. 'New Webservice Group' node still exists, all web services added before exist too.

     

     

    gr_006

    Add W/S to the group

    1. Services->Web Services->Create Group

    2. Select New Webservice Group node and perform Add Web Service action

    3. Perform steps from 'Add W/S to the Services' part to add W/S

    1. New W/S appears under group node

     

     

    gr_007

    Remove W/S from the group

    1. Services->Web Services->Create Group

    2. Select New Webservice Group node and perform Add Web Service action

    3. Perform steps from 'Add W/S to the Servers' part to add W/S

    4. Select new node and perform Delete action

    1. After step (3) new W/S appears under group node

    2. After step (4) this node disappears

     

     

    gr_008

    Delete multiple W/S groups

    1. Services->Web Services->Create Group

    2. Repeat step 1) multiple times
    3. Select all created groups and perform Delete popup action
    1. All selected groups should be deleted



    gr_009

    Move W/S from one group to another

     

    1. Services->Web Services->Create Group

    2. Select New Webservice Group node and perform Add Web Service action

    3. Perform steps from 'Add W/S to the Servers' part to add W/S

    4. Services->Web Services->Create Group

    5. DnD added W/S from one W/S group to another
    1.  W/S node should be moved

     



    View WSDL Feature Tests

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_view_wsdl_01

    Menu Pick Enabled WITHOUT Project Open

    1. Make sure all projects are closed
    2. Rightclick Services->Web Services->Add->W/S node
    1. The context menu should have “View WSDL” enabled.


     

     

    ws_view_wsdl_02

    Menu Pick Enabled WITH Project Open

    1. Make sure a project is open.
    2. Rightclick Services->Web Services->Add->W/S node


    1. The context menu should have “View WSDL” enabled.


     

     

    ws_view_wsdl_03

    Open Local WSDL File


    1. Services->Web Services->Add Web Service
    2. Choose “local file:” and hit the “browse” button
    3. Choose the local WSDL file
    4. Add the web service
    5. Rightclick Services->Web Services->W/S
    6. Choose “View WSDL”


    1. The contents of the appropriateWSDL file should be displayed.


     

     

    ws_view_wsdl_04

    Open Local WSDL File That Has Been Removed


    1. Services->Web Services->Add Web Service
    2. Choose Local File radio button

    3. Click Browse button and select any but not WSDL file

    4. Click Open button

    5. Click "Add" button
    6. Remove WSDL file
    7. Rightclick Services->Web Services->W/S
    8. Choose 'View WSDL'
    1. Proper error message should appear

     


    ws_view_wsdl_05

    Open Remote WSDL File


    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Click 'Add' button

    4. Rightclick Services->Web Services->W/S

    5. Choose 'View WSDL'


    1. The contents of the “http://www.webservicemart.com/uszip.asmx?WSDL” should be displayed.

     

     

    ws_view_wsdl_06

    Open Remote WSDL File Without Setting the Proxy Settings


    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Click 'Add' button

    4. Clear proxy settings of IDE
    5. Rightclick Services->Web Services->W/S

    6. Choose 'View WSDL'

    1. Proper error message should appear

     

     

    ws_view_wsdl_07

    View WSDL on multiple WS nodes

    1. Select multiple W/S nodes.
    2. Rightclick and select "View WSDL"
    1. WSDL files for selected W/S should be opened

     

     

    ws_view_wsdl_08

    View WSDL menu action not on webservice leaf nodes

    1. Rightclick Web Services Methods node, Web Services Group node
    1. Verify that View WSDL context menu action is not present on web service leaf nodes , Web Services Module node, Web Services Group node

     

     

    ws_view_wsdl_09

    WSDL file in Editor Pane

    1. Services->Web Services->Add Web Service

    2. Enter valid URL in the input text field with "WSDL URL" label (for example http://www.webservicemart.com/uszip.asmx?WSDL)

    3. Click 'Add' button

    4. Rightclick Services->Web Services->W/S

    5. Choose 'View WSDL'

     

    1. Opening/View WSDL file should set the focus on Open
    2. Should be scrollable (fully viewable)
    3. Read Only (not editable)
    4. Editor Tab shows up with appropriate icon

     

     


    Add W/S To Project

    Setup (e): All projects in this and more testing areas must be Visual Web JSF (Invoke "New Project", "Web" -> "Web Application", three times Next, check "Visual Web JavaServer Faces", Finish).

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_prj_01

    Add W/S using popup menu

    1. Select W/S in the Services window

    2. In the popup menu choose Add To Page


    1. Library References of Project should have a new node Web Service - NameService with the reference to the corresponding jar file

    2. Page1 of Navigator should have a reference to the W/S client

    3. Java bean file should have corresponding import for the webservice

     

    Use steps from 'Add W/S using URL' to add a valid web service.

    ws_prj_02

    Add W/S using Drag & Drop

    1. Drag W/S from Servers window to the Form Designer

    1. Library References of Project should have a new node Web Service - NameService with the reference to the corresponding jar file

    2. Page1 of Navigator should have a reference to the W/S client

    3. Java bean file should have corresponding import for the webservice

     

    Use steps from 'Add W/S using URL' to add a valid web service.

    ws_prj_03

    Add W/S method via 'add to page' menu

    1. Rightclick the node of the method and select “Add to Page
    1. Library References of Project should have a new node Web Service - NameService with the reference to the corresponding jar file

    2. Page1 of Navigator should have a reference to the W/S client and to the W/S method

    3. Java bean file should have corresponding import for the webservice




    ws_prj_04

    Remove W/S from Project

    1. Select existing W/S in the Navigator window and perform Delete popup action

    1. Corresponding library reference should be removed from the Library References

    2. WS client should be removed from Navigator

    3. Corresponding import should be removed from the Java bean file.

     

    (2) & (4) are not implemented yet

    'Web Service JARS are not being deleted from project'

    ws_prj_05

    Remove W/S from Project

    1. Select existing W/S in the Navigator and perform Delete using delete key

    1. Corresponding library reference should be removed from the Library References

    2. WS client should be removed from Navigator

    3. Corresponding import should be removed from the Java bean file.

     

    (2) & (4) are not implemented yet

    'Web Service JARS are not being deleted from project'

    ws_prj_06

    Rename W/S id

    1. Select existing W/S in the Navigator

    2. In the Property Window change id property

    1. W/S name should be changed in Navigator


     


    ws_prj_07

    Add multiple W/S

    1. Select multiple W/S

    2. In the popup menu choose Add To Page

    1. All W/S should be added

     


    ws_prj_08

    Verify Cut/Copy/Paste operations for W/S icon in tray

    1. Add some W/S to the webform

    2. Click for popup on W/S icon in Navigator window and try to Cut/Copy/Paste W/S

    1. All operations should work

     

     

    ws_prj_09

    Verify Ctrl+X/Ctrl+C/Ctrl+V for W/S icon in tray

    1. Add some W/S to the webform

    2. Select W/S icon in tray and try to Cut/Copy/Paste W/S using keyboard shortcuts (Ctrl+X/Ctrl+C/Ctrl+V )

    1. All operations should work

     


    ws_prj_10

    Verify that Web Service Support Libraries are not included in project w/o any web service added

    1. Create a new project
    2. From Project Navigator, expand Library References-> Web Service Support
    1. There should no web service support libraries/jars underneath this

     



    Data Binding with W/S

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_bind_01

    Bind to complex data type using Bind to Data

    1. Add some WS
    2. Supply necessary parameters
    3. D&D Table
    4. Select Bind to Data and
      bind to the WS's data provider's field key
    5. Run
    1. Should be able to browse the  result data.



    For data providers:
    - drop a method before drop the ws in the project. A WS client instance should automatically get created. And the client instance is set on the data provider instance (check the managed bean constructor)
    - drop a WS, then drop a method. Make sure the client instance is set on the data provider instance
    - drop a WS multiple times (can be in different managed beans), then drop a method. You should get a pop up to ask you to select a client instance. Make sure the right client instance is set on the data provider instance.

    ws_bind_02

    Bind to primitive data type using Property Binding

    1. D&D staticText
    2. Do Property Binding with resultObject of the web services which return primitive data type or do Bind to Data/Bind to an Object/ the_web_service/resultObject
    3. Run
    1. Should be able to browse the  result data.





    Using W/S from Java code

    Setup (e):

    Test Id

    (t) Test Item

    (i) Input Spec

    (o) Output Spec

    (e) Env needs

    (d) Dependencies/Notes

    ws_java_01

    Use W/S from Java code

    1. Add some WS
    2. DnD this W/S to the page
    3. DnD Static Text component to the page
    4. In prerender() method call some of W/S method and use static text for output
    5. Run
    1. Should be able to browse the  result data.





    Approvals

    Reviewer Name & Title

    Date

    Status




    Revision History

    Author

    Date

    Revision

    Roman Mostyka

    April-18-2007

    1

    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