Data Profiler

The Data Profiler helps you parameterize Performance tests, Functional tests, and Service Virtualization.

One way to parameterize a test is that you manually replace hard-coded values by Data Parameters and load values from a CSV file or using synthetic data generation functions. The Automatic Data Creation Wizard speeds up the manual parts of this process for you.

The Data Profiler is available for the following test types:

  • Performance tests (JMX files) that contain hard-coded values, or whose CSV Data Set Configurations are linked to a static CSV file
  • Functional tests (Taurus YAML files) that contain hard-coded values
  • Mock Services that contain hard-coded values


What is Data Profiling?

BlazeMeter can automatically detect hard-coded values in your test scripts and replace them with dynamic Data Parameters. The advantage of dynamic test data is that you can extend it to any quantity, quality, and coverage. Feel free to run the wizard and see what it suggests; you can leave the wizard any time without making changes to your test. You can also choose to accept only a partial parameterization of a few values and keep the rest untouched. At any point you are in control: You can see which hard-coded values have been detected and how certain the type prediction is. Patterns such as common names are detected with higher certainty, while the type of anonymous numbers or unknown strings are detected with lower certainty.

  • For each hard-coded value, you choose whether you want to replace it by a dynamic parameter or keep the existing static data untouched.

  • For each data parameter, you can review the suggested generator function and preview example values.

You can edit or replace suggested generator functions right in the wizard — or manually edit it any time later, after closing the Data Profiler, in the Test Data pane.


How to Create Test Data Based on Hard-Coded Values

The Data Profiler can generate test data for tests or Mock Service transactions that contain hard-coded values and have no test data associated yet. You can also profile attached CSV or JMX files and so on. After running the Profiler, you can choose to accept the default suggestions, customize the changes, or cancel without making any changes.

By default, based on the characteristics of the hard-coded values found, the Profiler offers to generate a suitable number of rows of synthetic data; the Profiler makes a backup of your files and replaces hard-coded values by parameters that loop over generated values. You can customize these settings and choose which values to parameterize and which not.

  1. Open the test or Mock Service transaction.
  2. Click the Data Creation Wizard button next to the closed Test Data / Service Data button.

    The Automatic Data Creation Wizard opens and lists the hard-coded values that it detected in your test.

  3. Review the Data Preview in each tab.

    1. Verify whether the detected Hard-coded Field Name, the Original Hard-coded Value, and its Data Type Prediction match your expectations.
    2. (Optional) If the shown value is not unique for a field, click Show All Values... for more examples.
    3. Verify whether the Suggested Data Generator Function and its Generated Data Example match your expectations.
  4. (Optional) If a prediction or function is not applicable, click Change Test Data Suggestions:
    1. Select the checkboxes for the values that you want to replace by synthetic test data.
    2. (Optional) Clear the checkboxes for the hard-coded values that you want to leave untouched in your script.
    3. Select a more appropriate Data Type Prediction from the menu.
      A new synthetic function will be suggested.

      Tip: Experienced users can select User Defined and edit the function and its arguments inline. For more information, see Data Generator Functions.

    4. Click Save.
  5. (Optional) Click Change Number of Rows:
    1. Under Number of Rows, specify how much data you want to generate.
    2. (CSV file only) Choose one of the following Data Creation Options:
      • By Replacing CSV
        The test uses synthetic values in place of the hard-coded columns in the CSV file. The CSV file itself is not edited.
      • By Extending CSV
        The test uses synthetic values in addition to the hard-coded columns in the CSV file. The CSV file itself is not edited.
    3. Review the Data Entity Preview.
    4. Click Save.
  6. (Optional) Click Change File Parameterization:
    1.  Choose one of the following options.
      • Parameterize Test and Back Up Original
      • Parameterize Test Without Backup
      • Don't Parameterize Test (Create Test Data Definitions only)
    2. Click Save.

  7. Review the Data Entities that will be created.

    Tip: To leave your test or Mock Service unchanged, you can click Cancel any time.

  8. If you are satisfied, click Save.
  9. To help us improve data profiling, submit comments in a survey, or click "No thanks" to postpone the survey, or click "Don’t show this survey again".

If you have chosen parameterization, the selected values in your script or in your mock service transactions, respectively, are now replaced by Data Parameters. If your data contained CSV files, BlazeMeter creates Data Entities for each CSV file. The attached CSV files themselves are not edited; BlazeMeter creates Data Parameters that override (extend or replace) columns in attached CSV files.

After you close the Automatic Data Creation wizard, you return to the Test Configuration page.

  • You can change your test data any time in the Test Configuration on the Test Data pane.
  • You can change your service data any time later in the Mock Service Asset Catalog by clicking the Service Data button.


How to replace or extend a CSV file with dynamic test data?

Q: I want to add a new CSV file to a test. How do I scan its data to extend or replace columns with dynamic test data?

A: Follow these steps:

  1. Open the test or Mock Service.
  2. Open the Test Data / Service Data pane.
  3. Click the Plus button and attach the CSV file.
    A Data Entity is created.
  4. Click the ellipsis menu of the Data Entity and select Create Data Automatically from the menu.


How to keep a copy of the original CSV file?

Q: Can I replace or extend columns in the CSV file without BlazeMeter changing the attached CSV file?

A: When you choose to replace or extend columns in a CSV file attached to your test, the actual file is not overwritten.

Dynamic Data Parameters are added to the test, and the replaced columns are merely hidden from the Data Entity editor. You can click the Ellipsis menu of the CSV file's Data Entity and select Download CSV File any time to get the original file.


How do I edit the data generation suggestions?

Q: On the Review & Select Data stage, the Data Profiler has not detected the data types that I expected. I want to parameterize this hard-coded data, but none of the suggestions are applicable. How do I suggest appropriate functions?

A: To customize the function on the Review & Select Data stage of the wizard, follow these steps:

  1. In the Data Type Prediction column, click the menu, scroll down, and select User Defined.
  2. In the Suggested Data Generator Function column, enter your custom function and arguments. For more information, see Data Generator Functions.
  3. Click the blue checkmark to save your custom function.
  4. Continue with the wizard.


What does "AI Enabled" mean?

Q: In the Automatic Data Creation Wizard, what does the AI Enabled button do?

A: Additional test data features use AI (artificial intelligence) and are available for Enterprise plans only. For more information, see Test Data Pro.


What if the Data Profiler found nothing?

Q: I ran the Data Profiler and it found no hard-coded data where I expected it. What could be the reason?

A: Verify whether one of the following situations applies to you:

  • Did you profile a Performance test JMX file that has CSV files referenced in its CSV Data Set Config or in its Random CSV Data Set Config, but you did not upload the CSV files? In this case, attach the referenced CSV files to the test and run the Data Profiler again.

  • Did you attempt to profile a Performance test, UI Functional script (YAML), or Mock Service that is already parameterized?


How do I profile tests with existing test data?

Q: I already have defined partial test data in the Service Data / Test Data pane. How do I scan my test for further hard-coded data?

A: To scan a test with some test data already defined, click the top ellipsis menu inside the Service Data / Test Data pane and select Create Data Automatically from the menu. This menu is also available for individual CSV files.