Default language.

Stubs in the Web Client


Stubs are created from the component execution page, where either entered input data or result data from an execution can be saved as a stub.

image2021-9-24_14-58-39.png

To create a new stub:

  1. Find the XAPGMTST component or another component of your choice and click Execute, which will redirect you to the Execute page.
  2. Execute the component.
  3. Click wrench.gifand the save buttons are located on the Options panel. Click the Save result as stub button.
  4. Enter a label and description for the stub and optionally choose a category. Click Create new.

    1758792961101-579.png
    ​​​​​​
  5. Navigate to the Component Repository > Component Stubs menu to see all stubs.
  6. Find and select your newly created stub.
  7. Click the Edit button and try to change a couple of values before clicking Update. You can also create a new stub from an existing stub.
    image2021-9-24_14-59-36.png

We will now use the stub when executing the XAPGMTST or your own program. This will simulate the invocation of the component and the stub data is returned. You can similarly create stubs of submodules that a component uses. If you add such stubs to a component execution, then the module will not invoke the sub modules but instead it will receive the stub data.

Perform the following steps to use the stub in a component execution:

  1. Navigate to the execution page for XAPGMTST or your own module. Click wrench00004.gifto view the Options panel. At the Stubs tab, click TTT_Plus.png. It will open a dialog box for selecting a stub.
  2. Select the newly created stub.

    image2021-9-24_15-2-8.png

  3. If one of the sub modules you are mocking is statically bound to the component, then you have to enable the One or more sub modules are static linked.
  4. Execute the module, and you should get the data back equal to what you previously edited.

As usual you can save the input data, which will include information about the stubs. This is also true if you create a test scenario from the data.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Total Test Web 24.05