Creating a stub populated with data

You can create a stub based on the structure of the schema that is defined for the operation and the have the response payload populated with data.

Before you begin

You must have completed the following tasks:

About this task

You can create a stub in an operation that uses the message exchange pattern (MEP) either at the time of synchronizing resources or after you have created and bound the physical resource with the logical one in an operation.

When you create a stub you can opt to select the type and value for the objects. You can also opt to include the optional fields in the generated stub.

Procedure

  1. Open the HCL DevOps Test Integrations and APIs (Test Integrations and APIs) Test Factory perspective.
  2. Select any of the following options to create a stub:
    • Right-click the operation where you want to create the stub, and then select New > Stubs > Stub....
    • Click the arrow button adjoining the Create New Stubs icon on the toolbar, and then click Stub....

    The Create new Stub dialog is displayed.

  3. Enter a name for the stub in the Name field.
  4. Click OK.

    The Contents Configuration dialog is displayed.

  5. Select the Include Optional Fields checkbox, if you want the messages in the generated tests to include all the optional fields that are present under the nodes.
  6. Click Finish.

Results

You have created a stub based on the structure of the schema that is defined for the operation.

What to do next

You can run the stub. See Publishing and running stubs.