Using CA Application Test › Using the Workstation and Console with CA Application Test › Recorders and Test Generators › Generate a Web Service
Generate a Web Service
You can create a Web Service (XML) test case. Use the Web Service Execution (XML) step to call web service operations in a test case and test the response and request. These web service operations provide the same functionality as the equivalent method calls in the EJB used in Tutorial 7. For more information about the Web Service Execution step, see Web Service Execution (XML) Step in Using CA Application Test.
Ensure you are running the demo server to use this step.
Generating a web service includes the following steps:
- Create the Web Service (XML) Step
- Create the Web Service Client
- Execute the Test Case
Create the Web Service (XML) Step
Follow these steps:
- Open the model editor in DevTest Workstation.
- Right-click in the model editor window and select Add Steps, Web/Web Services, Web Service Execution (XML).
A Web Services step is added.
- Rename the step addUser in the Step Information area.
- Double-click the addUser step.
- The Web Service Execution editor opens.
- To create an XML document, click New Document.
Create the Web Service Client
Follow these steps:
- Enter the location of the WSDL in the WSDL URL field.
http://WSSERVER:WSPORT/itko-examples/services/UserControlService?wsdl
- Enter UserControlServiceService in the Service Name field.
Do not use spaces in the name of the web service.
- Enter UserControlServiceService in the Port field.
- Select the operation to be tested from the Operation list.
- Select the action to be taken on test error: Abort the Test from the On Error list.
Execute the Test Case
Follow these steps:
- Click Execute .
The test executes and displays the request and response.
- To view the request upon execution, click the Request tab.
- To view the response upon execution, click the Response tab.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|