-
Click
Start Here on the workflow bar.
The
Load File Wizard dialog box displays.
-
To test a Web service, you must provide a Web Services Description Language (WSDL) document. Click the
Web Services option button and specify a path or URL to the WSDL document using the browse
(...) button.
注: To test .NET Remoting or other .NET classes, click the corresponding option button (.NET Remoting or
Other .NET Classes) and then specify a .NET Assembly (DLL or
EXE) that defines the class.
-
Click
Next.
The WSDL file now loads and finds out what is available on the Web service. A WSDL file is an XML description of the functionality
that is offered by the Web service.
注: The sample Web service offers a minimum of functionality. It simply echoes back some values.
-
Select the Web service class you wish to test from the
Class list box. Normally there will be only one class, but it is possible that the loaded WSDL will define multiple Web services.
-
Using the
URL (Endpoint) text box, you can change the endpoint of the service. The default endpoint is the one defined in the WSDL document. If required,
you can change Web service proxy and authentication settings for the Web server by clicking browse
(...) and entering information into the
Web Proxy Settings Wizard dialog box.
-
Click
Next.
The
Method invocation page displays.
-
Check the check boxes beside the methods that you want to have tested, for example
echoFloat(Single) and
echoString(String). Methods are called using the default parameters.
注: To see the member functions of the base classes, click
Inherited. This feature is generally only applicable to the testing of .NET Remoting and other .NET classes.
-
To adjust the sequence in which the methods are called, use the up and down arrow buttons. This way, you can move methods
up and down the invocation list. The button between the up and down arrow buttons enables you to invert the selection of methods,
meaning that all unmarked methods become marked, and vice versa.
注: Login and logout methods must be in first and last positions, respectively.
-
Click
Next.
The
Select a test case page displays.
-
Select the test case to which the testing methods should be added. You can select from the following:
- Init Test Case: This is the first test case that is called in test runs. Select this test case if your method calls are related to initialization,
logging in, or start-up.
- Existing Test Case: You can add to an existing test case. Choose the test case from the list box to the right of this selection.
- New Test Case: A new test case is created and the methods are added to the new test case. Using the text box to the right of this selection,
give the new test case a unique name.
- End Test Case: This is the last test case that is called in test runs. Select this test case if your method calls are related to clean-up,
for example logging off.
-
Click
Finish.
注: A message displays if you have selected a method that takes parameters, letting you know that default parameters will be used
for the method, which may result in an exception being thrown. Methods that throw exceptions will be excluded from your test
scenario. If you do not want to proceed, click
No, then go back, deselect the method in question, and add it later manually with a more meaningful parameter value.
The Web Service has been loaded in the
Loaded Components menu tree and the selected methods have been called and added to the selected test case.