Descriptive WSDL Smoke Test Scenarios
The smoke tests are organized into three categories: core tests, secondary rotating tests and adhoc tests. In every test run, the goal is to devote 60% of the time to core tests from which every test should be run, 30% to secondary rotating tests from which a tester can pick two or three tests making sure to cover each test at least once in a milestone, and 10% to adhoc test which can be picked randomly.
Every test in this category should be run in every smoke test.
Open and Close Editor
- Import the XML Examples: New -> Example ... -> Editing and validating XML files
- Open XMLExamples/PhoneBanking/PhoneBanking.wsdl and make sure you're in the design view
- Verify you can find PhoneBanking service, a square icon representing the binding and a Port Type named PhoneBanking with four operations.
File Creation & Saving
- Import the XML Examples: New -> Example ... -> Editing and validating XML files
- File -> New -> Other... -> Web Services -> WSDL to create an new WSDL file: NewWSDLFile.wsdl
- Verify the new file is created and opened in the WSDL Editor
- Right click on the canvas and select Add Service and add a new service called NewService and add a new PortType named NewPortType as well
- Save and close the editor
- Reopen the editor and verify that the NewService and NewPortType are persisted.
- File -> Save As..., and use the name NewWSDLFileSaveAs.wsdl
- Verify the NewWSDLFileSaveAs.wsdl file appear in the navigator
- In NewWSDLFileSaveAs.wsdl, add a new service and a new PortType
- Close the editor without saving the changes
- Reopen the NewWSDLFileSaveAs.wsdl, and verify that the new changes are discarded
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
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
- Imports: in the Outline view, right click on the Imports node -> Add Import
- Schema: in the Outline view, right click on the Types node -> Add Schema
- Service: in the Outline view, right click on the Services node -> Add Service
- Port: in the Outline view, right click on a created Service -> Add Port -> add a name or use default -> click Finish
- Binding: in the Outline view, right click on the Binding node -> Add Binding
- 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
- Port Type: in the Outline view, right click on the Port Type node -> Add Port Type
- Operation: in the Outline view, select a created Port Type and right click -> Add Operation
- Fault: in the Outline view, select a created Operation (Operations are found in Port Type -> a created Port Type -> Operation) -> Add Fault
- 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
- Message: in the Outline view, right click on the Messages node -> Add Message
- Part: in the Outline view, right click on a created Message -> Add Part
- 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
For each of the items created in the Add/Modify test, right click on the item or an equivalent item -> Delete
Rename a Port Type: in Outline view, right click on a created Port Type -> Refactor -> Rename... -> rename the file and press OK
- WSDL validation: introduce invalid elements/attributes, incorrect types, and break references (change an element's name which has multiple references to it) 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 (note as you are introducing validation errors, look for red squiggles to verify as you type validation)
Secondary Rotating Tests
Two or three tests from this category should be run in every smoke test. Testers should make sure every test should be run at least once in any given milestone.
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]".
Reorder parts: verify you can drag and drop the input and output for an operation
- As You Type Validation: as you type validation shows red squiggles for invalid content (no red squiggles see https://bugs.eclipse.org/bugs/show_bug.cgi?id=124911) (if you already tested validation, you should've already tested this)
- Content Assist: use CTRL+SPACE in various parts of the WSDL to see the possible entries that can be added
- Switching between Design and Source view: make sure changes to the source are reflected in the Design view
- Referenced components: in the Source View, press F3 or "CTRL+click" over a referenced component. The source editor should go to the referenced component
- 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
- 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"
- 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
WSDL preferences are found in the menubar Window -> Preferences -> Web Services -> WSDL Files
Default Target Namespace
Modify the Default Target Namespace and ensure this namespace is used in the WSDL wizard.
WSDL WS-I Compliance Setup
- Create an empty WSDL file by using File -> New -> File, and naming the file with the .wsdl extension
- Right click on the Design View -> Add Service, let this Service be known as the newly created Service
- Right click on the Design View -> Add Binding, let this binding be known as the newly created Binding
- Right click on the Design View -> Add PortType, let this PortType be known as the newly created PortType
- Right click on the newly created Binding -> Generate Binding Content... -> Choose the newly created PortType as the Port Type and select HTTP as the protocol -> click Finish
- Right click on the Port, which is the child of a Service -> Set Binding -> Existing Binding... -> select the newly created Binding -> Press OK
- Save the file and right click on the file -> Validate
- There should be one error on 'mime:content', to fix double click on the error, which will bring you to the Source view. Remove: <wsdl:output><mime:content type="text/xml" /></wsdl:output>
Or you can use the following equivalent source code:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="WSIComplianceWSDL" targetNamespace="http://www.example.org/WSIComplianceWSDL/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.example.org/WSIComplianceWSDL/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"> <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/WSIComplianceWSDL/"> <xsd:element name="NewOperation"> <xsd:complexType> <xsd:sequence> <xsd:element name="in" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="NewOperationResponse"> <xsd:complexType> <xsd:sequence> <xsd:element name="out" type="xsd:string"></xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </wsdl:types> <wsdl:message name="NewOperationRequest"> <wsdl:part name="parameters" element="tns:NewOperation"></wsdl:part> </wsdl:message> <wsdl:message name="NewOperationResponse"> <wsdl:part name="parameters" element="tns:NewOperationResponse"></wsdl:part> </wsdl:message> <wsdl:portType name="NewPortType"> <wsdl:operation name="NewOperation"> <wsdl:input message="tns:NewOperationRequest"></wsdl:input> <wsdl:output message="tns:NewOperationResponse"></wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="NewBinding" type="tns:NewPortType"> <http:binding verb="GET" /> <wsdl:operation name="NewOperation"> <http:operation location="/NewOperation" /> <wsdl:input> <http:urlEncoded /> </wsdl:input> </wsdl:operation> </wsdl:binding> <wsdl:service name="NewService"> <wsdl:port name="NewPort" binding="tns:NewBinding"> <http:address location="http://www.example.org/"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=242874 for why this error comes up.
- Save the file and Validate again, you should see WS-I warnings
- Now the file is ready for testing
- Ignore compliance: From the menubar, Window -> Preferences -> Service Policies -> for both WSI AP 1.0 and WSI BP 1.1 SSBP 1.0 set the Compliance Level to "Ignore compliance" -> Press OK -> Validate the WSDL file, all the WS-I warnings should dissapear
- Suggest compliance: Repeat the step above, but choose "Suggest compliance." The WS-I warnings should be shown when validated
- Require compliance: Repeat the step above, but choose "Require compliance." The WS-I warnings will now be errors when validated
Please go to Full WSDL Function Test Scenarios and randomly pick some tests that are not in neither the core tests nor the secondary rotating tests.