Your goal is to replace hard-coded parameter values in test steps with dynamic test data. For example, you replace the static address that you typed in during the recording by the parameter ${address}; and then provide dynamic address data for that value.
There are multiple ways to provide test data to GUI Functional Tests. You can combine one or more data sources as needed. For more information, see How to Use Test Data – BlazeMeter.
- Provide static test data in a spreadsheet in CSV format. Each column contains data for one parameter. The first row can contain column names.
For more information, see How to Load Test Data from Spreadsheets. - Generate test data dynamically: Use BlazeMeter's built-in functions to generate synthetic parameters, such as dates, addresses, names, random numbers or random text, and more.
For more information, see How to Generate Synthetic Test Data. - Users of Test Data Manager (TDM) can additionally connect to a TDM server and load their F&R Models as test data.
For more information, see Find Test Data (TDM Find & Reserve Model Integration)
This article gives you an overview of the following tasks:
- Define Test Data Parameters
- Use Data in GUI Functional Tests
- Define Iteration Settings for GUI Functional Tests
- Preview Test Data
- Manage Test Data
Define Test Data Parameters
A test data parameter is a dynamic value such as a date, name, address, credit card number, that you want to use in a test instead of chard-coded values. You reference these values in test steps as ${date}, ${name}, ${address}, ${creditcardnumber}, and so on.
- Go to the BlazeMeter Functional tab and open a GUI Functional Test configuration.
- Click Test Data. The Test Data pane opens on the right side.
- Click the Plus button to add one or more data entities.
See the respective specific article for details:- Create a synthetic data parameter.
- Create a CSV file in-line, or import or attach an existing CSV file.
- Attach a TDM F&R Model.
For example, you can choose generate a synthetic value for the parameter ${address}, or to read static address values from a CSV spreadsheet, and so on.
Use Data in GUI Functional Tests
After you have loaded or defined test data, you use it in your test. For more information, see How to Use Test Data.
- Go to the BlazeMeter Functional tab and open a GUI Functional Test configuration that has test data parameters defined.
- Open the Test Data pane, go to each data parameter, and click Copy parameter name to clipboard.
-
Return to the test steps and replace hard-coded values by pasting the copied parameter name.
Define Iteration Settings for GUI Functional Tests
When attaching test data, the number of rows in the CSV files determines the number of test iterations that will be executed. But in a GUI Functional test's configuration, you can also manually control how many rows of data are used, by opening the Test Data pane and clicking Iterations. For more information about Run options, see How to Control the Number of Rows Used - Test Data Iteration Settings.
Preview Test Data
Previewing your test data is helpful when you are combining data from multiple files, or generating synthetic test data, so you can review values in context.
- Open a GUI Functional Test with test data attached.
- Verify that at least one data parameter is defined to be able to generate the data preview.
- Click Test Data, Iterations.
The Test Iteration Settings window opens and shows the data preview.
Manage Test Data
Open a GUI Functional Test and click Test Data to open the Test Data pane. Each GUI Functional test can currently have one data entity attached, which can contain a mix of CSV files, synthetic Test Parameters, and TDM F&R Models.
Any team member can save their data entity to the Workspace to share it, and load saved entities into their tests. For more information see How to Share Test Data.
0 Comments