Creating a stub by using MEP

You can use the message exchange pattern (MEP) properties for an operation, which define binding and timeout details, to quickly create a stub.

Before you begin

This method requires a transport and an operation. See Options for creating test resources.

About this task

To create a stub by using the MEP properties for a selected operation:


  1. Open the HCL OneTest API Test Factory perspective.
  2. Click the arrow button () next to the Create New Stubs button () on the toolbar for the Test Factory perspective.

    Alternatively, right-click the operation where you want to create the stub and select New > Stubs > Stub using MEP on the shortcut menu.

    Note: If at least one stub has already been created, you can right-click the Stubs folder or one of the existing stubs and select New > Stub using MEP.

    The Create new Stub from MEP dialog box is displayed.

  3. In the Name field, enter a name for the stub.
  4. Optional: Click Options to open the Select message options dialog box, which enables you to enter additional settings.
  5. Click OK.

    The stub is opened for editing.

    For information about using the Stub Editor to modify or enhance an MEP stub, refer to Modifying message-based stubs.

  6. After making any required changes to your stub, you can save it by clicking the Save button () on HCL OneTest API’s toolbar.

    Alternatively, click File > Save on the menu bar or press CTRL+S.


The stub is now ready to run.

For information about running message-based stubs, refer to Publishing and running stubs.