Setting Up a Test Using the Load File Wizard

To set up a Java Explorer test using the Load File Wizard:
  1. Click Start Here on the workflow bar. The Load File Wizard dialog box opens.
  2. Click the option button that corresponds to the class type that you want to test.
    • Web Services
    • Enterprise JavaBeans
    • RMI
    • Java Archive
    • Java Class
  3. 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.
    Note: To test Enterprise JavaBeans, click the corresponding option button and then specify the EJB-specific connection settings. To test other class types, click the appropriate option button and then specify the path to a Java archive or class file.
  4. 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.
    Note: The sample Web service offers a minimum of functionality-it simply echoes back some values.
  5. 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.
  6. Use the URL (Endpoint) text box to change the endpoint of the service. The default endpoint is the one defined in the WSDL document.
  7. Optional: To change the Web service proxy and authentication settings for the Web server, click browse (...) to open the Connection Settings dialog box.
    1. Type the endpoint of the Web service in the URL text box.
    2. If user credentials are required for authentication, type the information in the Username and Password text boxes.
    3. Click OK.
  8. Click Next. The Method Invocation dialog box opens.
  9. Check the check boxes beside the methods that you want to test. For example echoFloat and echoString. Methods are called using the default parameters.
    Note: The checked Inherited check box indicates that the member functions of the base classes are visible. You cannot change the state of the check box manually.
  10. 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.
    Note: Login and logout methods must be in first and last positions, respectively.
  11. Click Next. The Select a test case dialog box opens.
  12. 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.
  13. Click Finish.
    Note: 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 don’t 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 class tree list and the selected methods have been called and added to the selected test case.