Validate transactions and matchers

Use the sandbox mode to quickly validate transactions and matchers without needing to deploy them to a virtual service environment and without the need to make API client calls. You get immediate feedback in real-time, which simplifies debugging without deployment overhead. After the validation, you can save your changes from the sandbox to the transaction.

Use case

After making changes to transactions and matchers, you want to validate your changes. Usually, to validate each change, you add the modified transaction to a virtual service and stop and restart it, which costs time. A faster method is using the validation sandbox.

In the sandbox, you can use test data parameters from the service data model in request matchers and response content, as well as use dynamic parameters in your response. To learn more, see Add parameter options and dynamic responses to transactions. You can view test data in the Service Data pane of the Transaction Testing window.

Any Processing Actions defined on transactions are also invoked during sandbox execution, mirroring runtime service virtualization behavior. You can view them in the Processing Actions tab of the Transaction Testing window.

Validate a transaction

Load an existing transaction into the sandbox, edit it, validate the changes, and save the edited transaction.

  1. Log in to BlazeMeter and open the Service virtualization tab.

  2. Go to Asset catalog > Transactions.

  3. Find the transaction you want to update.

  4. Click the Sandbox mode button (test tube icon) in the Actions column of the transaction.

    The Transaction Testing window opens.

  5. In the Transaction sandbox tab, click Autofill values to initialize the HTTP request.

    Initializing this sandbox from the current transaction overwrites the current values in the sandbox, if any.

 

After the autofill, the following fields and tabs are now initialized with values from the current transaction:

  • HTTP method

  • Request URL

  • Parameters

  • Headers

  • Body

To learn more about transaction types and their values, see DSL in the API docs.

 

Now you can edit and validate this transaction in real time:

  1. Edit the request definition.

  2. Click Test Request.

    The Response preview appears on the right side.

  3. Verify that the body and headers of the response match your expectations.

Repeat the editing and testing process until you are satisfied with the result.

Save or discard changes

To save the sandbox changes and overwrite the old transaction in the asset catalog:

  1. Go to the Transaction definition tab.
  2. Review the transaction definition.
  3. Click Apply to transaction.

To cancel and not save the sandboxed changes, click Close any time.