Jump to: navigation, search

Difference between revisions of "Descriptive WSDL Smoke Test Scenarios"

(Undo revision 123010 by Sghung.ca.ibm.com (Talk))
(Undo revision 123009 by Sghung.ca.ibm.com (Talk))
Line 1: Line 1:
 
== WSDL Smoke Test Scenarios ==
 
== WSDL Smoke Test Scenarios ==
  
==Example Setup==
+
'''Example Setup'''
 +
 
 
Examples found via: New -> Example ... -> Editing and validating XML files
 
Examples found via: New -> Example ... -> Editing and validating XML files
==Open and Close Editor==
+
 
 +
'''Open and Close Editor'''
 +
 
 
# Workspace WSDL file: open an WSDL file from the workspace and verify its content
 
# Workspace WSDL file: open an WSDL file from the workspace and verify its content
 
# Non-workspace WSDL file: open an WSDL file from outside the workspace and verify its content.  In addition, edit this file from an external editor and ensure a File changed dialog appears in Eclipse
 
# Non-workspace WSDL file: open an WSDL file from outside the workspace and verify its content.  In addition, edit this file from an external editor and ensure a File changed dialog appears in Eclipse

Revision as of 15:20, 10 October 2008

WSDL Smoke Test Scenarios

Example Setup

Examples found via: New -> Example ... -> Editing and validating XML files

Open and Close Editor

  1. Workspace WSDL file: open an WSDL file from the workspace and verify its content
  2. Non-workspace WSDL file: open an WSDL file from outside the workspace and verify its content. In addition, edit this file from an external editor and ensure a File changed dialog appears in Eclipse

Selection Tests

Synchronization between Properties, Design, Source, and Outline views: while conducting the Add/Modify tests, delete tests, and drag & drop tests, observe that these three views are synchronized


Note: if the nodes are collapsed and you add a new child, the node will not automatically expand. Therefore to test synchronization, expand the nodes whenever necessary to verify the synchronization between the Outline and Design view


Add/Modify Tests

For the tests where a new item is added:

  • Verify that the item was successfully added by finding and selecting the item from the Outline view or Design view
  • Whenever possible, modify the name of the item by changing the Name property in the Properties view under General properties

Tests:

  1. Imports: in the Outline view, right click on the Imports node -> Add Import
  2. Schema: in the Outline view, right click on the Types node -> Add Schema
  3. Service: in the Outline view, right click on the Services node -> Add Service
  4. Port: in the Outline view, right click on a created Service -> Add Port -> add a name or use default -> click Finish
  5. Binding: in the Outline view, right click on the Binding node -> Add Binding
  6. Binding content: in the Outline view, right click on a created Binding -> Generate Binding Content... -> select a Port type and protocol -> press Finish. In the Design view, an arrow from the binding to a portType should be created
  7. Port Type: in the Outline view, right click on the Port Type node -> Add Port Type
  8. Operation: in the Outline view, select a created Port Type and right click -> Add Operation
  9. Fault: in the Outline view, select a created Operation (Operations are found in Port Type -> a created Port Type -> Operation) -> Add Fault
  10. Message via Port Type: in the Outline view, select a created Port Type and expand the node until you see two blue arrows representing Input and Output. Right click on the blue arrow pointing right -> Set Message -> New Message... The newly created message will show up in the Messages node. Right click on the blue arrow pointing left -> Set Message -> Existing Message... -> Choose an existing message -> in the Properties view under General properties, the Message property should match the message you chose
  11. Message: in the Outline view, right click on the Messages node -> Add Message
  12. Part: in the Outline view, right click on a created Message -> Add Part
  13. Repeat the same steps for Design View. The UI element to mouseover and right click for each test is highlighted when selected in the Outline view


Delete Tests

For each of the items created in the Add/Modify test, right click on the item or an equivalent item -> Delete


Drag & Drop

Reorder sequences: in the Design view, right click on a Port Type (the Port type box has a purple circle with a white I) -> Add Operation -> Press the faded gray arrow that appears on the right side of the new Operation (there is a gray arrow for the Input and Output. Once pressed, the name of the Source and Design view should say, "Inline Schema of [WDLN name]". From the Outline view right click on Elements -> Add Element -> right click on the newly created Element -> Set Type -> New... -> ensure the Complex Type option is selected -> press OK -> right click on the new type -> Add Sequence -> right click on the newly created sequence -> Add Element (repeat this several times) -> Reorder the elements in the sequence by dragging in the Design or Outline view and ensure the changes are synchronized in both views and is reflected in the Source view


Source Editing

  1. Context Assist: use CTRL+SPACE in various parts of the WSDL to see the possible entries that can be added
  2. Context menus: right click in the Design, Outline, and Source view to check the context menus
  3. Formatting: in the Source view, right click -> source -> Format. Now untab some elements by selecting elements and using SHIFT+TAB. To reformat, right click -> source -> Format.
  4. Toggle comment: in Source view, right click -> source -> Toggle Comment
  5. Add block comment: in Source view, right click -> source -> Add Block Comment
  6. Remove block comment: in Source view, right click while inside a block comment -> source -> Remove block Comment
  7. Switching between Design and Source view: make sure changes to the source are reflected in the Design view

Note: there is no as you type validation for WTP but this feature does exist for RAD


Extensions

  1. HTTP: in Outline view, select a created Port Type -> click the Extensions properties from the Properties View -> Add.. -> HTTP -> select an available component to add -> press OK -> click ont he new extension from the Extensions list -> fill in the Extensions details
  2. SOAP: in Outline view, select a created Port Type -> click the Extensions properties from the Properties View (the text is currently not showing up, but it is the 3rd button on the vertical tab) -> Add.. -> SOAP -> select an available component to add -> press OK -> click ont he new extension from the Extensions list -> fill in the Extensions details
  3. MIME: in Outline view, select an Input from a created Port Type's Operation -> click the Extensions properties from the Properties View (the text is currently not showing up, but it is the 3rd button on the vertical tab) -> Add.. -> MIME -> select an available component to add -> press OK -> click on the new extension from the Extensions list -> fill in the Extensions details


Refactoring

Rename a Port Type: in Outline view, right click on a created Port Type -> Refactor -> Rename... -> rename the file and press OK


File Creation & Saving

  1. Use save and save-as on WSDL files
  2. Close without saving, changes should not be committed
  3. Open existing WSDL file
  4. Create a new WSDL file via File -> New -> Other... -> Web Services folder -> WSDL


Validation

  1. Schema validation: introduce invalid elements or attributes to a valid WSDL file. Right click on the WSDL file in the Package Explorer -> Validate. A red X should show up because the WSDL file is invalid. Revert the changes and re-validate, the X should disappear
  2. Disconnected mode: disconnect your computer from the internet and verify no new errors have occurred because of it via right clicking on the WSDL file in the Package Explorer view -> Validate


Schemas

  1. Launch inline schema editor: in the Design view, right click on a Port Type (The Port type box has a purple circle with a white I) -> Add Operation -> Press the faded gray arrow that appears on the right side of the new Operation (there is a gray arrow for the Input and Output. Once pressed, the name of the Source and Design view should say, "Inline Schema of [WDLN name]". Make changes to the schema using the Design or Source view and verify these changes are reflected in both views. Save the changes and close the inline Schema editor. Now reopen the inline Schema editor with the same steps and verify the changes.
  2. Launch editor on an external schema: in the Design view, right click on a Port Type (the Port type box has a purple circle with a white I) -> Add Operation -> in the row that says Input, select the cell on the farthest right on this row -> in the Properties view under the General properties, set the Reference Kind to "Element" and select Browse... from the Element combo box -> select "Workspace" for search scope -> select an element which is not part of the current schema -> press OK -> open the schema by pressing the faded gray arrow to the right of the Input row to bring up the schema editor. The Design and Source view name should not say "Inline Schema"
  3. Show Preview: in the Design view, mouse over a faded gray arrow located next to the Port Type and a preview of the graph will be shown as a popup in the Design view. To close this preview, press on this popup


Unused Imports

Remove unused imports: from the menubar, Window -> Preferences -> select Web Services from the preference list -> WSDL Files -> make sure the option "Automatically remove unused WSDL and XSD imports and XML Namespace entries" is unchecked. Make changes if needed and press OK, otherwise press cancel.

Switch to Source view -> after the <wsdl:definitions> tag, add an import statement like: <wsdl:import namespace="http://www.example.org/GolfCountryClub" location="../../XMLExamples/GolfCountryClub/GolfCountryClub.xsd"></wsdl:import> -> Save the file. The import should not dissappear. Follow the same steps as before to disable the "Automatically remove unused WSDL and XSD imports and XML Namespace entries" option but this time enable it. If you Save again, the unused import will disappear


Back to WTP 3.0 Test Scenarios