Starting stubs by using the HCL OneTest API method

HCL OneTest API can be used to start stubs, but HCL® Quality Server provides more control over the startup of a stub or a set of stubs.

Procedure

To start a stub:
  1. In HCL OneTest API Test Lab perspective, find the stub that you want to start.
  2. Right-click the stub and click Run on the shortcut menu.

    Alternatively, select the stub and click Run on the Task Monitor windows toolbar.

    Note: If you want to run all stubs for a particular operation, right-click the operations Stubs folder and then click Run All > Stub on the shortcut menu.

Results

Starting a message-based stub causes the following things to happen:

  • The Test Lab perspective Console window displays progress of the stubs startup and messages from the stub as it runs. If the stubs log level has been set to Debug, you will be able to view detailed information about what the stub is doing. (For information about setting a stubs log level, refer to Starting stubs by using the HCL Quality Server method.)
  • The stub will start listening on queues and ports.
  • If proxies are being used, traffic will be routed to the stub automatically.
Note: For information about restrictions on stubs started by HCL OneTest API, refer to Starting stubs.

Starting a database stub causes the following to happen:

  • The data contained in the stub is loaded into the simulation database.
  • The HCL OneTest API JDBC proxy is switched to simulate mode, which affects the system under test but not HCL OneTest API, and all interactions between the system under test and the live database are directed to the stub. (For information about simulate mode, refer to Creating and modifying database stubs.)
  • The Test Lab perspective Console window displays progress of the stubs startup.
Note: If you are using HCL OneTest API 8.0.1 (or later), clicking default case console output or failed validation console output on the Console window opens the Message Differences window, which enables you to debug the stub. (For information about debugging a stub, refer to Debugging Message-Based Stubs. For general information about the Message Differences window, see API Tester Reference.)