Starting a stub

When you have stubs in the API test assets, you can start the stubs contained in the API test assets from the Execution page in IBM® Rational® Test Automation Server.

Before you begin

You must have completed the following tasks:
  • Been assigned the Tester or Owner role to run the tests.
  • You must have created stubs that use a transport for tests in Rational® Integration Tester and committed the test resources to the remote repository.
  • Selected the branch of the Git repository to view test resources on the Execution page.
  • Enabled service virtualization through Istio at the time of installation of the server software.

About this task

You can start the following types of stubs contained in API Suites from the Execution page on Rational® Test Automation Server:
  • Stubs that utilize the WebSphere® MQ transport.
  • Stubs that utilize the HTTP transport.
  • Stubs that virtualize the Istio services.
    You can run stubs for the following types of requests received or sent by the Istio service mesh:
    • Requests received by services in the Istio service mesh.
    • Requests sent from namespaces in the Istio service mesh to external services that are not in the Istio service mesh.

Procedure

  1. Open the project that contains the API suite with the stubs and click Execution.
  2. Select the branch of the repository that contains the stubs that you want to run.

    All test assets in the selected branch are displayed on the Execution page.

  3. Identify the stubs that you want to run from the assets listed.
    Tip: You can identify the stubs by the Stub icon Image of the icon for stubs. for the test asset under the Type column. Stubs are displayed with the extension .stb in their names under the Name column.
    You can also identify the stubs by completing any of the following steps:
    • Search for the stubs by entering any text contained in the test asset name in the Search field box.
    • Create a filter query by using the New filter option and complete the following steps:
      1. Enter the relevant parameters and apply the filter query.
      2. Save the filter query for retrieving it from the saved filters list.

        For example, you can create a rule, which has the Type attribute equal to API Stub, to display the stubs in the assets in the selected branch.

    • Retrieve a saved filter by using the Open filters icon Image of the icon. by completing the following steps:
      1. Select the saved filter.
      2. Apply the filter.
      Note: To open the filter query, you must have created and saved a filter query.
  4. Click the Execute icon Image of the icon. in the row of the identified stub.

    The Execute test asset dialog box is displayed.

  5. Select the version of the stub in the test asset that you want to start.
  6. Select the time to schedule the starting of the stub from the following options:
    • Select Now to initiate the start immediately after you click Execute.
      Important: Do not click Execute until you have configured the other settings in the Execute test asset dialog box.
    • Select Later and configure the date and time to schedule the starting of the stub.
    Note: You can ignore the Label field for the stubs.
  7. Select the environment that was used to bind the physical and logical resource in the API project, in the ENVIRONMENT tab.
    Important:
    • The results are not captured for the stubs started or run on Rational® Test Automation Server and the stubs are not displayed on the Results page.
    • The configuration that you set for the test run in the Execute test asset dialog box is preserved when you start stubs again. Those changes are not visible when another user logs in to Rational® Test Automation Server.

      For example, if you selected an environment, the same environment is selected when you start stubs again.

  8. Click Execute.

Results

You have started a stub from the Execution page on Rational® Test Automation Server.

What to do next

You can perform any of the following tasks from the Progress page:
  • You can stop the running stub at any point after you start the stub.
  • You can view the progress of the stub.
  • You can view the Execution log for the stub.

You can verify whether the stub is running correctly by running the test in the API test asset that utilizes the stub and checking the Execution log to see whether the test has passed on the stub.

When you are done testing the stub, you must stop the running stub, see Stopping a stub.