Add transactions manually

You can manually add transactions to the repository to account for cases that are not represented in a file or specification. Cloning a similar transaction is the simplest way to add a new transaction without importing, but you can create a transaction from scratch if a good reference point is not available.

The easiest way to add transactions is uploading files in a supported format, or add them manually, or record them. When manully adding a transaction, you first provide the criteria by which a request matches URLs, headers, query parameters, cookies, credentials, or request body, followed by the response that you want the virtual service to return when a match is detected.

To learn how to define all fields of a transaction in detail, see Edit transactions. To learn more about matching and strategies for creating requests, see Choose the right request matchers.

Add transactions

Follow these steps:

  1. Log in to your BlazeMeter account and click the Service virtualization tab.
  2. Click Asset catalog.
  3. Click the + button and select HTTP transaction.
    The transaction details page opens.
    transactions request matcher
  4. Enter a name for the transaction in the Name field.
  5. From the Service drop-down, select the service to which to add this transaction, or create a new one.
  6. (Optional) To assign tags to transactions, type the tag name in the Tags field and press enter. To enter multiple tags, press enter after each tag name.
  7. Enter a Description for the transaction.

Next, define the request matcher and the reponse:

Match the request

In the Request matcher tab:

  1. Select the type of transaction you want to add. For example, GET, POST, UPDATE, DELETE.
  2. Define the URL in one of the following ways:
    • Either select Equals and enter a fixed URL in the URL field.
    • Or select Matches regex and enter a matching expression in the URL field.
      If you are editing an imported transaction, you can change the URL to a regular expression to make the transaction match against a broader set of requests.
  3. Click Add in each of the following tabs to add the details of your transaction to match against any of these entities in your request:
    • Headers
    • Query parameters
    • Cookies
    • Credentials
    • Body

To learn request matching details from examples, see Choose the right request matchers.

Simulate the response

In the Response tab:

  1. Select the Status code that the transaction will return with the response when a match occurs.

    virtual service response tab

  2. Enter the response body in the Body field.
  3. (Optional) Define optional fields, such as response headers, proxies, simulated delays (think time), redirects to a live system, simulated fault responses, or authentication. To learn more, see Edit transactions.
  4. Click Save.
    The transaction is added to the transaction repository.