Creating Your First Mock Service

The Learn More tab on the Service Virtualization tab makes it easy to create your first Mock Service.

Additional options are available when you create a Mock Service from the Mock Services page. For more information, see Creating a Mock Service.

Create Your First Mock Service

To create a ready to use Mock Service in 5 steps, try the Start Mocking Now wizard. For more information, see Start Mocking Now Wizard.

Follow these steps:

  1. Log in to BlazeMeter and click the Service Virtualization tab.
  2. Click Learn More at the top of the page.
    Learn More button
  3. Drag a supported file type into the upload area, or click the area to browse and find the file you want. This file should contain all of the Transactions that you want to use for your Mock Service. For more information about supported file formats of transactions, see Adding Transactions.
    Note: If you want to upload multiple Swagger files using a zip file, the main file in the zip file must be named index.json or index.yaml for the upload to work.
    If you do not have a file, you can try the sample file by clicking the link below the upload box.
    a provided mock service sample file
    The Mock Services page opens, and the first Mock Service listed was newly generated from the file you uploaded.
  4. Click the arrow next to the Mock Service name to expand the details for the mock service.
    mock service details
  5. Enter a name for the Mock Service in the Name field or keep the generated default name.
  6. Leave the default selection in the Select Service drop-down.
    A Mock Service created from Learn More automatically creates a Service for you. For more information about Services and how you create them in a typical scenario, see Creating a Mock Service.
  7. Select the location where you want to deploy your mock service from the Location drop-down.
    • Unless you plan to run the Mock Service in a private location, select from the available Google Cloud Platform locations (US East or EU West) depending on your location.
  8. Select either HTTPS or HTTP from the Endpoint drop-down.
    • The default is HTTPS.
  9. Review the Transactions in this Mock Service pane to see the Transactions added to the Mock Service from the file that you uploaded.
    • Creating a Mock Service from Learn More automatically adds all Transactions from your file to the Mock Service. You can remove Transactions as needed by moving them to the left pane.

      Tip: You can use a quick action to move transactions with a single click. Click the Include this transaction in the Mock Service icon in the left column. To remove a transaction from the Mock Service, you can click the Remove this transaction from the Mock Service icon in the right column. Click to enlarge the screenshots:
      quick inline buttons to include transactions

      quick inline buttons to exclude transactions

  10. Click the Parameters tab.
    mock service parameters tab
  11. (Optional) Set the Think Time to control an artificial delay between the request and the response. The default is "No Delay". For more information, see Simulating Irregular Response Latencies.
  12. In the No Matching Requests field, choose the correct logic for when a request against the Mock Services does not match any of the provided transactions. The request can either throw an error or be redirected to the live service.

    Note: If you select Redirect to live system, a new field Live System Endpoint shows where you fill in the live system's URL. For more information about generic or conditional redirects, see Live System Endpoint in the Adding Transactions article.

    redirect to live system option
  13. Click Save.
    The Mock Service is created and available on the Mock Services page. Run the service to activate the virtual endpoint and run tests against it.