Using Test Data from Data Entities

You can use Test Data from shared Data Entities to drive API Monitoring tests.

This article covers the following tasks:

Prepare Your Data Entities

To add a Data Entity:

  1. Go to the BlazeMeter Performance or Functional tab.

  2. Navigate to Test Data.

  3. Select Add Data Entity.

  4. Choose from Create New Data Entity, Import Data Entity from exported file, or Create New Data Entity from exported file.

    For more information on creating and modifying Data Entities, see How to Generate Synthetic Test Data.

  5. (Optional) Enable sharing of your Data Entities. See How to Share Test Data to learn more.

Add Data Entities to API Monitoring Test

To use your Test Data from shared Data Entities:

  1. Go to the BlazeMeter API Monitoring tab.

  2. Open or create an API Monitoring Test.

  3. Go to Editor > Environment > Test Settings and select Test Data.

  4. Under Test Data Source, select Add Test Data.

  5. In the Workspace input drop-down, select the Workspace from which to draw your Test Data.

  6. Under Test Data Entities:

    1. Select Add Test Data Entity and choose from the available list of entities.

      A preview of your entity will be available under Test Data Preview, and the variables will be listed under Test Steps > Parameterisation.

    2. (Optional) Add additional entities to use in the test.
    3. (Optional) Configure the Number of Rows and Data variant for each entity.

      If you are using multiple Data Entities, the test will draw the maximum number of data rows that have been specified among the entities. For instance, if you have three Data Entities with 1, 2, and 10 Number Of Rows specified, the test will draw 10 data rows.
      Depending on your subscription plan, you may be subject to a limited number of data rows. If your specified Number of Rows exceeds the data row limit, the Test Data size will be automatically reduced to match your subscription.
    4. (Optional) To execute data iterations in sequence instead of in a parallel run, check the Run data iterations sequentially box.

Add Your Parameters

You can now add data parameters using the test data variables in your Request and Assertions sections, much like regular variables. For more information, see Dynamic Data and Request Chaining.

Go to Editor > Steps > Parameterisation to view the available variables from your Data Entities, and add them to Request or Assertions.

API Monitoring uses {{variable}} format.

Run Your Data-driven Test

After uploading and configuring your CSV data file or Data Entities, and adding parameters to your step Request or Assertions, click Run Now.

Enabling the Run Once option allows you to run a particular step only in the first iteration. For example, this can be useful if your first step is authentication and you only need to authenticate the first iteration, while all subsequent requests will be automatically authenticated.

After enabling, click Save and Run.

View Test Iterations and Individual Data Line Results

(missing or bad snippet)