+

Search Tips   |   Advanced Search


Record a service test with the generic service client

You can record a service test by invoking a series of calls with the generic service client. After you have successfully invoked the calls, select the results in the History section of the generic service client to generate a test. If you do not have access to a dedicated Java™ client for the service calls, the generic service client is the easiest way to generate the calls and to record a test.

Verify that the Rational Agent Controller is running on the local computer.

If workspace does not already contain a test project, the test recording wizard creates one. generate a test in a specific project, verify that the project exists before you record the test.

If you are testing a SOAP-based Web service, ensure that you have access to a valid Web Services Description Language (WSDL) file. The wizard can import WSDL files from the workspace, the file system, a remote repository, or from a URL. Verify WSDL files use the correct syntax for the test environment. The generic service client might not work with some Web Services Description Language (WSDL) files.

If you are using Secure Sockets Layer (SSL) authentication, ensure that you have any required key files in workspace.

If you are using SOAP security or file attachments, ensure that you have configured the environment with the correct libraries and configuration files. To record a test:

  1. In the Test perspective, click File > New > Test from Recording or click the New Test from Recording (

    ) toolbar button.

  2. Select Create test from new recording and Web service recording with generic service client; then click Next.

  3. Select a project, and then, in Test file name, type a name for the test. The name that you type is the base name for the recording, test, and other required files. You see these files in the standard Navigator or the Java Package Explorer with their distinguishing extensions, but you see only the simple (test) name in the Test Navigator.

  4. Click Next. If this is the first time you are recording a Web service test, read the Privacy Warning, and then select Accept, and click Finish to proceed. The generic service client opens.

  5. If service uses a transport or security protocol that requires overriding the default settings, then click the Transport tab and create a new transport or security configuration.

  6. Click the Calls tab.

    • Select Add a WSDL file (

      ) to use a WSDL file from the workspace, to import a WSDL or to link to a remote WSDL file.

    • Select the Add an endpoint (

      ) file to create a call to an HTTP, JMS, or WebSphere MQ service.

  7. After creating the call, click the Edit Call arrow to change the details of the call if necessary.

  8. Click the Invoke arrow to invoke the service call. If the call was successful, the response is displayed under the View Response arrow.

  9. record a test with multiple calls, repeat steps 6 through 9.

  10. When you have finished recording, click Stop Recording (

    ) . A progress window opens while the test is generated.


What to do next

Alternatively, you can use the generic service client to create, edit, and invoke the calls without recording. Successful responses are added to the Call History list. You can select calls in the Call History list, and click Generate Test Suite (

) .


Related

  • Service testing guidelines
  • Generic service client overview


    Related tasks

  • Verify WSDL syntax compliance for JMS services
  • Record a service test using an HTTP proxy
  • Create a service test from a BPEL model
  • Create a service test manually
  • Create a service test for WebSphere MQ
  • Create a service test for a plain XML call
  • Change service test generation preferences
  • com.ibm.rational.ttt.common.doc/topics/Sending_service_requests_with_the_generic_service_client539.html
  • com.ibm.rational.ttt.common.doc/topics/tgsccreatetop.html
  • com.ibm.rational.ttt.common.doc/topics/Invoke_a_call_with_a_WSDL_file535.html