Starting or stopping stubs

When you have WebSphere® MQ stubs in the API test assets, you can start or stop the WebSphere MQ stubs contained in the API test assets from the Execution page in HCL OneTest™ Server.

Starting the WebSphere MQ stub

When you have stubs in the API test assets, you can start the IBM® WebSphere MQ stubs contained in the API test assets from the Execution page in HCL OneTest Server.

Before you begin

You must have completed the following tasks:

  • Be assigned the Tester or Project Owner role to run the tests.
  • Confirmed with your Administrator that the appropriate license parameters point to the license server during the software installation process.
  • As the Project Owner, connected to the appropriate folder and branch of the Git repository to view test assets on the Execution page.

Procedure

  1. Open the project that contains the API suite with the WebSphere MQ stubs and click Execution.
  2. Identify the WebSphere MQ stubs that you want to run from the test assets listed.
    Tip: You can identify the WebSphere MQ 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:

    1. Search for the stubs by entering any text contained in the test asset name in the Search field box.
    2. 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.
    3. 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.
  3. Click the Execute icon Image of the icon. in the row of the identified stub.

    The Execute test asset dialog box is displayed.

  4. Select the time to schedule the starting of the stub from the following options:
    1. 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.
    2. Select Later and configure the date and time to schedule the starting of the stub.
  5. Optionally, select the environment or the secrets in the ENVIRONMENT tab if the test asset has an environment or secrets configured, by completing the following steps:
    1. Select the secrets collection that contains the secrets to be used for the test run.
    2. Select the API test environment from the list.
    Restriction: The results are not captured for the stubs started or run on HCL OneTest Server and the stubs are not displayed on the Results page.
    Note: You can ignore the Label field for the stubs.
    Important: 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 HCL OneTest Server. For example, if you selected an environment, the same environment is selected when you start stubs again.
  6. Click Execute.

Results

You have started a stub from the Execution page on HCL OneTest Server.

What to do next

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

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.

Stopping the WebSphere MQ stub

When you want to stop a stub running in HCL OneTest Server, you can stop the running stub from the Progress page.

Before you begin

You must have started the WebSphere MQ stub from the Execution page.

About this task

You can stop a running WebSphere MQ stub from the Progress page by using the Stop execution icon Image of the stop execution icon..

Procedure

  1. Go to the Progress page and identify the stub that you want to stop.
    Note: You can stop a running stub if it is in the In Transition or Running state.
  2. Click the Stop execution icon Image of the stop execution icon. in the Actions column of the selected stub.

    The Stop execution dialog box is displayed.

  3. Set the timeout period for stopping the stub. Enter a numeric value and select the unit from the options available such as Seconds, Minutes, or Hours.
    The time out period is the time during which the stub is allowed to stop on its own and after the timeout period, the stub is forced to stop abruptly.
    Important: If the timeout period is not set, a time of 30 seconds is considered as the default timeout period.
    Although the following options are selected by default, do not apply for stopping a running stub:
    • Capture results
      Restriction: Results are not captured for the stubs started or run on HCL OneTest Server and the stubs are not displayed on the Results page.
    • Execute 'finally-block', if present
  4. Click Stop execution.

    A notification message is displayed that the running stub is stopped successfully.

Results

You have stopped a running stub. The stopped stub is displayed on the Progress page with the status as Stopped by User. Stopped stubs are not considered in the count of test assets run that is displayed on the Overview page.

What to do next

You can restart the stub by completing the configurations that you want from the Execution page.

You can see the execution log of the stopped stub from the Actions column on the Progress page by clicking the Open action menu icon Image of the icon..

Feedback