When using test data in BlazeMeter, you will come across the terms data parameter and data model.
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, you maybe 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.
In BlazeMeter, the first letter of a data parameters is always a dollar sign, and the parameter name is surrounded by two braces, for example:
The same test can iterate over rows of test data multiple times and perform test runs with a fresh set of values each time.
Parameter names must be unique within each test.
To initialize a data parameter with test data, choose one of the following data sources:
- Load Test Data from CSV Spreadsheets
- Generate Synthetic Test Data
- Find Test Data from TDM Database Models
When you load test data from the workspace into a test, you can still edit and override parameter values. These "local" changes are not shared until you save them to the workspace. 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 models.
What are Data Models?
In BlazeMeter, a data model is a set of data parameters. Each data model can contain one or more data parameters from various data sources. GUI Functional tests support only a single data model, Performance tests support multiple.
Data models can be saved and loaded 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 sets for different geographies, or for minimal versus full test coverage. You can reset overridden parameters by reverting to the original data model.
Data models can be exported in zip file format to be backed up in an external version control system. You can also use the exported files to move data models between workspaces and accounts.