When using test data in BlazeMeter, you will come across the terms data parameter and data entity. Here's a quick definition of how we use these terms:
What are Data Parameters?
Test steps often rely on variable values: In a test case for a web application, you select an item from a combobox, you type a user name, you select a number of minutes to wait, and so on. You can either hard-code these parameter values, or fill them with variable test data. The advantage of replacing hard-coded values with Data Parameters is that the same test can iterate over rows of test data multiple times and perform test runs with a fresh set of values each time.
In BlazeMeter, the first letter of a Data Parameters is always a dollar sign, and the parameter name is surrounded by two braces. The name can only contain alphanumeric characters and the underscore character. The Parameter name cannot begin with a number. Parameter names must be unique within each test; if you attach a CSV file, BlazeMeter will generate unique names for its columns and show them in the Test Data pane.
To initialize a Data Parameter with test data, choose one of the following data sources:
When you load shared test data from the workspace into a test, you can still edit and override parameter values in your test. These "local" changes are not shared until you save them to the workspace. Local Parameter overrides can be helpful for one-off tests or temporary exceptions that you do not want to propagate to other team members' tests.
A data parameter can have the following scopes within a test:
- The data parameter is defined only in this test and not shared with the workspace.
- The data parameter is loaded from the workspace and has not been changed.
- The data parameter is loaded from the workspace and has been changed (overridden) for this test.
Data parameters are defined in data entities.
What are Data Entities?
In BlazeMeter, a Data Entity contains Data Parameters. A Data Entity can contain one or more Data Parameters from various data sources. GUI Functional tests currently support only a single Data Entity, Performance tests support multiple Data Entities.
You can save and load Data Entities within a workspace. Saving and loading is useful when you need to swap out different sets of test data, for example, you can load separate Data Entities for different geographies, or for minimal versus full test coverage, and so on. You reset locally overridden parameters by reverting to the original Data Entity.
Data entities can be exported in zip file format so you can back them up in an external version control system. You also use the exported files to move Data Entities between workspaces and accounts.
What are Data Variants?
Data Variants help you create various instances of the same Data Entity, so that you can easily switch between them. The variants can be shared within the workspace as well, ensuring consistency. For more information, see Test Data Variants.